Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. package ssp.client.part.model;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.entity.Entity;
  6.  
  7. /**
  8. * ModelDecoupler - gegy1000
  9. * Created using Tabula 4.0.0
  10. */
  11. public class ModelDecouplerSize1 extends PartModel
  12. {
  13. public ModelRenderer Back;
  14. public ModelRenderer Front;
  15. public ModelRenderer Left;
  16. public ModelRenderer Right;
  17. public ModelRenderer CornerBackLeft;
  18. public ModelRenderer CornerFrontRight;
  19. public ModelRenderer CornerBackRight;
  20. public ModelRenderer CornerFrontLeft;
  21. public ModelRenderer Strut1;
  22. public ModelRenderer Strut1_1;
  23.  
  24. public ModelDecouplerSize1()
  25. {
  26. this.textureWidth = 64;
  27. this.textureHeight = 32;
  28. this.CornerBackRight = new ModelRenderer(this, 0, 0);
  29. this.CornerBackRight.setRotationPoint(-5.0F, 22.0F, 4.0F);
  30. this.CornerBackRight.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1);
  31. this.Left = new ModelRenderer(this, 10, 5);
  32. this.Left.setRotationPoint(5.0F, 22.0F, 0.0F);
  33. this.Left.addBox(0.0F, 0.0F, -4.0F, 1, 2, 8);
  34. this.Strut1_1 = new ModelRenderer(this, 6, 17);
  35. this.Strut1_1.setRotationPoint(0.3F, 22.5F, -0.4F);
  36. this.Strut1_1.addBox(-0.5F, 0.0F, -5.5F, 1, 1, 12);
  37. this.setRotateAngle(Strut1_1, 0.0F, -0.7853981633974483F, 0.0F);
  38. this.Back = new ModelRenderer(this, 10, 0);
  39. this.Back.setRotationPoint(0.0F, 22.0F, 5.0F);
  40. this.Back.addBox(-4.0F, 0.0F, 0.0F, 8, 2, 1);
  41. this.Strut1 = new ModelRenderer(this, 6, 17);
  42. this.Strut1.setRotationPoint(-0.4F, 22.5F, -0.4F);
  43. this.Strut1.addBox(-0.5F, 0.0F, -5.5F, 1, 1, 12);
  44. this.setRotateAngle(Strut1, 0.0F, 0.7853981633974483F, 0.0F);
  45. this.CornerFrontLeft = new ModelRenderer(this, 0, 0);
  46. this.CornerFrontLeft.setRotationPoint(4.0F, 22.0F, -5.0F);
  47. this.CornerFrontLeft.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1);
  48. this.CornerFrontRight = new ModelRenderer(this, 0, 0);
  49. this.CornerFrontRight.setRotationPoint(-5.0F, 22.0F, -5.0F);
  50. this.CornerFrontRight.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1);
  51. this.Right = new ModelRenderer(this, 10, 5);
  52. this.Right.setRotationPoint(-6.0F, 22.0F, 0.0F);
  53. this.Right.addBox(0.0F, 0.0F, -4.0F, 1, 2, 8);
  54. this.Front = new ModelRenderer(this, 10, 0);
  55. this.Front.setRotationPoint(0.0F, 22.0F, -6.0F);
  56. this.Front.addBox(-4.0F, 0.0F, 0.0F, 8, 2, 1);
  57. this.CornerBackLeft = new ModelRenderer(this, 0, 0);
  58. this.CornerBackLeft.setRotationPoint(4.0F, 22.0F, 4.0F);
  59. this.CornerBackLeft.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1);
  60. }
  61.  
  62. @Override
  63. public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  64. {
  65. this.CornerBackRight.render(f5);
  66. this.Left.render(f5);
  67. this.Strut1_1.render(f5);
  68. this.Back.render(f5);
  69. this.Strut1.render(f5);
  70. this.CornerFrontLeft.render(f5);
  71. this.CornerFrontRight.render(f5);
  72. this.Right.render(f5);
  73. this.Front.render(f5);
  74. this.CornerBackLeft.render(f5);
  75. }
  76.  
  77. /**
  78. * This is a helper function from Tabula to set the rotation of model parts
  79. */
  80. public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
  81. {
  82. modelRenderer.rotateAngleX = x;
  83. modelRenderer.rotateAngleY = y;
  84. modelRenderer.rotateAngleZ = z;
  85. }
  86.  
  87. @Override
  88. public float getHeightForTranslation()
  89. {
  90. return 2 * 0.0625F;
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement