Blockbench invalid java model

Started by Lloyd_159 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Blockbench invalid java model

I was trying to create a entity to test the mcreator mod-element living element (I'm very new to mcreator) with blockbench.
When I try to import the java file to mcreator, it says
"Your model is not a valid java model! Make sure that all model parts have a valid java name and that your model is in fact java model with a valid syntax."

I never try to creat a 3d texture before, so I don't know what to do. I look at other similar topics in this forum, too, but I'm still confused and don't understand what I should do.

Code:

 

// Made with Blockbench 3.9.3
// Exported for Minecraft version 1.15 - 1.16 with MCP mappings
// Paste this class into your mod and generate all required imports

public class 001 extends EntityModel<Entity> {
    private final ModelRenderer skeleton;
    private final ModelRenderer bodyskeleton;
    private final ModelRenderer headskeleton;
    private final ModelRenderer cube_r1;
    private final ModelRenderer cube_r2;
    private final ModelRenderer wingrightskeleton;
    private final ModelRenderer cube_r3;
    private final ModelRenderer cube_r4;
    private final ModelRenderer cube_r5;
    private final ModelRenderer wingleftskeleton;
    private final ModelRenderer cube_r6;
    private final ModelRenderer cube_r7;
    private final ModelRenderer cube_r8;
    private final ModelRenderer tailskeleton;
    private final ModelRenderer casing;
    private final ModelRenderer bodycasing;
    private final ModelRenderer cube_r9;
    private final ModelRenderer cube_r10;
    private final ModelRenderer cube_r11;
    private final ModelRenderer cube_r12;
    private final ModelRenderer cube_r13;
    private final ModelRenderer cube_r14;
    private final ModelRenderer cube_r15;
    private final ModelRenderer wingrightcasing;
    private final ModelRenderer wingleftcasing;

    public 001() {
        textureWidth = 16;
        textureHeight = 16;

        skeleton = new ModelRenderer(this);
        skeleton.setRotationPoint(0.0F, 24.0F, 0.0F);
        

        bodyskeleton = new ModelRenderer(this);
        bodyskeleton.setRotationPoint(0.5F, 0.0F, 0.0F);
        skeleton.addChild(bodyskeleton);
        bodyskeleton.setTextureOffset(0, 2).addBox(-4.5F, -0.75F, -1.0F, 2.0F, 0.0F, 2.0F, 0.0F, false);
        bodyskeleton.setTextureOffset(0, 1).addBox(-1.75F, -0.75F, -0.75F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        bodyskeleton.setTextureOffset(0, 1).addBox(-0.85F, -0.86F, -0.625F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        bodyskeleton.setTextureOffset(0, 1).addBox(-4.75F, -0.75F, -0.75F, 0.0F, 0.0F, 1.0F, 0.0F, false);
        bodyskeleton.setTextureOffset(0, 2).addBox(-4.75F, -1.0F, -1.1F, 2.0F, 0.0F, 2.0F, 0.0F, false);
        bodyskeleton.setTextureOffset(0, 2).addBox(-2.8F, -1.0F, -1.0F, 1.0F, 0.0F, 2.0F, 0.0F, false);
        bodyskeleton.setTextureOffset(0, 1).addBox(-1.55F, -0.94F, -0.875F, 1.0F, 0.0F, 1.0F, 0.0F, false);

        headskeleton = new ModelRenderer(this);
        headskeleton.setRotationPoint(0.5F, 0.0F, 0.0F);
        skeleton.addChild(headskeleton);
        headskeleton.setTextureOffset(0, 0).addBox(-5.5F, -1.05F, -0.45F, 1.0F, 0.0F, 0.0F, 0.0F, false);

        cube_r1 = new ModelRenderer(this);
        cube_r1.setRotationPoint(0.0F, -0.5F, 0.0F);
        headskeleton.addChild(cube_r1);
        setRotationAngle(cube_r1, 0.0F, -0.7854F, -0.5236F);
        cube_r1.setTextureOffset(0, 1).addBox(-4.05F, -3.35F, 2.85F, 1.0F, 0.0F, 1.0F, 0.0F, false);

        cube_r2 = new ModelRenderer(this);
        cube_r2.setRotationPoint(0.0F, -0.5F, 0.0F);
        headskeleton.addChild(cube_r2);
        setRotationAngle(cube_r2, 0.0F, 0.0F, -0.5236F);
        cube_r2.setTextureOffset(0, 0).addBox(-5.8F, -3.0F, -0.375F, 0.0F, 0.0F, 0.0F, 0.0F, false);
        cube_r2.setTextureOffset(0, 0).addBox(-5.11F, -3.11F, -0.4F, 0.0F, 0.0F, 0.0F, 0.0F, false);

        wingrightskeleton = new ModelRenderer(this);
        wingrightskeleton.setRotationPoint(-6.0F, 0.0F, -0.5F);
        skeleton.addChild(wingrightskeleton);
        setRotationAngle(wingrightskeleton, 3.1416F, 0.0F, -3.1416F);
        wingrightskeleton.setTextureOffset(0, 0).addBox(-2.75F, -0.75F, 4.55F, 0.0F, 0.0F, 0.0F, 0.0F, false);
        wingrightskeleton.setTextureOffset(0, 2).addBox(-2.675F, -0.675F, 2.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingrightskeleton.setTextureOffset(0, 2).addBox(-2.75F, -0.75F, 0.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingrightskeleton.setTextureOffset(0, 2).addBox(-2.6F, -0.6F, 5.0F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        cube_r3 = new ModelRenderer(this);
        cube_r3.setRotationPoint(0.0F, 0.0F, 0.0F);
        wingrightskeleton.addChild(cube_r3);
        setRotationAngle(cube_r3, 0.0F, -1.1345F, 0.0F);
        cube_r3.setTextureOffset(0, 2).addBox(3.25F, -0.6F, 4.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        cube_r4 = new ModelRenderer(this);
        cube_r4.setRotationPoint(0.0F, 0.0F, 0.0F);
        wingrightskeleton.addChild(cube_r4);
        setRotationAngle(cube_r4, 0.0F, -2.0944F, 0.0F);
        cube_r4.setTextureOffset(0, 2).addBox(5.51F, -0.599F, -0.25F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        cube_r5 = new ModelRenderer(this);
        cube_r5.setRotationPoint(0.0F, 0.0F, 0.0F);
        wingrightskeleton.addChild(cube_r5);
        setRotationAngle(cube_r5, 0.0F, -0.5236F, 0.0F);
        cube_r5.setTextureOffset(0, 2).addBox(0.15F, -0.6F, 5.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        wingleftskeleton = new ModelRenderer(this);
        wingleftskeleton.setRotationPoint(-6.0F, 0.0F, 0.5F);
        skeleton.addChild(wingleftskeleton);
        wingleftskeleton.setTextureOffset(0, 0).addBox(2.25F, -0.75F, 4.55F, 0.0F, 0.0F, 0.0F, 0.0F, false);
        wingleftskeleton.setTextureOffset(1, 2).addBox(2.325F, -0.675F, 2.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingleftskeleton.setTextureOffset(2, 2).addBox(2.25F, -0.75F, 0.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingleftskeleton.setTextureOffset(2, 2).addBox(2.4F, -0.6F, 5.0F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        cube_r6 = new ModelRenderer(this);
        cube_r6.setRotationPoint(0.0F, 0.0F, 0.0F);
        wingleftskeleton.addChild(cube_r6);
        setRotationAngle(cube_r6, 0.0F, 1.1345F, 0.0F);
        cube_r6.setTextureOffset(2, 2).addBox(-3.45F, -0.6F, 4.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        cube_r7 = new ModelRenderer(this);
        cube_r7.setRotationPoint(0.0F, 0.0F, 0.0F);
        wingleftskeleton.addChild(cube_r7);
        setRotationAngle(cube_r7, 0.0F, 2.0944F, 0.0F);
        cube_r7.setTextureOffset(2, 2).addBox(-5.71F, -0.599F, -0.25F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        cube_r8 = new ModelRenderer(this);
        cube_r8.setRotationPoint(0.0F, 0.0F, 0.0F);
        wingleftskeleton.addChild(cube_r8);
        setRotationAngle(cube_r8, 0.0F, 0.5236F, 0.0F);
        cube_r8.setTextureOffset(2, 2).addBox(-0.35F, -0.6F, 5.5F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        tailskeleton = new ModelRenderer(this);
        tailskeleton.setRotationPoint(0.0F, 0.0F, 0.0F);
        skeleton.addChild(tailskeleton);
        tailskeleton.setTextureOffset(0, 0).addBox(0.65F, -0.79F, -0.45F, 1.0F, 0.0F, 0.0F, 0.0F, false);
        tailskeleton.setTextureOffset(0, 0).addBox(1.85F, -0.74F, -0.3F, 1.0F, 0.0F, 0.0F, 0.0F, false);
        tailskeleton.setTextureOffset(0, 0).addBox(2.95F, -0.68F, -0.15F, 1.0F, 0.0F, 0.0F, 0.0F, false);

        casing = new ModelRenderer(this);
        casing.setRotationPoint(0.0F, 24.0F, 0.0F);
        

        bodycasing = new ModelRenderer(this);
        bodycasing.setRotationPoint(0.0F, 0.0F, 0.0F);
        casing.addChild(bodycasing);
        

        cube_r9 = new ModelRenderer(this);
        cube_r9.setRotationPoint(0.5F, -0.5F, 0.0F);
        bodycasing.addChild(cube_r9);
        setRotationAngle(cube_r9, 0.0F, -0.7854F, 0.0F);
        cube_r9.setTextureOffset(0, 0).addBox(-0.52F, -0.458F, -0.11F, 0.0F, 0.0F, 0.0F, 0.0F, false);

        cube_r10 = new ModelRenderer(this);
        cube_r10.setRotationPoint(0.5F, -0.5F, 0.0F);
        bodycasing.addChild(cube_r10);
        setRotationAngle(cube_r10, 0.0F, -0.7854F, -0.3491F);
        cube_r10.setTextureOffset(0, 0).addBox(-0.52F, -0.658F, -0.31F, 0.0F, 0.0F, 0.0F, 0.0F, false);

        cube_r11 = new ModelRenderer(this);
        cube_r11.setRotationPoint(0.5F, -0.5F, 0.0F);
        bodycasing.addChild(cube_r11);
        setRotationAngle(cube_r11, 0.0F, -0.7854F, -0.4363F);
        cube_r11.setTextureOffset(0, 0).addBox(-0.76F, -0.87F, -0.16F, 0.0F, 0.0F, 0.0F, 0.0F, false);

        cube_r12 = new ModelRenderer(this);
        cube_r12.setRotationPoint(0.5F, -0.5F, 0.0F);
        bodycasing.addChild(cube_r12);
        setRotationAngle(cube_r12, 0.0F, -0.7854F, -0.5236F);
        cube_r12.setTextureOffset(0, 0).addBox(-1.05F, -1.16F, 0.03F, 0.0F, 0.0F, 0.0F, 0.0F, false);

        cube_r13 = new ModelRenderer(this);
        cube_r13.setRotationPoint(0.5F, -0.5F, 0.0F);
        bodycasing.addChild(cube_r13);
        setRotationAngle(cube_r13, 0.0F, -0.7854F, -0.6109F);
        cube_r13.setTextureOffset(0, 1).addBox(-1.35F, -1.48F, 0.18F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        cube_r13.setTextureOffset(0, 1).addBox(-1.7F, -1.73F, 0.43F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        cube_r13.setTextureOffset(0, 1).addBox(-1.95F, -1.98F, 0.68F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        cube_r13.setTextureOffset(0, 1).addBox(-2.2F, -2.23F, 0.93F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        cube_r13.setTextureOffset(0, 1).addBox(-2.45F, -2.48F, 1.18F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        cube_r13.setTextureOffset(0, 1).addBox(-2.7F, -2.73F, 1.43F, 1.0F, 0.0F, 1.0F, 0.0F, false);
        cube_r13.setTextureOffset(0, 1).addBox(-2.9F, -3.03F, 1.7F, 1.0F, 0.0F, 1.0F, 0.0F, false);

        cube_r14 = new ModelRenderer(this);
        cube_r14.setRotationPoint(0.0F, 0.0F, 0.0F);
        bodycasing.addChild(cube_r14);
        setRotationAngle(cube_r14, 0.0F, -0.6109F, 0.0F);
        cube_r14.setTextureOffset(0, 0).addBox(-2.9F, -1.05F, 2.78F, 0.0F, 0.0F, 0.0F, 0.0F, true);

        cube_r15 = new ModelRenderer(this);
        cube_r15.setRotationPoint(0.0F, 0.0F, 0.0F);
        bodycasing.addChild(cube_r15);
        setRotationAngle(cube_r15, 0.0F, 0.6109F, 0.0F);
        cube_r15.setTextureOffset(0, 0).addBox(-2.9F, -1.05F, -3.38F, 0.0F, 0.0F, 0.0F, 0.0F, false);

        wingrightcasing = new ModelRenderer(this);
        wingrightcasing.setRotationPoint(0.0F, 0.0F, 0.0F);
        casing.addChild(wingrightcasing);
        wingrightcasing.setTextureOffset(0, 4).addBox(-3.45F, -0.5F, 1.0F, 1.0F, 0.0F, 4.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 4).addBox(-1.75F, -0.5F, 3.25F, 0.0F, 0.0F, 4.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 2).addBox(-1.85F, -0.5F, 5.4F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 2).addBox(-1.95F, -0.5F, 5.4F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 2).addBox(-2.05F, -0.5F, 5.4F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 0).addBox(-3.45F, -0.5F, 7.75F, 1.0F, 0.0F, 0.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 0).addBox(-3.45F, -0.5F, 7.85F, 1.0F, 0.0F, 0.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 0).addBox(-3.45F, -0.5F, 7.95F, 0.0F, 0.0F, 0.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 0).addBox(-3.45F, -0.5F, 8.05F, 0.0F, 0.0F, 0.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 2).addBox(-3.45F, -0.5F, 5.4F, 1.0F, 0.0F, 2.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 3).addBox(-1.65F, -0.5F, 3.55F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 3).addBox(-1.55F, -0.5F, 3.75F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 3).addBox(-1.45F, -0.5F, 3.85F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 3).addBox(-1.35F, -0.5F, 3.95F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 3).addBox(-1.25F, -0.5F, 4.05F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingrightcasing.setTextureOffset(0, 2).addBox(-1.15F, -0.5F, 4.15F, 0.0F, 0.0F, 2.0F, 0.0F, false);

        wingleftcasing = new ModelRenderer(this);
        wingleftcasing.setRotationPoint(6.4F, 0.0F, 0.0F);
        casing.addChild(wingleftcasing);
        wingleftcasing.setTextureOffset(4, 8).addBox(-9.85F, -0.5F, -5.4F, 1.0F, 0.0F, 4.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(4, 8).addBox(-8.15F, -0.5F, -7.55F, 0.0F, 0.0F, 4.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(2, 4).addBox(-8.25F, -0.5F, -7.65F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(2, 4).addBox(-8.35F, -0.5F, -7.75F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(2, 4).addBox(-8.45F, -0.5F, -7.75F, 0.0F, 0.0F, 2.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(0, 0).addBox(-9.85F, -0.5F, -7.85F, 1.0F, 0.0F, 0.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(0, 0).addBox(-9.85F, -0.5F, -7.95F, 1.0F, 0.0F, 0.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(0, 0).addBox(-9.85F, -0.5F, -8.05F, 0.0F, 0.0F, 0.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(0, 0).addBox(-9.85F, -0.5F, -8.15F, 0.0F, 0.0F, 0.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(2, 4).addBox(-9.85F, -0.5F, -7.75F, 1.0F, 0.0F, 2.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(3, 7).addBox(-8.05F, -0.5F, -7.45F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(3, 7).addBox(-7.95F, -0.5F, -7.35F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(3, 6).addBox(-7.85F, -0.5F, -7.25F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(3, 6).addBox(-7.75F, -0.5F, -7.15F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(3, 6).addBox(-7.65F, -0.5F, -7.05F, 0.0F, 0.0F, 3.0F, 0.0F, false);
        wingleftcasing.setTextureOffset(2, 5).addBox(-7.55F, -0.5F, -6.85F, 0.0F, 0.0F, 2.0F, 0.0F, false);
    }

    @Override
    public void setRotationAngles(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 render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
        skeleton.render(matrixStack, buffer, packedLight, packedOverlay);
        casing.render(matrixStack, buffer, packedLight, packedOverlay);
    }

    public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}

Can please anyone help my and tell me my mistakes?