Advertisement
Guest User

Block Model

a guest
Nov 18th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 KB | None | 0 0
  1. package mod.xtronius.bc_mod.tileEntity.Model;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.entity.Entity;
  6.  
  7. public class ModelSifterVentalator extends ModelBase
  8. {
  9. //fields
  10. ModelRenderer BlockBottomWall;
  11. ModelRenderer BlockTopWall;
  12. ModelRenderer BlockLeftWall;
  13. ModelRenderer BlockRightWall;
  14. ModelRenderer FrontVent1;
  15. ModelRenderer FrontVent2;
  16. ModelRenderer FrontVent3;
  17. ModelRenderer FrontVent4;
  18. ModelRenderer FrontVent5;
  19. ModelRenderer BackPanel;
  20. ModelRenderer BackPanel2;
  21.  
  22. public ModelSifterVentalator()
  23. {
  24. textureWidth = 512;
  25. textureHeight = 512;
  26.  
  27. BlockBottomWall = new ModelRenderer(this, 0, 0);
  28. BlockBottomWall.addBox(0F, 0F, 0F, 16, 1, 16);
  29. BlockBottomWall.setRotationPoint(-8F, 23F, -8F);
  30. BlockBottomWall.setTextureSize(512, 512);
  31. BlockBottomWall.mirror = true;
  32. setRotation(BlockBottomWall, 0F, 0F, 0F);
  33. BlockTopWall = new ModelRenderer(this, 100, 0);
  34. BlockTopWall.addBox(0F, 0F, 0F, 16, 1, 16);
  35. BlockTopWall.setRotationPoint(-8F, 8F, -8F);
  36. BlockTopWall.setTextureSize(512, 512);
  37. BlockTopWall.mirror = true;
  38. setRotation(BlockTopWall, 0F, 0F, 0F);
  39. BlockLeftWall = new ModelRenderer(this, 200, 0);
  40. BlockLeftWall.addBox(0F, 0F, 0F, 1, 14, 16);
  41. BlockLeftWall.setRotationPoint(-8F, 9F, -8F);
  42. BlockLeftWall.setTextureSize(512, 512);
  43. BlockLeftWall.mirror = true;
  44. setRotation(BlockLeftWall, 0F, 0F, 0F);
  45. BlockRightWall = new ModelRenderer(this, 300, 0);
  46. BlockRightWall.addBox(0F, 0F, 0F, 1, 14, 16);
  47. BlockRightWall.setRotationPoint(7F, 9F, -8F);
  48. BlockRightWall.setTextureSize(512, 512);
  49. BlockRightWall.mirror = true;
  50. setRotation(BlockRightWall, 0F, 0F, 0F);
  51. FrontVent1 = new ModelRenderer(this, 400, 0);
  52. FrontVent1.addBox(0F, 0F, 0F, 14, 3, 0);
  53. FrontVent1.setRotationPoint(-7F, 8F, -8F);
  54. FrontVent1.setTextureSize(512, 512);
  55. FrontVent1.mirror = true;
  56. setRotation(FrontVent1, 0.7853982F, 0F, 0F);
  57. FrontVent2 = new ModelRenderer(this, 0, 100);
  58. FrontVent2.addBox(0F, 0F, 0F, 14, 3, 0);
  59. FrontVent2.setRotationPoint(-7F, 14F, -8F);
  60. FrontVent2.setTextureSize(512, 512);
  61. FrontVent2.mirror = true;
  62. setRotation(FrontVent2, 0.7853982F, 0F, 0F);
  63. FrontVent3 = new ModelRenderer(this, 100, 100);
  64. FrontVent3.addBox(0F, 0F, 0F, 14, 3, 0);
  65. FrontVent3.setRotationPoint(-7F, 11F, -8F);
  66. FrontVent3.setTextureSize(512, 512);
  67. FrontVent3.mirror = true;
  68. setRotation(FrontVent3, 0.7853982F, 0F, 0F);
  69. FrontVent4 = new ModelRenderer(this, 200, 100);
  70. FrontVent4.addBox(0F, 0F, 0F, 14, 3, 0);
  71. FrontVent4.setRotationPoint(-7F, 17F, -8F);
  72. FrontVent4.setTextureSize(512, 512);
  73. FrontVent4.mirror = true;
  74. setRotation(FrontVent4, 0.7853982F, 0F, 0F);
  75. FrontVent5 = new ModelRenderer(this, 300, 100);
  76. FrontVent5.addBox(0F, 0F, 0F, 14, 3, 0);
  77. FrontVent5.setRotationPoint(-7F, 20F, -8F);
  78. FrontVent5.setTextureSize(512, 512);
  79. FrontVent5.mirror = true;
  80. setRotation(FrontVent5, 0.7853982F, 0F, 0F);
  81. BackPanel = new ModelRenderer(this, 400, 100);
  82. BackPanel.addBox(0F, 0F, 0F, 1, 21, 1);
  83. BackPanel.setRotationPoint(7F, 8F, 6F);
  84. BackPanel.setTextureSize(512, 512);
  85. BackPanel.mirror = true;
  86. setRotation(BackPanel, 0F, 0F, 0.7853982F);
  87. BackPanel2 = new ModelRenderer(this, 500, 0);
  88. BackPanel2.addBox(0F, 0F, 0F, 1, 21, 1);
  89. BackPanel2.setRotationPoint(-8F, 9F, 6F);
  90. BackPanel2.setTextureSize(512, 512);
  91. BackPanel2.mirror = true;
  92. setRotation(BackPanel2, 0F, 0F, -0.7853982F);
  93. }
  94.  
  95. public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  96. {
  97. super.render(entity, f, f1, f2, f3, f4, f5);
  98. setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  99. BlockBottomWall.render(f5);
  100. BlockTopWall.render(f5);
  101. BlockLeftWall.render(f5);
  102. BlockRightWall.render(f5);
  103. FrontVent1.render(f5);
  104. FrontVent2.render(f5);
  105. FrontVent3.render(f5);
  106. FrontVent4.render(f5);
  107. FrontVent5.render(f5);
  108. BackPanel.render(f5);
  109. BackPanel2.render(f5);
  110. }
  111.  
  112. public void renderModel(float f){
  113. BlockBottomWall.render(f);
  114. BlockTopWall.render(f);
  115. BlockLeftWall.render(f);
  116. BlockRightWall.render(f);
  117. FrontVent1.render(f);
  118. FrontVent2.render(f);
  119. FrontVent3.render(f);
  120. FrontVent4.render(f);
  121. FrontVent5.render(f);
  122. BackPanel.render(f);
  123. BackPanel2.render(f);
  124. }
  125. private void setRotation(ModelRenderer model, float x, float y, float z)
  126. {
  127. model.rotateAngleX = x;
  128. model.rotateAngleY = y;
  129. model.rotateAngleZ = z;
  130. }
  131.  
  132. public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
  133. {
  134. super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  135. }
  136.  
  137. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement