Advertisement
Guest User

Untitled

a guest
Mar 7th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.83 KB | None | 0 0
  1. package com.PolarFluid.mod.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 ModelTiny 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. ModelRenderer Shape14;
  25. ModelRenderer Shape15;
  26. ModelRenderer Shape16;
  27. ModelRenderer Shape17;
  28. ModelRenderer Shape18;
  29. ModelRenderer Shape19;
  30. ModelRenderer Shape20;
  31. ModelRenderer Shape21;
  32. ModelRenderer Shape22;
  33. ModelRenderer Shape23;
  34.  
  35. public ModelTiny()
  36. {
  37. textureWidth = 32;
  38. textureHeight = 32;
  39.  
  40. Shape1 = new ModelRenderer(this, 0, 5);
  41. Shape1.addBox(0F, 0F, 0F, 1, 1, 1);
  42. Shape1.setRotationPoint(0F, 23F, 0F);
  43. Shape1.setTextureSize(32, 32);
  44. Shape1.mirror = true;
  45. setRotation(Shape1, 0F, 0F, 0F);
  46. Shape2 = new ModelRenderer(this, 0, 7);
  47. Shape2.addBox(0F, 0F, 0F, 1, 1, 1);
  48. Shape2.setRotationPoint(0F, 22F, 2F);
  49. Shape2.setTextureSize(32, 32);
  50. Shape2.mirror = true;
  51. setRotation(Shape2, 0F, 0F, 0F);
  52. Shape3 = new ModelRenderer(this, 4, 7);
  53. Shape3.addBox(0F, 22F, 0F, 1, 1, 1);
  54. Shape3.setRotationPoint(0F, 0F, 0F);
  55. Shape3.setTextureSize(32, 32);
  56. Shape3.mirror = true;
  57. setRotation(Shape3, 0F, 0F, 0F);
  58. Shape4 = new ModelRenderer(this, 4, 5);
  59. Shape4.addBox(0F, 0F, 0F, 1, 1, 1);
  60. Shape4.setRotationPoint(0F, 23F, 2F);
  61. Shape4.setTextureSize(32, 32);
  62. Shape4.mirror = true;
  63. setRotation(Shape4, 0F, 0F, 0F);
  64. Shape5 = new ModelRenderer(this, 0, 9);
  65. Shape5.addBox(0F, 0F, 0F, 1, 1, 1);
  66. Shape5.setRotationPoint(0F, 22F, 1F);
  67. Shape5.setTextureSize(32, 32);
  68. Shape5.mirror = true;
  69. setRotation(Shape5, 0F, 0F, 0F);
  70. Shape6 = new ModelRenderer(this, 0, 11);
  71. Shape6.addBox(0F, 0F, 0F, 1, 1, 1);
  72. Shape6.setRotationPoint(0F, 21F, 0F);
  73. Shape6.setTextureSize(32, 32);
  74. Shape6.mirror = true;
  75. setRotation(Shape6, 0F, 0F, 0F);
  76. Shape7 = new ModelRenderer(this, 4, 9);
  77. Shape7.addBox(0F, 0F, 0F, 1, 1, 1);
  78. Shape7.setRotationPoint(0F, 20F, 0F);
  79. Shape7.setTextureSize(32, 32);
  80. Shape7.mirror = true;
  81. setRotation(Shape7, 0F, 0F, 0F);
  82. Shape8 = new ModelRenderer(this, 8, 0);
  83. Shape8.addBox(0F, 0F, 0F, 1, 1, 1);
  84. Shape8.setRotationPoint(0F, 21F, 1F);
  85. Shape8.setTextureSize(32, 32);
  86. Shape8.mirror = true;
  87. setRotation(Shape8, 0F, 0F, 0F);
  88. Shape9 = new ModelRenderer(this, 0, 13);
  89. Shape9.addBox(0F, 0F, 0F, 1, 1, 1);
  90. Shape9.setRotationPoint(0F, 21F, 2F);
  91. Shape9.setTextureSize(32, 32);
  92. Shape9.mirror = true;
  93. setRotation(Shape9, 0F, 0F, 0F);
  94. Shape10 = new ModelRenderer(this, 4, 11);
  95. Shape10.addBox(0F, 0F, 0F, 1, 1, 1);
  96. Shape10.setRotationPoint(0F, 20F, 1F);
  97. Shape10.setTextureSize(32, 32);
  98. Shape10.mirror = true;
  99. setRotation(Shape10, 0F, 0F, 0F);
  100. Shape11 = new ModelRenderer(this, 4, 13);
  101. Shape11.addBox(0F, 0F, 0F, 1, 1, 1);
  102. Shape11.setRotationPoint(0F, 20F, 2F);
  103. Shape11.setTextureSize(32, 32);
  104. Shape11.mirror = true;
  105. setRotation(Shape11, 0F, 0F, 0F);
  106. Shape12 = new ModelRenderer(this, 4, 15);
  107. Shape12.addBox(0F, 0F, 0F, 1, 1, 1);
  108. Shape12.setRotationPoint(0F, 20F, 3F);
  109. Shape12.setTextureSize(32, 32);
  110. Shape12.mirror = true;
  111. setRotation(Shape12, 0F, 0F, 0F);
  112. Shape13 = new ModelRenderer(this, 0, 15);
  113. Shape13.addBox(0F, 0F, 0F, 1, 1, 1);
  114. Shape13.setRotationPoint(0F, 20F, -1F);
  115. Shape13.setTextureSize(32, 32);
  116. Shape13.mirror = true;
  117. setRotation(Shape13, 0F, 0F, 0F);
  118. Shape14 = new ModelRenderer(this, 14, 0);
  119. Shape14.addBox(0F, 0F, 0F, 1, 1, 1);
  120. Shape14.setRotationPoint(0F, 19F, 0F);
  121. Shape14.setTextureSize(32, 32);
  122. Shape14.mirror = true;
  123. setRotation(Shape14, 0F, 0F, 0F);
  124. Shape15 = new ModelRenderer(this, 0, 17);
  125. Shape15.addBox(0F, 0F, 0F, 1, 1, 1);
  126. Shape15.setRotationPoint(0F, 18F, 0F);
  127. Shape15.setTextureSize(32, 32);
  128. Shape15.mirror = true;
  129. setRotation(Shape15, 0F, 0F, 0F);
  130. Shape16 = new ModelRenderer(this, 4, 17);
  131. Shape16.addBox(0F, 0F, 0F, 1, 1, 1);
  132. Shape16.setRotationPoint(0F, 19F, 1F);
  133. Shape16.setTextureSize(32, 32);
  134. Shape16.mirror = true;
  135. setRotation(Shape16, 0F, 0F, 0F);
  136. Shape17 = new ModelRenderer(this, 18, 0);
  137. Shape17.addBox(0F, 0F, 0F, 1, 1, 1);
  138. Shape17.setRotationPoint(0F, 19F, 2F);
  139. Shape17.setTextureSize(32, 32);
  140. Shape17.mirror = true;
  141. setRotation(Shape17, 0F, 0F, 0F);
  142. Shape18 = new ModelRenderer(this, 0, 19);
  143. Shape18.addBox(0F, 0F, 0F, 1, 1, 1);
  144. Shape18.setRotationPoint(0F, 18F, 1F);
  145. Shape18.setTextureSize(32, 32);
  146. Shape18.mirror = true;
  147. setRotation(Shape18, 0F, 0F, 0F);
  148. Shape19 = new ModelRenderer(this, 0, 21);
  149. Shape19.addBox(0F, 0F, 0F, 1, 1, 1);
  150. Shape19.setRotationPoint(0F, 18F, 2F);
  151. Shape19.setTextureSize(32, 32);
  152. Shape19.mirror = true;
  153. setRotation(Shape19, 0F, 0F, 0F);
  154. Shape20 = new ModelRenderer(this, 4, 19);
  155. Shape20.addBox(0F, 0F, 0F, 1, 1, 1);
  156. Shape20.setRotationPoint(0F, 17F, 0F);
  157. Shape20.setTextureSize(32, 32);
  158. Shape20.mirror = true;
  159. setRotation(Shape20, 0F, 0F, 0F);
  160. Shape21 = new ModelRenderer(this, 4, 21);
  161. Shape21.addBox(0F, 0F, 0F, 1, 1, 1);
  162. Shape21.setRotationPoint(0F, 16F, 0F);
  163. Shape21.setTextureSize(32, 32);
  164. Shape21.mirror = true;
  165. setRotation(Shape21, 0F, 0F, 0F);
  166. Shape22 = new ModelRenderer(this, 0, 23);
  167. Shape22.addBox(0F, 0F, 0F, 1, 1, 1);
  168. Shape22.setRotationPoint(0F, 17F, 2F);
  169. Shape22.setTextureSize(32, 32);
  170. Shape22.mirror = true;
  171. setRotation(Shape22, 0F, 0F, 0F);
  172. Shape23 = new ModelRenderer(this, 4, 23);
  173. Shape23.addBox(0F, 0F, 0F, 1, 1, 1);
  174. Shape23.setRotationPoint(0F, 16F, 2F);
  175. Shape23.setTextureSize(32, 32);
  176. Shape23.mirror = true;
  177. setRotation(Shape23, 0F, 0F, 0F);
  178. }
  179.  
  180. public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  181. {
  182. super.render(entity, f, f1, f2, f3, f4, f5);
  183. setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  184. Shape1.render(f5);
  185. Shape2.render(f5);
  186. Shape3.render(f5);
  187. Shape4.render(f5);
  188. Shape5.render(f5);
  189. Shape6.render(f5);
  190. Shape7.render(f5);
  191. Shape8.render(f5);
  192. Shape9.render(f5);
  193. Shape10.render(f5);
  194. Shape11.render(f5);
  195. Shape12.render(f5);
  196. Shape13.render(f5);
  197. Shape14.render(f5);
  198. Shape15.render(f5);
  199. Shape16.render(f5);
  200. Shape17.render(f5);
  201. Shape18.render(f5);
  202. Shape19.render(f5);
  203. Shape20.render(f5);
  204. Shape21.render(f5);
  205. Shape22.render(f5);
  206. Shape23.render(f5);
  207. }
  208.  
  209. private void setRotation(ModelRenderer model, float x, float y, float z)
  210. {
  211. model.rotateAngleX = x;
  212. model.rotateAngleY = y;
  213. model.rotateAngleZ = z;
  214. }
  215.  
  216. public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
  217. {
  218. super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  219.  
  220. this.Shape4.rotateAngleZ = 0.0F;
  221. this.Shape3.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;
  222. this.Shape2.rotateAngleY = 0.0F;
  223. this.Shape1.rotateAngleY = 0.0F;
  224.  
  225. }
  226.  
  227. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement