Guest User

Model

a guest
Dec 8th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. package BlocksPers;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5.  
  6. public class ModelFlagSpawn extends ModelBase
  7. {
  8. //fields
  9. ModelRenderer Shape1;
  10. ModelRenderer Shape2;
  11. ModelRenderer Shape3;
  12. ModelRenderer Shape4;
  13. ModelRenderer Shape5;
  14. ModelRenderer Shape6;
  15. ModelRenderer Shape7;
  16. ModelRenderer Shape8;
  17. ModelRenderer Shape9;
  18.  
  19. public ModelFlagSpawn()
  20. {
  21. textureWidth = 128;
  22. textureHeight = 128;
  23.  
  24. Shape1 = new ModelRenderer(this, 0, 0);
  25. Shape1.addBox(0F, 0F, 0F, 34, 2, 2);
  26. Shape1.setRotationPoint(-24F, -1F, 0F);
  27. Shape1.setTextureSize(128, 128);
  28. Shape1.mirror = true;
  29. setRotation(Shape1, 0F, 0F, 0F);
  30. Shape2 = new ModelRenderer(this, 0, 20);
  31. Shape2.addBox(0F, 0F, 0F, 1, 14, 2);
  32. Shape2.setRotationPoint(-8F, 0F, 0F);
  33. Shape2.setTextureSize(128, 128);
  34. Shape2.mirror = true;
  35. setRotation(Shape2, 0F, 0F, 0F);
  36. Shape3 = new ModelRenderer(this, 0, 20);
  37. Shape3.addBox(0F, 0F, 0F, 1, 14, 2);
  38. Shape3.setRotationPoint(8F, 0F, 0F);
  39. Shape3.setTextureSize(128, 128);
  40. Shape3.mirror = true;
  41. setRotation(Shape3, 0F, 0F, 0F);
  42. Shape4 = new ModelRenderer(this, 0, 0);
  43. Shape4.addBox(0F, 0F, 0F, 1, 1, 1);
  44. Shape4.setRotationPoint(0F, 0F, 0F);
  45. Shape4.setTextureSize(128, 128);
  46. Shape4.mirror = true;
  47. setRotation(Shape4, 0F, 0F, 0F);
  48. Shape5 = new ModelRenderer(this, 0, 20);
  49. Shape5.addBox(0F, 0F, 0F, 1, 12, 2);
  50. Shape5.setRotationPoint(-8F, 14F, 0F);
  51. Shape5.setTextureSize(128, 128);
  52. Shape5.mirror = true;
  53. setRotation(Shape5, 0F, 0F, -0.7853982F);
  54. Shape6 = new ModelRenderer(this, 0, 20);
  55. Shape6.addBox(0F, 0F, 0F, 1, 12, 2);
  56. Shape6.setRotationPoint(8.3F, 13.3F, 0F);
  57. Shape6.setTextureSize(128, 128);
  58. Shape6.mirror = true;
  59. setRotation(Shape6, 0F, 0F, 0.7853982F);
  60. Shape7 = new ModelRenderer(this, 30, 20);
  61. Shape7.addBox(1F, 0F, 0F, 15, 14, 1);
  62. Shape7.setRotationPoint(-8F, 1F, 0.5F);
  63. Shape7.setTextureSize(128, 128);
  64. Shape7.mirror = true;
  65. setRotation(Shape7, 0F, 0F, 0F);
  66. Shape8 = new ModelRenderer(this, 30, 40);
  67. Shape8.addBox(0F, 0F, 0F, 9, 7, 1);
  68. Shape8.setRotationPoint(-1F, 10F, 0.6F);
  69. Shape8.setTextureSize(128, 128);
  70. Shape8.mirror = true;
  71. setRotation(Shape8, 0F, 0F, 0.7853982F);
  72. Shape9 = new ModelRenderer(this, 60, 40);
  73. Shape9.addBox(0F, 0F, 0F, 3, 3, 1);
  74. Shape9.setRotationPoint(3F, 15F, 0.6F);
  75. Shape9.setTextureSize(128, 128);
  76. Shape9.mirror = true;
  77. setRotation(Shape9, 0F, 0F, -0.7853982F);
  78. }
  79.  
  80. public void renderAll()
  81. {
  82. Shape1.render(0.0625F);
  83. Shape2.render(0.0625F);
  84. Shape3.render(0.0625F);
  85. Shape4.render(0.0625F);
  86. Shape5.render(0.0625F);
  87. Shape6.render(0.0625F);
  88. Shape7.render(0.0625F);
  89. Shape8.render(0.0625F);
  90. Shape9.render(0.0625F);
  91. }
  92.  
  93. private void setRotation(ModelRenderer model, float x, float y, float z)
  94. {
  95. model.rotateAngleX = x;
  96. model.rotateAngleY = y;
  97. model.rotateAngleZ = z;
  98. }
  99.  
  100. public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
  101. {
  102. }
  103.  
  104. }
Add Comment
Please, Sign In to add comment