Guest User

fa

a guest
Oct 29th, 2014
1,907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.19 KB | None | 0 0
  1. package mike.bathicraft.model;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.entity.Entity;
  6. import net.minecraft.util.MathHelper;
  7.  
  8. public class ModelTheGuardian extends ModelBase
  9. {
  10. //fields
  11. ModelRenderer Shape1;
  12. ModelRenderer Shape2;
  13. ModelRenderer Shape3;
  14. ModelRenderer Shape4;
  15. ModelRenderer Shape5;
  16. ModelRenderer Shape6;
  17. ModelRenderer Shape7;
  18. ModelRenderer Shape8;
  19. ModelRenderer Shape9;
  20. ModelRenderer Shape10;
  21. ModelRenderer Shape11;
  22. ModelRenderer Shape12;
  23. ModelRenderer Shape13;
  24.  
  25. public ModelTheGuardian()
  26. {
  27. textureWidth = 128;
  28. textureHeight = 128;
  29.  
  30. Shape1 = new ModelRenderer(this, 75, 3);
  31. Shape1.addBox(0F, 0F, 0F, 8, 7, 8);
  32. Shape1.setRotationPoint(-4F, -33F, 0F);
  33. Shape1.setTextureSize(128, 128);
  34. Shape1.mirror = true;
  35. setRotation(Shape1, 0F, 0F, 0F);
  36. Shape2 = new ModelRenderer(this, 54, 22);
  37. Shape2.addBox(0F, 0F, 0F, 26, 8, 10);
  38. Shape2.setRotationPoint(-13F, -26F, -1F);
  39. Shape2.setTextureSize(128, 128);
  40. Shape2.mirror = true;
  41. setRotation(Shape2, 0F, 0F, 0F);
  42. Shape3 = new ModelRenderer(this, 68, 43);
  43. Shape3.addBox(0F, 0F, 0F, 18, 6, 8);
  44. Shape3.setRotationPoint(-9F, -18F, 0F);
  45. Shape3.setTextureSize(128, 128);
  46. Shape3.mirror = true;
  47. setRotation(Shape3, 0F, 0F, 0F);
  48. Shape4 = new ModelRenderer(this, 90, 59);
  49. Shape4.addBox(0F, 0F, 0F, 4, 6, 4);
  50. Shape4.setRotationPoint(-2F, -12F, 2F);
  51. Shape4.setTextureSize(128, 128);
  52. Shape4.mirror = true;
  53. setRotation(Shape4, 0F, 0F, 0F);
  54. Shape5 = new ModelRenderer(this, 65, 72);
  55. Shape5.addBox(0F, 0F, 0F, 18, 6, 8);
  56. Shape5.setRotationPoint(-9F, -6F, 0F);
  57. Shape5.setTextureSize(128, 128);
  58. Shape5.mirror = true;
  59. setRotation(Shape5, 0F, 0F, 0F);
  60. Shape6 = new ModelRenderer(this, 72, 90);
  61. Shape6.addBox(0F, 0F, 0F, 6, 10, 6);
  62. Shape6.setRotationPoint(-13F, 0F, 1F);
  63. Shape6.setTextureSize(128, 128);
  64. Shape6.mirror = true;
  65. setRotation(Shape6, 0F, 0F, 0F);
  66. Shape7 = new ModelRenderer(this, 100, 90);
  67. Shape7.addBox(0F, 0F, 0F, 6, 10, 6);
  68. Shape7.setRotationPoint(7F, 0F, 1F);
  69. Shape7.setTextureSize(128, 128);
  70. Shape7.mirror = true;
  71. setRotation(Shape7, 0F, 0F, 0F);
  72. Shape8 = new ModelRenderer(this, 4, 93);
  73. Shape8.addBox(0F, 0F, 0F, 8, 14, 8);
  74. Shape8.setRotationPoint(-14F, 10F, 0F);
  75. Shape8.setTextureSize(128, 128);
  76. Shape8.mirror = true;
  77. setRotation(Shape8, 0F, 0F, 0F);
  78. Shape9 = new ModelRenderer(this, 4, 62);
  79. Shape9.addBox(0F, 0F, 0F, 8, 14, 8);
  80. Shape9.setRotationPoint(6F, 10F, 0F);
  81. Shape9.setTextureSize(128, 128);
  82. Shape9.mirror = true;
  83. setRotation(Shape9, 0F, 0F, 0F);
  84. Shape10 = new ModelRenderer(this, 4, 32);
  85. Shape10.addBox(5F, 0F, 0F, 8, 14, 8);
  86. Shape10.setRotationPoint(8F, -29F, 0F);
  87. Shape10.setTextureSize(128, 128);
  88. Shape10.mirror = true;
  89. setRotation(Shape10, 0F, 0F, 0F);
  90. Shape11 = new ModelRenderer(this, 6, 4);
  91. Shape11.addBox(0F, 0F, 0F, 8, 14, 8);
  92. Shape11.setRotationPoint(-21F, -29F, 0F);
  93. Shape11.setTextureSize(128, 128);
  94. Shape11.mirror = true;
  95. setRotation(Shape11, 0F, 0F, 0F);
  96. Shape12 = new ModelRenderer(this, 39, 51);
  97. Shape12.addBox(0F, 0F, 0F, 6, 26, 6);
  98. Shape12.setRotationPoint(-20F, -15F, 1F);
  99. Shape12.setTextureSize(128, 128);
  100. Shape12.mirror = true;
  101. setRotation(Shape12, 0F, 0F, 0F);
  102. Shape13 = new ModelRenderer(this, 44, 93);
  103. Shape13.addBox(0F, 0F, 0F, 6, 26, 6);
  104. Shape13.setRotationPoint(14F, -15F, 1F);
  105. Shape13.setTextureSize(128, 128);
  106. Shape13.mirror = true;
  107. setRotation(Shape13, 0F, 0F, 0F);
  108. }
  109.  
  110. public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  111. {
  112. super.render(entity, f, f1, f2, f3, f4, f5);
  113. setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  114. Shape1.render(f5);
  115. Shape2.render(f5);
  116. Shape3.render(f5);
  117. Shape4.render(f5);
  118. Shape5.render(f5);
  119. Shape6.render(f5);
  120. Shape7.render(f5);
  121. Shape8.render(f5);
  122. Shape9.render(f5);
  123. Shape10.render(f5);
  124. Shape11.render(f5);
  125. Shape12.render(f5);
  126. Shape13.render(f5);
  127. }
  128.  
  129. private void setRotation(ModelRenderer model, float x, float y, float z)
  130. {
  131. model.rotateAngleX = x;
  132. model.rotateAngleY = y;
  133. model.rotateAngleZ = z;
  134. }
  135.  
  136. public void setRotationAngles(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  137. {
  138. super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  139.  
  140. this.Shape1.rotateAngleX = f4 / (180F / (float)Math.PI);
  141. this.Shape1.rotateAngleY = f3 / (180F / (float)Math.PI);
  142. this.Shape6.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
  143. this.Shape7.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;
  144. this.Shape8.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
  145. this.Shape9.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;
  146. }
Advertisement
Add Comment
Please, Sign In to add comment