a4222a86f0
Conflicts: common/mekanism/client/render/tileentity/RenderUniversalCable.java
45 lines
No EOL
1.5 KiB
Java
45 lines
No EOL
1.5 KiB
Java
package mekanism.client.render.tileentity;
|
|
|
|
import mekanism.client.model.ModelMetallurgicInfuser;
|
|
import mekanism.common.tileentity.TileEntityMetallurgicInfuser;
|
|
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;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public class RenderMetallurgicInfuser extends TileEntitySpecialRenderer
|
|
{
|
|
private ModelMetallurgicInfuser model = new ModelMetallurgicInfuser();
|
|
|
|
@Override
|
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
|
{
|
|
renderAModelAt((TileEntityMetallurgicInfuser)tileEntity, x, y, z, partialTick);
|
|
}
|
|
|
|
private void renderAModelAt(TileEntityMetallurgicInfuser tileEntity, double x, double y, double z, float partialTick)
|
|
{
|
|
GL11.glPushMatrix();
|
|
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
|
|
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "MetallurgicInfuser.png"));
|
|
|
|
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();
|
|
}
|
|
} |