TsarHydrantine

ArmorModel

Dec 26th, 2020
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. package com.tsarhydrantine.tsbase.tsItems.tsToolAndArmor.FrostburniteArmor;
  2.  
  3. import net.minecraft.client.renderer.entity.model.BipedModel;
  4. import net.minecraft.client.renderer.model.ModelRenderer;
  5. import net.minecraft.entity.LivingEntity;
  6. import net.minecraft.util.math.MathHelper;
  7.  
  8. public class FrostburniteArmorModel extends BipedModel<LivingEntity>{
  9.  
  10. private final ModelRenderer FrostBurnShield1;
  11. private final ModelRenderer FrostBurnShield2;
  12.  
  13. public FrostburniteArmorModel(float size) {
  14. super(size, 0.0F, 64, 64);
  15.  
  16. FrostBurnShield1 = new ModelRenderer(this, 0, 54); //Texture Offset X and Y
  17. FrostBurnShield1.addBox(-2.5F, 0.0F, -8.0F, 5.0F, 8.0F, 2.0F);
  18. bipedBody.addChild(FrostBurnShield1);
  19.  
  20. FrostBurnShield2 = new ModelRenderer(this, 0, 54); //Texture Offset X and Y
  21. FrostBurnShield2.addBox(-2.5F, 0.0F, 8.0F, 5.0F, 8.0F, 2.0F);
  22. bipedBody.addChild(FrostBurnShield2);
  23. }
  24.  
  25. @Override
  26. public void setRotationAngles(LivingEntity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
  27. super.setRotationAngles(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
  28. float f = ageInTicks * (float) Math.PI * -0.1F;
  29.  
  30. setRotationPoints(this.FrostBurnShield1, -2.0F + MathHelper.cos(((float) (4) + ageInTicks) * 0.25F), MathHelper.cos(f) * 9.0F, MathHelper.sin(f) * 9.0F);
  31. setRotationPoints(this.FrostBurnShield2, -2.0F + MathHelper.cos(((float) (8) + ageInTicks) * 0.25F), MathHelper.cos(f) * 9.0F, MathHelper.sin(f) * 9.0F);
  32.  
  33. ++f;
  34. }
  35.  
  36. @Override
  37. public void setModelAttributes(BipedModel<LivingEntity> modelIn) {
  38. super.setModelAttributes(modelIn);
  39. }
  40.  
  41. public void setRotationPoints(ModelRenderer renderer, float x, float y, float z) {
  42. renderer.rotationPointX = x;
  43. renderer.rotationPointY = y;
  44. renderer.rotationPointZ = z;
  45. }
  46.  
  47. public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
  48. modelRenderer.rotateAngleX = x;
  49. modelRenderer.rotateAngleY = y;
  50. modelRenderer.rotateAngleZ = z;
  51. }
  52.  
  53. }
  54.  
Advertisement
Add Comment
Please, Sign In to add comment