Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.21 KB | None | 0 0
  1. package be.dow1t.craftafus.client.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 ModelArakne
  9. extends ModelBase
  10. {
  11. ModelRenderer a = new ModelRenderer(this, 0, 0);
  12. ModelRenderer b;
  13. ModelRenderer c;
  14. ModelRenderer d;
  15. ModelRenderer e;
  16. ModelRenderer f;
  17. ModelRenderer g;
  18. ModelRenderer h;
  19. ModelRenderer i;
  20. ModelRenderer j;
  21. ModelRenderer k;
  22. ModelRenderer l;
  23. ModelRenderer m;
  24. ModelRenderer n;
  25. ModelRenderer o;
  26.  
  27. public ModelArakne()
  28. {
  29. this.textureWidth = 64;
  30. this.textureHeight = 32;
  31.  
  32. this.a.addBox(-3.5F, -3.5F, -3.5F, 7, 7, 7);
  33. this.a.setRotationPoint(0.0F, 17.0F, 0.0F);
  34. this.a.setTextureSize(64, 32);
  35. this.a.mirror = true;
  36. setRotation(this.a, 0.0F, 0.0F, 0.0F);
  37. this.b = new ModelRenderer(this, 0, 14);
  38. this.b.addBox(0.0F, 0.0F, -1.0F, 3, 2, 2);
  39. this.b.setRotationPoint(2.0F, 22.0F, -2.0F);
  40. this.b.setTextureSize(64, 32);
  41. this.b.mirror = true;
  42. setRotation(this.b, 0.0F, 0.4089647F, 0.0F);
  43. this.c = new ModelRenderer(this, 0, 14);
  44. this.c.addBox(0.0F, 0.0F, -1.0F, 3, 2, 2);
  45. this.c.setRotationPoint(2.0F, 22.0F, 2.0F);
  46. this.c.setTextureSize(64, 32);
  47. this.c.mirror = true;
  48. setRotation(this.c, 0.0F, -0.5948578F, 0.0F);
  49. this.d = new ModelRenderer(this, 0, 18);
  50. this.d.addBox(-3.0F, 0.0F, -1.0F, 3, 2, 2);
  51. this.d.setRotationPoint(-2.0F, 22.0F, 2.0F);
  52. this.d.setTextureSize(64, 32);
  53. this.d.mirror = true;
  54. setRotation(this.d, 0.0F, 0.3346075F, 0.0F);
  55. this.e = new ModelRenderer(this, 0, 18);
  56. this.e.addBox(-3.0F, 0.0F, -1.0F, 3, 2, 2);
  57. this.e.setRotationPoint(-2.0F, 22.0F, -2.0F);
  58. this.e.setTextureSize(64, 32);
  59. this.e.mirror = true;
  60. setRotation(this.e, 0.0F, -0.5402259F, 0.0F);
  61. this.f = new ModelRenderer(this, 10, 14);
  62. this.f.addBox(-2.5F, -2.5F, -5.0F, 5, 3, 1);
  63. this.f.setRotationPoint(0.0F, 17.0F, 0.0F);
  64. this.f.setTextureSize(64, 32);
  65. this.f.mirror = true;
  66. setRotation(this.f, 0.0F, 0.0F, 0.0F);
  67. this.g = new ModelRenderer(this, 22, 14);
  68. this.g.addBox(-2.5F, 1.0F, -4.5F, 1, 2, 1);
  69. this.g.setRotationPoint(0.0F, 17.0F, 0.0F);
  70. this.g.setTextureSize(64, 32);
  71. this.g.mirror = true;
  72. setRotation(this.g, 0.0F, 0.0F, 0.1047198F);
  73. this.h = new ModelRenderer(this, 22, 14);
  74. this.h.addBox(1.5F, 1.0F, -4.5F, 1, 2, 1);
  75. this.h.setRotationPoint(0.0F, 17.0F, 0.0F);
  76. this.h.setTextureSize(64, 32);
  77. this.h.mirror = true;
  78. setRotation(this.h, 0.0F, 0.0F, -0.1047198F);
  79. this.i = new ModelRenderer(this, 22, 14);
  80. this.i.addBox(-0.5F, 1.0F, -4.5F, 1, 2, 1);
  81. this.i.setRotationPoint(0.0F, 17.0F, 0.0F);
  82. this.i.setTextureSize(64, 32);
  83. this.i.mirror = true;
  84. setRotation(this.i, 0.0F, 0.0F, 0.0F);
  85. this.j = new ModelRenderer(this, 39, 22);
  86. this.j.addBox(-3.0F, -4.0F, -3.0F, 6, 1, 6);
  87. this.j.setRotationPoint(0.0F, 17.0F, 0.0F);
  88. this.j.setTextureSize(64, 32);
  89. this.j.mirror = true;
  90. setRotation(this.j, 0.0F, 0.0F, 0.0F);
  91. this.k = new ModelRenderer(this, 49, 0);
  92. this.k.addBox(-3.0F, -3.0F, 3.0F, 6, 6, 1);
  93. this.k.setRotationPoint(0.0F, 17.0F, 0.0F);
  94. this.k.setTextureSize(64, 32);
  95. this.k.mirror = true;
  96. setRotation(this.k, 0.0F, 0.0F, 0.0F);
  97. this.l = new ModelRenderer(this, 34, 0);
  98. this.l.addBox(3.0F, -3.0F, -3.0F, 1, 6, 6);
  99. this.l.setRotationPoint(0.0F, 17.0F, 0.0F);
  100. this.l.setTextureSize(64, 32);
  101. this.l.mirror = true;
  102. setRotation(this.l, 0.0F, 0.0F, 0.0F);
  103. this.m = new ModelRenderer(this, 34, 0);
  104. this.m.addBox(-4.0F, -3.0F, -3.0F, 1, 6, 6);
  105. this.m.setRotationPoint(0.0F, 17.0F, 0.0F);
  106. this.m.setTextureSize(64, 32);
  107. this.m.mirror = true;
  108. setRotation(this.m, 0.0F, 0.0F, 0.0F);
  109. this.n = new ModelRenderer(this, 39, 13);
  110. this.n.addBox(-3.0F, 3.0F, -3.0F, 6, 1, 6);
  111. this.n.setRotationPoint(0.0F, 17.0F, 0.0F);
  112. this.n.setTextureSize(64, 32);
  113. this.n.mirror = true;
  114. setRotation(this.n, 0.0F, 0.0F, 0.0F);
  115. this.o = new ModelRenderer(this, 49, 0);
  116. this.o.addBox(-3.0F, -3.0F, -4.0F, 6, 6, 1);
  117. this.o.setRotationPoint(0.0F, 17.0F, 0.0F);
  118. this.o.setTextureSize(64, 32);
  119. this.o.mirror = true;
  120. setRotation(this.o, 0.0F, 0.0F, 0.0F);
  121. }
  122.  
  123. public void render(Entity paramEntity, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6)
  124. {
  125. super.render(paramEntity, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6);
  126. setRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity);
  127. this.a.render(paramFloat6);
  128. this.b.render(paramFloat6);
  129. this.c.render(paramFloat6);
  130. this.d.render(paramFloat6);
  131. this.e.render(paramFloat6);
  132. this.f.render(paramFloat6);
  133. this.g.render(paramFloat6);
  134. this.h.render(paramFloat6);
  135. this.i.render(paramFloat6);
  136. this.j.render(paramFloat6);
  137. this.k.render(paramFloat6);
  138. this.l.render(paramFloat6);
  139. this.m.render(paramFloat6);
  140. this.n.render(paramFloat6);
  141. this.o.render(paramFloat6);
  142. }
  143.  
  144. private void setRotation(ModelRenderer paramModelRenderer, float paramFloat1, float paramFloat2, float paramFloat3)
  145. {
  146. paramModelRenderer.rotateAngleX = paramFloat1;
  147. paramModelRenderer.rotateAngleY = paramFloat2;
  148. paramModelRenderer.rotateAngleZ = paramFloat3;
  149. }
  150.  
  151. public void setRotationAngles(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, Entity paramEntity)
  152. {
  153. super.setRotationAngles(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramEntity);
  154. this.b.offsetZ = (MathHelper.cos(paramFloat1 * 1.9F + 3.1415927F) * 0.5F * paramFloat2 * 0.4F);
  155. this.c.offsetZ = (MathHelper.cos(paramFloat1 * 1.9F + 3.1415927F) * -0.5F * paramFloat2 * 0.4F);
  156. this.d.offsetZ = (MathHelper.cos(paramFloat1 * 1.9F + 3.1415927F) * -0.5F * paramFloat2 * 0.4F);
  157. this.e.offsetZ = (MathHelper.cos(paramFloat1 * 1.9F + 3.1415927F) * 0.5F * paramFloat2 * 0.4F);
  158. }
  159. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement