ModelHuman.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package me.km.entities;
  2. import com.mojang.blaze3d.platform.GlStateManager;
  3. import net.minecraft.client.renderer.entity.model.PlayerModel;
  4. public class ModelHuman extends PlayerModel<EntityHuman>
  5. {
  6. public ModelHuman(float modelSize, boolean smallArmsIn)
  7. {
  8. super(modelSize, smallArmsIn);
  9. }
  10. @Override
  11. public void render(EntityHuman ent, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
  12. {
  13. this.setRotationAngles(ent, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
  14. GlStateManager.pushMatrix();
  15. float factor = ent.getScale();
  16. GlStateManager.translatef(0.0F, -1.5f * factor + 1.5f, 0.0F);
  17. GlStateManager.scalef(factor, factor, factor);
  18. this.field_78116_c.render(scale);
  19. this.field_78115_e.render(scale);
  20. this.bipedRightArm.render(scale);
  21. this.bipedLeftArm.render(scale);
  22. this.bipedRightLeg.render(scale);
  23. this.bipedLeftLeg.render(scale);
  24. this.bipedHeadwear.render(scale);
  25. this.bipedLeftLegwear.render(scale);
  26. this.bipedRightLegwear.render(scale);
  27. this.bipedLeftArmwear.render(scale);
  28. this.bipedRightArmwear.render(scale);
  29. this.bipedBodyWear.render(scale);
  30. GlStateManager.popMatrix();
  31. }
  32. }