Started by
milkmaster200
on
Topic category: Help with Minecraft modding (Java Edition)
my elephant wont work so if you could help me that would be great.
// Made with Blockbench 4.0.2
// Exported for Minecraft version 1.15 - 1.16 with Mojang mappings
// Paste this class into your mod and generate all required imports
public class custom_model extends EntityModel<Entity> {
private final ModelRenderer frfeet;
private final ModelRenderer blfeet;
private final ModelRenderer brfeet;
private final ModelRenderer flfeet;
private final ModelRenderer body;
private final ModelRenderer head;
private final ModelRenderer rear;
private final ModelRenderer cube_r1;
private final ModelRenderer lear;
private final ModelRenderer cube_r2;
private final ModelRenderer trunk;
private final ModelRenderer cube_r3;
private final ModelRenderer cube_r4;
private final ModelRenderer tail;
private final ModelRenderer cube_r5;
public custom_model() {
texWidth = 64;
texHeight = 64;
frfeet = new ModelRenderer(this);
frfeet.setPos(0.0F, 24.0F, 3.0F);
frfeet.texOffs(15, 14).addBox(-4.0F, -2.0F, -5.0F, 1.0F, 2.0F, 1.0F, 0.0F, false);
blfeet = new ModelRenderer(this);
blfeet.setPos(0.0F, 24.0F, 3.0F);
blfeet.texOffs(4, 6).addBox(2.0F, -2.0F, 3.0F, 1.0F, 2.0F, 1.0F, 0.0F, false);
brfeet = new ModelRenderer(this);
brfeet.setPos(0.0F, 24.0F, 3.0F);
brfeet.texOffs(0, 6).addBox(-4.0F, -2.0F, 3.0F, 1.0F, 2.0F, 1.0F, 0.0F, false);
flfeet = new ModelRenderer(this);
flfeet.setPos(0.0F, 24.0F, 0.0F);
flfeet.texOffs(0, 14).addBox(2.0F, -2.0F, -2.0F, 1.0F, 2.0F, 1.0F, 0.0F, false);
body = new ModelRenderer(this);
body.setPos(0.0F, 24.0F, 0.0F);
body.texOffs(0, 0).addBox(-4.0F, -7.0F, -2.0F, 7.0F, 5.0F, 9.0F, 0.0F, false);
head = new ModelRenderer(this);
head.setPos(0.0F, 24.0F, 0.0F);
head.texOffs(0, 14).addBox(-3.0F, -12.0F, -6.0F, 5.0F, 5.0F, 5.0F, 0.0F, false);
rear = new ModelRenderer(this);
rear.setPos(-3.0F, 12.0F, -3.0F);
cube_r1 = new ModelRenderer(this);
cube_r1.setPos(0.0F, 0.0F, 0.0F);
rear.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 0.0F, 0.6545F);
cube_r1.texOffs(15, 19).addBox(0.0F, 0.0F, -3.0F, 1.0F, 4.0F, 5.0F, 0.0F, false);
lear = new ModelRenderer(this);
lear.setPos(0.0F, 24.0F, 0.0F);
cube_r2 = new ModelRenderer(this);
cube_r2.setPos(2.0F, -12.0F, -3.0F);
lear.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 0.0F, -0.6545F);
cube_r2.texOffs(22, 14).addBox(-1.0F, 0.0F, -3.0F, 1.0F, 4.0F, 5.0F, 0.0F, false);
trunk = new ModelRenderer(this);
trunk.setPos(0.0F, 24.0F, 0.0F);
trunk.texOffs(0, 17).addBox(-1.0F, -9.0F, -7.0F, 1.0F, 1.0F, 1.0F, 0.0F, false);
cube_r3 = new ModelRenderer(this);
cube_r3.setPos(0.0F, -8.0F, -7.0F);
trunk.addChild(cube_r3);
setRotationAngle(cube_r3, -0.3054F, 0.0F, 0.0F);
cube_r3.texOffs(4, 0).addBox(-1.0F, 1.0F, -1.0F, 1.0F, 2.0F, 1.0F, 0.0F, false);
cube_r4 = new ModelRenderer(this);
cube_r4.setPos(-1.0F, -9.0F, -7.0F);
trunk.addChild(cube_r4);
setRotationAngle(cube_r4, 0.9163F, 0.0F, 0.0F);
cube_r4.texOffs(2, 3).addBox(0.0F, 0.0F, -2.0F, 1.0F, 1.0F, 2.0F, 0.0F, false);
tail = new ModelRenderer(this);
tail.setPos(0.0F, 24.0F, 0.0F);
cube_r5 = new ModelRenderer(this);
cube_r5.setPos(0.0F, -6.0F, 7.0F);
tail.addChild(cube_r5);
setRotationAngle(cube_r5, 0.3927F, 0.0F, 0.0F);
cube_r5.texOffs(0, 0).addBox(-1.0F, 0.0F, -1.0F, 1.0F, 4.0F, 1.0F, 0.0F, false);
}
@Override
public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){
//previously the render function, render code was moved to a method below
}
@Override
public void renderToBuffer(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
frfeet.render(matrixStack, buffer, packedLight, packedOverlay);
blfeet.render(matrixStack, buffer, packedLight, packedOverlay);
brfeet.render(matrixStack, buffer, packedLight, packedOverlay);
flfeet.render(matrixStack, buffer, packedLight, packedOverlay);
body.render(matrixStack, buffer, packedLight, packedOverlay);
head.render(matrixStack, buffer, packedLight, packedOverlay);
rear.render(matrixStack, buffer, packedLight, packedOverlay);
lear.render(matrixStack, buffer, packedLight, packedOverlay);
trunk.render(matrixStack, buffer, packedLight, packedOverlay);
tail.render(matrixStack, buffer, packedLight, packedOverlay);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.xRot = x;
modelRenderer.yRot = y;
modelRenderer.zRot = z;
}
}
Come on, this is the 5th time in 2 days always the same question
Change Blockbench project to Mcp not Mojmaps
^^^^
and right MC version..
You have to delete the first 3 lines.
// Made with Blockbench 4.0.2
// Exported for Minecraft version 1.15 - 1.16 with Mojang mappings
// Paste this class into your mod and generate all required imports
chewdog, since update 2021.1(i think) u no longer have to remove these 3 lines