Started by
Meanbean
on
Topic category: Troubleshooting, bugs, and solutions
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.
Post code of this model on Pastebin
// Date: 9/28/2019 10:21:29 PM
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package net.minecraft.src;
public class ModelDeer extends ModelBase
{
//fields
ModelRenderer antler6;
ModelRenderer head;
ModelRenderer body;
ModelRenderer leg1;
ModelRenderer leg2;
ModelRenderer leg3;
ModelRenderer leg4;
ModelRenderer antler1;
ModelRenderer antler2;
ModelRenderer antler3;
ModelRenderer antler4;
ModelRenderer antler5;
public ModelDeer()
{
textureWidth = 64;
textureHeight = 32;
antler6.mirror = true;
antler6 = new ModelRenderer(this, 60, 0);
antler6.addBox(0F, 0F, 0F, 1, 3, 1);
antler6.setRotationPoint(1F, 2F, -7F);
antler6.setTextureSize(64, 32);
antler6.mirror = true;
setRotation(antler6, 0F, 0F, 0F);
antler6.mirror = false;
head = new ModelRenderer(this, 0, 0);
head.addBox(-4F, -4F, -8F, 4, 5, 8);
head.setRotationPoint(2F, 9F, -6F);
head.setTextureSize(64, 32);
head.mirror = true;
setRotation(head, 0F, 0F, 0F);
body = new ModelRenderer(this, 36, 7);
body.addBox(-5F, -10F, -7F, 6, 17, 8);
body.setRotationPoint(2F, 11F, 3F);
body.setTextureSize(64, 32);
body.mirror = true;
setRotation(body, 1.570796F, 0F, 0F);
leg1 = new ModelRenderer(this, 0, 13);
leg1.addBox(-2F, 0F, -2F, 2, 6, 4);
leg1.setRotationPoint(-1F, 18F, 7F);
leg1.setTextureSize(64, 32);
leg1.mirror = true;
setRotation(leg1, 0F, 0F, 0F);
leg2 = new ModelRenderer(this, 12, 22);
leg2.addBox(-2F, 0F, -2F, 2, 6, 4);
leg2.setRotationPoint(3F, 18F, 7F);
leg2.setTextureSize(64, 32);
leg2.mirror = true;
setRotation(leg2, 0F, 0F, 0F);
leg3 = new ModelRenderer(this, 24, 13);
leg3.addBox(-2F, 18F, -2F, 2, 6, 4);
leg3.setRotationPoint(-1F, 0F, -5F);
leg3.setTextureSize(64, 32);
leg3.mirror = true;
setRotation(leg3, 0F, 0F, 0F);
leg4 = new ModelRenderer(this, 24, 3);
leg4.addBox(-2F, 0F, -2F, 2, 6, 4);
leg4.setRotationPoint(3F, 18F, -5F);
leg4.setTextureSize(64, 32);
leg4.mirror = true;
setRotation(leg4, 0F, 0F, 0F);
antler1.mirror = true;
antler1 = new ModelRenderer(this, 55, 0);
antler1.addBox(0F, 0F, 0F, 1, 3, 1);
antler1.setRotationPoint(-2F, 2F, -7F);
antler1.setTextureSize(64, 32);
antler1.mirror = true;
setRotation(antler1, 0F, 0F, 0F);
antler1.mirror = false;
antler2.mirror = true;
antler2 = new ModelRenderer(this, 46, 0);
antler2.addBox(0F, 0F, 0F, 3, 1, 1);
antler2.setRotationPoint(2F, 3F, -7F);
antler2.setTextureSize(64, 32);
antler2.mirror = true;
setRotation(antler2, 0F, 0F, 0F);
antler2.mirror = false;
antler3.mirror = true;
antler3 = new ModelRenderer(this, 37, 0);
antler3.addBox(0F, 0F, 0F, 3, 1, 1);
antler3.setRotationPoint(-5F, 3F, -7F);
antler3.setTextureSize(64, 32);
antler3.mirror = true;
setRotation(antler3, 0F, 0F, 0F);
antler3.mirror = false;
antler4.mirror = true;
antler4 = new ModelRenderer(this, 27, 0);
antler4.addBox(0F, 0F, 0F, 1, 1, 1);
antler4.setRotationPoint(4F, 2F, -7F);
antler4.setTextureSize(64, 32);
antler4.mirror = true;
setRotation(antler4, 0F, 0F, 0F);
antler4.mirror = false;
antler5.mirror = true;
antler5 = new ModelRenderer(this, 32, 0);
antler5.addBox(0F, 0F, 0F, 1, 1, 1);
antler5.setRotationPoint(-5F, 2F, -7F);
antler5.setTextureSize(64, 32);
antler5.mirror = true;
setRotation(antler5, 0F, 0F, 0F);
antler5.mirror = false;
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
antler6.render(f5);
head.render(f5);
body.render(f5);
leg1.render(f5);
leg2.render(f5);
leg3.render(f5);
leg4.render(f5);
antler1.render(f5);
antler2.render(f5);
antler3.render(f5);
antler4.render(f5);
antler5.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}