Java models crash the game

Started by Meanbean on

Topic category: Troubleshooting, bugs, and solutions

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Java models crash the game

I am having trouble with making entities. I'm trying to use a java model that i created for a deer, but it crashes everytime I try to open it in minecraft. However, when i change the model to something built in like the brite, it works. Problem is, it shows up as a humanoid creature rather than the deer shape i wanted. Is there a way to fix this? Thanks for reading.

Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Post code of this model on…
Sun, 09/29/2019 - 19:31

Post code of this model on Pastebin

 

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
// Date: 9/28/2019 10:21:29…
Tue, 10/01/2019 - 20:41
  1. // Date: 9/28/2019 10:21:29 PM

  2. // Template version 1.1

  3. // Java generated by Techne

  4. // Keep in mind that you still need to fill in some blanks

  5. // - ZeuX

  6.  

  7.  

  8.  

  9.  

  10.  

  11.  

  12. package net.minecraft.src;

  13.  

  14. public class ModelDeer extends ModelBase

  15. {

  16.   //fields

  17.     ModelRenderer antler6;

  18.     ModelRenderer head;

  19.     ModelRenderer body;

  20.     ModelRenderer leg1;

  21.     ModelRenderer leg2;

  22.     ModelRenderer leg3;

  23.     ModelRenderer leg4;

  24.     ModelRenderer antler1;

  25.     ModelRenderer antler2;

  26.     ModelRenderer antler3;

  27.     ModelRenderer antler4;

  28.     ModelRenderer antler5;

  29.  

  30.   public ModelDeer()

  31.   {

  32.     textureWidth = 64;

  33.     textureHeight = 32;

  34.    

  35.       antler6.mirror = true;

  36.       antler6 = new ModelRenderer(this, 60, 0);

  37.       antler6.addBox(0F, 0F, 0F, 1, 3, 1);

  38.       antler6.setRotationPoint(1F, 2F, -7F);

  39.       antler6.setTextureSize(64, 32);

  40.       antler6.mirror = true;

  41.       setRotation(antler6, 0F, 0F, 0F);

  42.       antler6.mirror = false;

  43.       head = new ModelRenderer(this, 0, 0);

  44.       head.addBox(-4F, -4F, -8F, 4, 5, 8);

  45.       head.setRotationPoint(2F, 9F, -6F);

  46.       head.setTextureSize(64, 32);

  47.       head.mirror = true;

  48.       setRotation(head, 0F, 0F, 0F);

  49.       body = new ModelRenderer(this, 36, 7);

  50.       body.addBox(-5F, -10F, -7F, 6, 17, 8);

  51.       body.setRotationPoint(2F, 11F, 3F);

  52.       body.setTextureSize(64, 32);

  53.       body.mirror = true;

  54.       setRotation(body, 1.570796F, 0F, 0F);

  55.       leg1 = new ModelRenderer(this, 0, 13);

  56.       leg1.addBox(-2F, 0F, -2F, 2, 6, 4);

  57.       leg1.setRotationPoint(-1F, 18F, 7F);

  58.       leg1.setTextureSize(64, 32);

  59.       leg1.mirror = true;

  60.       setRotation(leg1, 0F, 0F, 0F);

  61.       leg2 = new ModelRenderer(this, 12, 22);

  62.       leg2.addBox(-2F, 0F, -2F, 2, 6, 4);

  63.       leg2.setRotationPoint(3F, 18F, 7F);

  64.       leg2.setTextureSize(64, 32);

  65.       leg2.mirror = true;

  66.       setRotation(leg2, 0F, 0F, 0F);

  67.       leg3 = new ModelRenderer(this, 24, 13);

  68.       leg3.addBox(-2F, 18F, -2F, 2, 6, 4);

  69.       leg3.setRotationPoint(-1F, 0F, -5F);

  70.       leg3.setTextureSize(64, 32);

  71.       leg3.mirror = true;

  72.       setRotation(leg3, 0F, 0F, 0F);

  73.       leg4 = new ModelRenderer(this, 24, 3);

  74.       leg4.addBox(-2F, 0F, -2F, 2, 6, 4);

  75.       leg4.setRotationPoint(3F, 18F, -5F);

  76.       leg4.setTextureSize(64, 32);

  77.       leg4.mirror = true;

  78.       setRotation(leg4, 0F, 0F, 0F);

  79.       antler1.mirror = true;

  80.       antler1 = new ModelRenderer(this, 55, 0);

  81.       antler1.addBox(0F, 0F, 0F, 1, 3, 1);

  82.       antler1.setRotationPoint(-2F, 2F, -7F);

  83.       antler1.setTextureSize(64, 32);

  84.       antler1.mirror = true;

  85.       setRotation(antler1, 0F, 0F, 0F);

  86.       antler1.mirror = false;

  87.       antler2.mirror = true;

  88.       antler2 = new ModelRenderer(this, 46, 0);

  89.       antler2.addBox(0F, 0F, 0F, 3, 1, 1);

  90.       antler2.setRotationPoint(2F, 3F, -7F);

  91.       antler2.setTextureSize(64, 32);

  92.       antler2.mirror = true;

  93.       setRotation(antler2, 0F, 0F, 0F);

  94.       antler2.mirror = false;

  95.       antler3.mirror = true;

  96.       antler3 = new ModelRenderer(this, 37, 0);

  97.       antler3.addBox(0F, 0F, 0F, 3, 1, 1);

  98.       antler3.setRotationPoint(-5F, 3F, -7F);

  99.       antler3.setTextureSize(64, 32);

  100.       antler3.mirror = true;

  101.       setRotation(antler3, 0F, 0F, 0F);

  102.       antler3.mirror = false;

  103.       antler4.mirror = true;

  104.       antler4 = new ModelRenderer(this, 27, 0);

  105.       antler4.addBox(0F, 0F, 0F, 1, 1, 1);

  106.       antler4.setRotationPoint(4F, 2F, -7F);

  107.       antler4.setTextureSize(64, 32);

  108.       antler4.mirror = true;

  109.       setRotation(antler4, 0F, 0F, 0F);

  110.       antler4.mirror = false;

  111.       antler5.mirror = true;

  112.       antler5 = new ModelRenderer(this, 32, 0);

  113.       antler5.addBox(0F, 0F, 0F, 1, 1, 1);

  114.       antler5.setRotationPoint(-5F, 2F, -7F);

  115.       antler5.setTextureSize(64, 32);

  116.       antler5.mirror = true;

  117.       setRotation(antler5, 0F, 0F, 0F);

  118.       antler5.mirror = false;

  119.   }

  120.  

  121.   public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)

  122.   {

  123.     super.render(entity, f, f1, f2, f3, f4, f5);

  124.     setRotationAngles(f, f1, f2, f3, f4, f5, entity);

  125.     antler6.render(f5);

  126.     head.render(f5);

  127.     body.render(f5);

  128.     leg1.render(f5);

  129.     leg2.render(f5);

  130.     leg3.render(f5);

  131.     leg4.render(f5);

  132.     antler1.render(f5);

  133.     antler2.render(f5);

  134.     antler3.render(f5);

  135.     antler4.render(f5);

  136.     antler5.render(f5);

  137.   }

  138.  

  139.   private void setRotation(ModelRenderer model, float x, float y, float z)

  140.   {

  141.     model.rotateAngleX = x;

  142.     model.rotateAngleY = y;

  143.     model.rotateAngleZ = z;

  144.   }

  145.  

  146.   public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)

  147.   {

  148.     super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

  149.   }

  150.  

  151. }