2013-04-05 22:26:48 +02:00
|
|
|
package mekanism.client;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2013-04-05 22:26:48 +02:00
|
|
|
import mekanism.common.TileEntityElectricPump;
|
|
|
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
|
2013-04-13 16:33:37 +02:00
|
|
|
@SideOnly(Side.CLIENT)
|
2013-04-05 22:26:48 +02:00
|
|
|
public class RenderElectricPump extends TileEntitySpecialRenderer
|
|
|
|
{
|
|
|
|
private ModelElectricPump model = new ModelElectricPump();
|
|
|
|
|
|
|
|
@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((TileEntityElectricPump)tileEntity, x, y, z, 1F);
|
2013-04-05 22:26:48 +02:00
|
|
|
}
|
|
|
|
|
2013-04-13 02:25:21 +02:00
|
|
|
private void renderAModelAt(TileEntityElectricPump 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-04-05 22:26:48 +02:00
|
|
|
bindTextureByName("/mods/mekanism/render/ElectricPump.png");
|
|
|
|
|
|
|
|
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
|
|
|
model.render(0.0625F);
|
|
|
|
GL11.glPopMatrix();
|
|
|
|
}
|
|
|
|
}
|