Model Name is not a valid java name, cannot import model to mcreator

Published by Tbird2005 on Wed, 05/27/2020 - 21:38
Status
Resolved
Type
Product/platform
Not applicable
MCreator version
Priority
Normal
Issue description

my model name is not a valid java name when importing, here is code of my model plz help fix

 

public class geometry.irongolem extends EntityModel<Entity> {
    private final ModelRenderer body;
    private final ModelRenderer head;
    private final ModelRenderer arm0;
    private final ModelRenderer arm1;
    private final ModelRenderer leg0;
    private final ModelRenderer leg1;

    public geometry.irongolem() {
        textureWidth = 128;
        textureHeight = 128;

        body = new ModelRenderer(this);
        body.setRotationPoint(0.0F, -7.0F, 0.0F);
        body.setTextureOffset(0, 0).addBox(-6.0F, -2.0F, -3.0F, 12.0F, 12.0F, 5.0F, 0.0F, false);
        body.setTextureOffset(0, 17).addBox(-5.5F, 10.0F, -3.0F, 11.0F, 5.0F, 5.0F, 0.5F, false);

        head = new ModelRenderer(this);
        head.setRotationPoint(0.0F, -7.0F, -2.0F);
        head.setTextureOffset(32, 11).addBox(-3.0F, -9.0F, -1.5F, 6.0F, 7.0F, 6.0F, 0.0F, false);

        arm0 = new ModelRenderer(this);
        arm0.setRotationPoint(0.0F, -7.0F, 0.0F);
        arm0.setTextureOffset(0, 48).addBox(6.0F, -1.5F, -2.0F, 4.0F, 18.0F, 3.0F, 0.0F, false);

        arm1 = new ModelRenderer(this);
        arm1.setRotationPoint(0.0F, -7.0F, 0.0F);
        arm1.setTextureOffset(36, 36).addBox(-10.0F, -1.5F, -2.0F, 4.0F, 18.0F, 3.0F, 0.0F, false);

        leg0 = new ModelRenderer(this);
        leg0.setRotationPoint(4.0F, 11.0F, 0.0F);
        leg0.setTextureOffset(18, 27).addBox(-2.5F, -3.0F, -3.0F, 4.0F, 16.0F, 5.0F, 0.0F, false);

        leg1 = new ModelRenderer(this);
        leg1.setRotationPoint(-5.0F, 11.0F, 0.0F);
        leg1.setTextureOffset(0, 27).addBox(-0.5F, -3.0F, -3.0F, 4.0F, 16.0F, 5.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){
        body.render(matrixStack, buffer, packedLight, packedOverlay);
        head.render(matrixStack, buffer, packedLight, packedOverlay);
        arm0.render(matrixStack, buffer, packedLight, packedOverlay);
        arm1.render(matrixStack, buffer, packedLight, packedOverlay);
        leg0.render(matrixStack, buffer, packedLight, packedOverlay);
        leg1.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;
    }
}

Attachment Size
the model file2.53 KB 2.53 KB
my textures i used549 bytes 549 bytes

Issue comments

and i still cannot fix problem i tried removing the text inside folder, editing name of file it not work

 



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.