Advertisement
gegy1000

Untitled

Jan 14th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. package fiskfille.tf.model.transformer;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelBiped;
  5. import net.minecraft.client.model.ModelRenderer;
  6.  
  7. public class ModelChildBase
  8. {
  9. public static class Base extends ModelBase
  10. {
  11. public float pi = (float)Math.PI;
  12.  
  13. protected void addChildTo(ModelRenderer child, ModelRenderer parent)
  14. {
  15. child.rotationPointX -= parent.rotationPointX;
  16. child.rotationPointY -= parent.rotationPointY;
  17. child.rotationPointZ -= parent.rotationPointZ;
  18.  
  19. child.rotateAngleX -= parent.rotateAngleX;
  20. child.rotateAngleY -= parent.rotateAngleY;
  21. child.rotateAngleZ -= parent.rotateAngleZ;
  22. parent.addChild(child);
  23. }
  24.  
  25. protected void addChildToWithoutPoint(ModelRenderer child, ModelRenderer parent)
  26. {
  27. child.rotateAngleX -= parent.rotateAngleX;
  28. child.rotateAngleY -= parent.rotateAngleY;
  29. child.rotateAngleZ -= parent.rotateAngleZ;
  30. parent.addChild(child);
  31. }
  32. }
  33.  
  34. public static class Biped extends ModelBiped
  35. {
  36. public float pi = (float)Math.PI;
  37.  
  38. protected void addChildTo(ModelRenderer child, ModelRenderer parent)
  39. {
  40. child.rotationPointX -= parent.rotationPointX;
  41. child.rotationPointY -= parent.rotationPointY;
  42. child.rotationPointZ -= parent.rotationPointZ;
  43.  
  44. child.rotateAngleX -= parent.rotateAngleX;
  45. child.rotateAngleY -= parent.rotateAngleY;
  46. child.rotateAngleZ -= parent.rotateAngleZ;
  47. parent.addChild(child);
  48. }
  49.  
  50. protected void addChildToWithoutPoint(ModelRenderer child, ModelRenderer parent)
  51. {
  52. child.rotateAngleX -= parent.rotateAngleX;
  53. child.rotateAngleY -= parent.rotateAngleY;
  54. child.rotateAngleZ -= parent.rotateAngleZ;
  55. parent.addChild(child);
  56. }
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement