grossik

Untitled

Jul 31st, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. package cz.grossik.farmcraft2.crushing;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5.  
  6. public class ModelCrushing extends ModelBase
  7. {
  8. public ModelRenderer spodek;
  9. public ModelRenderer stena1;
  10. public ModelRenderer stena2;
  11. public ModelRenderer stena3;
  12. public ModelRenderer stena4;
  13. public ModelRenderer drtic1;
  14. public ModelRenderer drtic2;
  15. public ModelRenderer drtic3;
  16. public ModelRenderer drtic4;
  17. public ModelRenderer drtic5;
  18. public ModelRenderer Shape1;
  19.  
  20. public ModelCrushing()
  21. {
  22. this.textureWidth = 128;
  23. this.textureHeight = 256;
  24.  
  25. this.spodek = new ModelRenderer(this, 34, 0);
  26. this.spodek.addBox(0F, 0F, 0F, 16, 1, 16);
  27. this.spodek.setRotationPoint(-8F, 23F, -8F);
  28. this.spodek.setTextureSize(128, 256);
  29. this.spodek.mirror = true;
  30. setRotation(this.spodek, 0F, 0F, 0F);
  31. this.stena1 = new ModelRenderer(this, 0, 27);
  32. this.stena1.addBox(0F, 0F, 0F, 16, 8, 1);
  33. this.stena1.setRotationPoint(-8F, 15F, -8F);
  34. this.stena1.setTextureSize(128, 256);
  35. this.stena1.mirror = true;
  36. setRotation(this.stena1, 0F, 0F, 0F);
  37. this.stena2 = new ModelRenderer(this, 0, 39);
  38. this.stena2.addBox(0F, 0F, 0F, 1, 8, 16);
  39. this.stena2.setRotationPoint(-8F, 15F, -8F);
  40. this.stena2.setTextureSize(128, 256);
  41. this.stena2.mirror = true;
  42. setRotation(this.stena2, 0F, 0F, 0F);
  43. this.stena3 = new ModelRenderer(this, 0, 66);
  44. this.stena3.addBox(0F, 0F, 0F, 1, 8, 16);
  45. this.stena3.setRotationPoint(7F, 15F, -8F);
  46. this.stena3.setTextureSize(128, 256);
  47. this.stena3.mirror = true;
  48. setRotation(this.stena3, 0F, 0F, 0F);
  49. this.stena4 = new ModelRenderer(this, 0, 0);
  50. this.stena4.addBox(0F, 0F, 0F, 16, 8, 1);
  51. this.stena4.setRotationPoint(-8F, 15F, 7F);
  52. this.stena4.setTextureSize(128, 256);
  53. this.stena4.mirror = true;
  54. setRotation(this.stena4, 0F, 0F, 0F);
  55. this.drtic1 = new ModelRenderer(this, 0, 93);
  56. this.drtic1.addBox(0F, 0F, 0F, 1, 7, 1);
  57. this.drtic1.setRotationPoint(-8F, 8F, 7F);
  58. this.drtic1.setTextureSize(128, 256);
  59. this.drtic1.mirror = true;
  60. setRotation(this.drtic1, 0F, 0F, 0F);
  61. this.drtic2 = new ModelRenderer(this, 4, 93);
  62. this.drtic2.addBox(0F, 0F, 0F, 1, 7, 1);
  63. this.drtic2.setRotationPoint(7F, 8F, 7F);
  64. this.drtic2.setTextureSize(128, 256);
  65. this.drtic2.mirror = true;
  66. setRotation(this.drtic2, 0F, 0F, 0F);
  67. this.drtic3 = new ModelRenderer(this, 8, 93);
  68. this.drtic3.addBox(0F, 0F, 0F, 1, 7, 1);
  69. this.drtic3.setRotationPoint(-8F, 8F, -8F);
  70. this.drtic3.setTextureSize(128, 256);
  71. this.drtic3.mirror = true;
  72. setRotation(this.drtic3, 0F, 0F, 0F);
  73. this.drtic4 = new ModelRenderer(this, 12, 93);
  74. this.drtic4.addBox(0F, 0F, 0F, 1, 7, 1);
  75. this.drtic4.setRotationPoint(7F, 8F, -8F);
  76. this.drtic4.setTextureSize(128, 256);
  77. this.drtic4.mirror = true;
  78. setRotation(this.drtic4, 0F, 0F, 0F);
  79. this.drtic5 = new ModelRenderer(this, 0, 104);
  80. this.drtic5.addBox(0F, 0F, 0F, 16, 4, 16);
  81. this.drtic5.setRotationPoint(-8F, 6F, -8F);
  82. this.drtic5.setTextureSize(128, 256);
  83. this.drtic5.mirror = true;
  84. setRotation(this.drtic5, 0F, 0F, 0F);
  85. this.Shape1 = new ModelRenderer(this, 0, 126);
  86. this.Shape1.addBox(0F, 0F, 0F, 14, 1, 14);
  87. this.Shape1.setRotationPoint(-7F, 10F, -7F);
  88. this.Shape1.setTextureSize(128, 256);
  89. this.Shape1.mirror = true;
  90. setRotation(this.Shape1, 0F, 0F, 0F);
  91. }
  92.  
  93. public void render(TileEntityCrushing te, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
  94. {
  95. this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, te);
  96. float f5 = 0.0625F;
  97. this.Shape1.render(f5);
  98. this.drtic5.render(f5);
  99. this.drtic4.render(f5);
  100. this.drtic3.render(f5);
  101. this.drtic2.render(f5);
  102. this.drtic1.render(f5);
  103. this.stena4.render(f5);
  104. this.stena3.render(f5);
  105. this.stena2.render(f5);
  106. this.stena1.render(f5);
  107. this.spodek.render(f5);
  108. }
  109.  
  110. private void setRotation(ModelRenderer model, float x, float y, float z)
  111. {
  112. model.rotateAngleX = x;
  113. model.rotateAngleY = y;
  114. model.rotateAngleZ = z;
  115. }
  116.  
  117. public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, TileEntityCrushing entityIn)
  118. {
  119. TileEntityCrushing te = new TileEntityCrushing();
  120. if(te.isBurning() == true)
  121. {
  122. this.drtic5.offsetY = 2.0F;
  123. }
  124. }
  125. }
Advertisement
Add Comment
Please, Sign In to add comment