aboutsummaryrefslogtreecommitdiff
path: root/src/Java/binnie/core/machines/ModelBlock.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-01-20 14:24:34 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-01-20 14:24:34 +1000
commit869c206c4fcc8001bd2e1d66f704290331813835 (patch)
tree96735ce8fe4665e2759c3374221d6f06f4527df2 /src/Java/binnie/core/machines/ModelBlock.java
parentec2c72827f01dd4bb2174137f1ab162f9ddaab62 (diff)
downloadGT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.gz
GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.bz2
GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.zip
Initial Commit
Diffstat (limited to 'src/Java/binnie/core/machines/ModelBlock.java')
-rw-r--r--src/Java/binnie/core/machines/ModelBlock.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Java/binnie/core/machines/ModelBlock.java b/src/Java/binnie/core/machines/ModelBlock.java
new file mode 100644
index 0000000000..7258ec8654
--- /dev/null
+++ b/src/Java/binnie/core/machines/ModelBlock.java
@@ -0,0 +1,42 @@
+package binnie.core.machines;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+
+class ModelBlock
+ extends ModelBase
+{
+ private ModelRenderer Block;
+
+ public ModelBlock()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 32;
+
+ this.Block = new ModelRenderer(this, 0, 0);
+ this.Block.addBox(0.0F, 0.0F, 0.0F, 16, 16, 16);
+ this.Block.setRotationPoint(-8.0F, 8.0F, -8.0F);
+ this.Block.setTextureSize(64, 32);
+ this.Block.mirror = true;
+ setRotation(this.Block, 0.0F, 0.0F, 0.0F);
+ }
+
+ public void render(float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ super.render(null, f, f1, f2, f3, f4, f5);
+ setRotationAngles(f, f1, f2, f3, f4, f5);
+ this.Block.render(f5);
+ }
+
+ private void setRotation(ModelRenderer model, float x, float y, float z)
+ {
+ model.rotateAngleX = x;
+ model.rotateAngleY = y;
+ model.rotateAngleZ = z;
+ }
+
+ public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ super.setRotationAngles(f, f1, f2, f3, f4, f5, null);
+ }
+}