2013-08-27 00:49:32 +02:00
|
|
|
package mekanism.client.render;
|
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;
|
2013-08-27 00:49:32 +02:00
|
|
|
import mekanism.client.model.ModelElectricPump;
|
2013-07-20 18:10:14 +02:00
|
|
|
import mekanism.common.MekanismUtils;
|
|
|
|
import mekanism.common.MekanismUtils.ResourceType;
|
2013-08-27 00:49:32 +02:00
|
|
|
import mekanism.common.tileentity.TileEntityElectricPump;
|
2013-04-05 22:26:48 +02:00
|
|
|
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-07-20 18:10:14 +02:00
|
|
|
|
|
|
|
func_110628_a(MekanismUtils.getResource(ResourceType.RENDER, "ElectricPump.png"));
|
2013-04-05 22:26:48 +02:00
|
|
|
|
|
|
|
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
|
|
|
model.render(0.0625F);
|
|
|
|
GL11.glPopMatrix();
|
|
|
|
}
|
|
|
|
}
|