Files
Mekanism-Community-Edition/src/main/java/mekanism/client/render/tileentity/RenderChemicalWasher.java
T
Ben Spiers 84336ec4d1 Merge branch 'development' into 1.8.9
Huge merge with 202 conflicts, hopefully not *too* broken.
2016-03-18 04:24:19 +00:00

36 lines
1.3 KiB
Java

package mekanism.client.render.tileentity;
import mekanism.client.model.ModelChemicalWasher;
import mekanism.common.tile.TileEntityChemicalWasher;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
public class RenderChemicalWasher extends TileEntitySpecialRenderer<TileEntityChemicalWasher>
{
private ModelChemicalWasher model = new ModelChemicalWasher();
@Override
public void renderTileEntityAt(TileEntityChemicalWasher tileEntity, double x, double y, double z, float partialTick, int destroyStage)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F);
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalWasher.png"));
switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/
{
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
}
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
model.render(0.0625F);
GL11.glPopMatrix();
}
}