resonant-induction/minecraft/dark/BasicUtilities/renders/RenderGenerator.java
Rseifert 494d98bb05 where do i begin
I've made a mess of changes since last upload. Main big change is change
in forge file formate that merged minecraft and common folder. The other
is the complete rewrite to Forge Liquid api. So far only the pump,
boiler, and pipe are converted to the new system. The pipe will actual
not fully work with most machines since it can't drain liquids out of
machines. In future update there will be a block to do this called a
pipe pump. Other than those changes nothing much is diffrent.
2012-12-22 04:44:17 -05:00

39 lines
No EOL
1.1 KiB
Java

package dark.BasicUtilities.renders;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import dark.BasicUtilities.BasicUtilitiesMain;
public class RenderGenerator extends TileEntitySpecialRenderer
{
int type = 0;
private ModelGenerator model;
public RenderGenerator()
{
model = new ModelGenerator();
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float d3) {
bindTextureByName(BasicUtilitiesMain.textureFile+"mechanical/Generator.png");
GL11.glPushMatrix();
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
GL11.glScalef(1.0F, -1F, -1F);
int meta = tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
switch(meta)
{
case 0:GL11.glRotatef(0f, 0f, 1f, 0f);break;
case 1:GL11.glRotatef(90f, 0f, 1f, 0f);break;
case 2:GL11.glRotatef(180f, 0f, 1f, 0f);break;
case 3:GL11.glRotatef(270f, 0f, 1f, 0f);break;
}
model.RenderMain(0.0625F);
GL11.glPopMatrix();
}
}