2013-08-27 00:57:08 +02:00
|
|
|
package mekanism.client.render.tileentity;
|
2013-04-05 22:26:48 +02:00
|
|
|
|
2013-08-27 00:49:32 +02:00
|
|
|
import mekanism.client.model.ModelMetallurgicInfuser;
|
|
|
|
import mekanism.common.tileentity.TileEntityMetallurgicInfuser;
|
2013-08-27 00:57:08 +02:00
|
|
|
import mekanism.common.util.MekanismUtils;
|
|
|
|
import mekanism.common.util.MekanismUtils.ResourceType;
|
2013-06-26 23:49:47 +02:00
|
|
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
|
2013-04-05 22:26:48 +02:00
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
2013-04-13 16:33:37 +02:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
2013-04-05 22:26:48 +02:00
|
|
|
public class RenderMetallurgicInfuser extends TileEntitySpecialRenderer
|
|
|
|
{
|
|
|
|
private ModelMetallurgicInfuser model = new ModelMetallurgicInfuser();
|
|
|
|
|
|
|
|
@Override
|
2013-04-13 02:25:21 +02:00
|
|
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
2013-04-05 22:26:48 +02:00
|
|
|
{
|
2013-04-13 02:25:21 +02:00
|
|
|
renderAModelAt((TileEntityMetallurgicInfuser)tileEntity, x, y, z, partialTick);
|
2013-04-05 22:26:48 +02:00
|
|
|
}
|
|
|
|
|
2013-04-13 02:25:21 +02:00
|
|
|
private void renderAModelAt(TileEntityMetallurgicInfuser tileEntity, double x, double y, double z, float partialTick)
|
2013-04-05 22:26:48 +02:00
|
|
|
{
|
|
|
|
GL11.glPushMatrix();
|
2013-04-13 02:25:21 +02:00
|
|
|
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
|
2013-09-28 03:59:47 +02:00
|
|
|
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "MetallurgicInfuser.png"));
|
2013-04-05 22:26:48 +02:00
|
|
|
|
|
|
|
switch(tileEntity.facing)
|
|
|
|
{
|
|
|
|
case 2: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
case 3: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
case 4: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
case 5: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
}
|
|
|
|
|
|
|
|
GL11.glTranslatef(0, -1.5F, 0);
|
|
|
|
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
|
|
|
model.render(0.0625F);
|
|
|
|
GL11.glPopMatrix();
|
|
|
|
}
|
2013-06-26 23:49:47 +02:00
|
|
|
}
|