invalid name java

Status
Duplicate
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description

hi ! I have a problem. Can you help me please ?

MCreator says me 

 

"Your model name is not a valid Java name!

Custom mob model names cannot contain whitespace, start with number or contain any non ANSCII letters.

Model name is not filename, but the name inside the model Java code (model class name)!

The best solution to this problem is to properly define the model name in your modeler before exporting the model"

Please, I need help with this. Here's the code:

 

// Made with Blockbench 3.5.2
// Exported for Minecraft version 1.14
// Paste this class into your mod and generate all required imports

public class herobrine extends ModelBase {
    private final ModelRenderer head;
    private final ModelRenderer body;
    private final ModelRenderer leftarm;
    private final ModelRenderer rightarm;
    private final ModelRenderer rightleg;
    private final ModelRenderer leftleg;

    public herobrine() {
        textureWidth = 128;
        textureHeight = 128;

        head = new ModelRenderer(this);
        head.setRotationPoint(0.0F, 0.0F, 0.0F);
        head.cubeList.add(new ModelBox(head, 0, 0, -4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F, false));

        body = new ModelRenderer(this);
        body.setRotationPoint(0.0F, 12.0F, 0.0F);
        body.cubeList.add(new ModelBox(body, 0, 16, -4.0F, -12.0F, -2.0F, 8, 12, 4, 0.0F, false));

        leftarm = new ModelRenderer(this);
        leftarm.setRotationPoint(6.0F, 0.0F, 0.0F);
        leftarm.cubeList.add(new ModelBox(leftarm, 40, 16, -2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F, false));

        rightarm = new ModelRenderer(this);
        rightarm.setRotationPoint(-6.0F, 0.0F, 0.0F);
        rightarm.cubeList.add(new ModelBox(rightarm, 24, 16, -2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F, false));

        rightleg = new ModelRenderer(this);
        rightleg.setRotationPoint(-2.0F, 12.0F, 0.0F);
        rightleg.cubeList.add(new ModelBox(rightleg, 0, 32, -2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F, false));

        leftleg = new ModelRenderer(this);
        leftleg.setRotationPoint(2.0F, 12.0F, 0.0F);
        leftleg.cubeList.add(new ModelBox(leftleg, 17, 32, -2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F, false));
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        head.render(f5);
        body.render(f5);
        leftarm.render(f5);
        rightarm.render(f5);
        rightleg.render(f5);
        leftleg.render(f5);
    }

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

Issue comments



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.