2012-12-23 20:46:11 +01:00
|
|
|
package mekanism.client;
|
2012-12-19 21:23:55 +01:00
|
|
|
|
2012-12-23 20:46:11 +01:00
|
|
|
import mekanism.common.TileEntityTheoreticalElementizer;
|
2012-12-20 22:53:39 +01:00
|
|
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2012-12-19 21:23:55 +01:00
|
|
|
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
2012-12-23 20:46:11 +01:00
|
|
|
public class RenderTheoreticalElementizer extends TileEntitySpecialRenderer
|
2012-12-19 21:23:55 +01:00
|
|
|
{
|
2012-12-23 20:46:11 +01:00
|
|
|
private ModelTheoreticalElementizer model = new ModelTheoreticalElementizer();
|
2012-12-19 21:23:55 +01:00
|
|
|
|
2013-02-22 04:03:54 +01:00
|
|
|
@Override
|
2012-12-19 21:23:55 +01:00
|
|
|
public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8)
|
|
|
|
{
|
2012-12-23 20:46:11 +01:00
|
|
|
renderAModelAt((TileEntityTheoreticalElementizer) var1, var2, var4, var6, 1F);
|
2012-12-19 21:23:55 +01:00
|
|
|
}
|
|
|
|
|
2012-12-23 20:46:11 +01:00
|
|
|
private void renderAModelAt(TileEntityTheoreticalElementizer tileEntity, double x, double y, double z, float f)
|
2012-12-19 21:23:55 +01:00
|
|
|
{
|
|
|
|
GL11.glPushMatrix();
|
|
|
|
GL11.glTranslatef((float) x + 0.5f, (float) y + 1.5f, (float) z + 0.5f);
|
2013-03-18 17:23:57 +01:00
|
|
|
bindTextureByName("/mods/mekanism/render/TheoreticalElementizer.png");
|
2012-12-19 21:23:55 +01:00
|
|
|
|
|
|
|
switch(tileEntity.facing)
|
|
|
|
{
|
|
|
|
case 2: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
case 3: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
case 4: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
case 5: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
|
|
|
|
}
|
|
|
|
|
|
|
|
GL11.glRotatef(180F, 0.0F, 1.0F, 1.0F);
|
|
|
|
GL11.glRotatef(90F, -1.0F, 0.0F, 0.0F);
|
2013-02-22 04:03:54 +01:00
|
|
|
GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
|
2012-12-19 21:23:55 +01:00
|
|
|
model.render(0.0625F);
|
|
|
|
GL11.glPopMatrix();
|
|
|
|
}
|
|
|
|
}
|