diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-01-20 14:24:34 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-01-20 14:24:34 +1000 |
commit | 869c206c4fcc8001bd2e1d66f704290331813835 (patch) | |
tree | 96735ce8fe4665e2759c3374221d6f06f4527df2 /src/Java/binnie/core/machines/MachineRendererBlock.java | |
parent | ec2c72827f01dd4bb2174137f1ab162f9ddaab62 (diff) | |
download | GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.gz GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.bz2 GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.zip |
Initial Commit
Diffstat (limited to 'src/Java/binnie/core/machines/MachineRendererBlock.java')
-rw-r--r-- | src/Java/binnie/core/machines/MachineRendererBlock.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Java/binnie/core/machines/MachineRendererBlock.java b/src/Java/binnie/core/machines/MachineRendererBlock.java new file mode 100644 index 0000000000..9506746df4 --- /dev/null +++ b/src/Java/binnie/core/machines/MachineRendererBlock.java @@ -0,0 +1,41 @@ +package binnie.core.machines; + +import binnie.core.BinnieCore; +import binnie.core.proxy.BinnieProxy; +import binnie.core.resource.BinnieResource; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class MachineRendererBlock +{ + public static MachineRendererBlock instance = new MachineRendererBlock(); + private BinnieResource texture; + private ModelBlock model; + + public MachineRendererBlock() + { + this.model = new ModelBlock(); + } + + public void renderMachine(BinnieResource texture, double x, double y, double z, float var8) + { + this.texture = texture; + + GL11.glPushMatrix(); + + GL11.glTranslated(x + 0.5D, y + 1.5D, z + 0.5D); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + + BinnieCore.proxy.bindTexture(texture); + + GL11.glPushMatrix(); + + this.model.render((float)x, (float)y, (float)z, 0.0625F, 0.0625F, 0.0625F); + + GL11.glPopMatrix(); + + GL11.glPopMatrix(); + } +} |