Advertisement
fgdffg

Untitled

Aug 4th, 2022
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1.  
  2. public class hat extends EntityModel<Entity> {
  3. private final ModelRenderer Head;
  4.  
  5. public hat() {
  6. textureWidth = 64;
  7. textureHeight = 64;
  8.  
  9. Head = new ModelRenderer(this);
  10. Head.setRotationPoint(0.0F, 0.0F, 0.0F);
  11. Head.setTextureOffset(0, 0).addBox(-5.0F, -10.0F, -6.0F, 10.0F, 2.0F, 10.0F, 0.0F, false);
  12. }
  13.  
  14. @Override
  15. public void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){
  16. //previously the render function, render code was moved to a method below
  17. }
  18.  
  19. @Override
  20. public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
  21. Head.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha);
  22. }
  23.  
  24. public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
  25. modelRenderer.rotateAngleX = x;
  26. modelRenderer.rotateAngleY = y;
  27. modelRenderer.rotateAngleZ = z;
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement