Guest User

Untitled

a guest
Dec 9th, 2018
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. /*
  2. * This document is Copyright ©(2018) of MaxIsHot (hereafter referred to as "The Owner") and is the intellectual property of The Owner.
  3. * It may be not be reproduced under any circumstances except for personal, private use as long as it remains in its unaltered, unedited form.
  4. * Use of this mod on any other website or as a part of any public display is strictly prohibited, and a violation of copyright.
  5. */
  6.  
  7. package net.arsenalnetwork.arsenalmod.client.model;
  8.  
  9. import net.arsenalnetwork.arsenalmod.client.tmt.ModelRendererTurbo;
  10. import net.minecraft.client.model.ModelRenderer;
  11. import net.minecraft.entity.Entity;
  12.  
  13. public class ModelCombatKnife extends TmtModel
  14. {
  15. public ModelCombatKnife()
  16. {
  17. int textureX = 16;
  18. int textureY = 8;
  19.  
  20. model = new ModelRendererTurbo[3];
  21.  
  22. model[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
  23. model[0].addBox(-4F, -1F, -0.7F, 3, 2, 1.4F);
  24.  
  25. model[1] = new ModelRendererTurbo(this, 10, 0, textureX, textureY);
  26. model[1].addBox(-1F, -1.5F, -1F, 1, 3, 2);
  27.  
  28. model[2] = new ModelRendererTurbo(this, 0, 5, textureX, textureY);
  29. model[2].addShapeBox(0F, -1F, -0.5F, 5, 2, 1, 0F, /* 0 */ 0F, 0F, 0F, /* 1 */ -1F, 0F, 0F, /* 2 */ -1F, 0F, 0F, /* 3 */ 0F, 0F, 0F, /* 4 */ 0F, 0F, 0F, /* 5 */ 0F, 0F, 0F, /* 6 */ 0F, 0F, 0F, /* 7 */ 0F, 0F, 0F);
  30.  
  31. for(int i = 0; i < 3; i++)
  32. model[i].setRotationPoint(4F, 0F, 0F);
  33. }
  34.  
  35. @Override
  36. public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
  37. {
  38. super.render(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
  39. setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn);
  40. model[0].render(scale);
  41. model[1].render(scale);
  42. model[2].render(scale);
  43. }
  44.  
  45. @Override
  46. public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
  47. {
  48. super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
  49. }
  50.  
  51. private void setRotation(ModelRenderer model, float x, float y, float z) {
  52. model.rotateAngleX = x;
  53. model.rotateAngleY = y;
  54. model.rotateAngleZ = z;
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment