your model is not a valid model

Started by callmedaddy126 on

Topic category: Help with MCreator software

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
your model is not a valid model

my mooncake model from final space and when I import it into MCcreator it gives me an error: your model name is not a valid java name, custom mob model names can not contain white spaces, start with a number or contain any ASCII letters; Model name is not file name, but the name inside the model java code(model class name)!

here is the source code pls help me:

//Made with Blockbench
//Paste this code into your mod.

import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;

public class geometry.guardian extends ModelBase {
    private final ModelRenderer head;
    private final ModelRenderer antenaleft;
    private final ModelRenderer antenaright;
    private final ModelRenderer rightLeg;
    private final ModelRenderer leftLeg;

    public geometry.guardian() {
        textureWidth = 64;
        textureHeight = 64;

        head = new ModelRenderer(this);
        head.setRotationPoint(0.0F, 24.0F, 0.0F);
        head.cubeList.add(new ModelBox(head, 0, 0, -7.0F, -14.0F, -8.0F, 14, 13, 14, 0.0F, false));

        antenaleft = new ModelRenderer(this);
        antenaleft.setRotationPoint(0.0F, 0.0F, 0.0F);
        setRotationAngle(antenaleft, -0.1745F, 0.0F, 0.1745F);
        head.addChild(antenaleft);
        antenaleft.cubeList.add(new ModelBox(antenaleft, 4, 4, 3.0F, -21.5F, 1.75F, 1, 8, 1, 0.0F, false));
        antenaleft.cubeList.add(new ModelBox(antenaleft, 4, 2, 2.75F, -21.5F, 1.5F, 1, 1, 1, 0.0F, false));

        antenaright = new ModelRenderer(this);
        antenaright.setRotationPoint(0.0F, 0.0F, 0.0F);
        setRotationAngle(antenaright, -0.1745F, 0.0F, -0.1745F);
        head.addChild(antenaright);
        antenaright.cubeList.add(new ModelBox(antenaright, 0, 0, -4.0F, -21.5F, 1.75F, 1, 8, 1, 0.0F, false));
        antenaright.cubeList.add(new ModelBox(antenaright, 4, 0, -4.25F, -21.5F, 1.5F, 1, 1, 1, 0.0F, false));

        rightLeg = new ModelRenderer(this);
        rightLeg.setRotationPoint(0.0F, 24.0F, 0.0F);
        rightLeg.cubeList.add(new ModelBox(rightLeg, 16, 27, -8.0F, -2.0F, 3.0F, 3, 2, 5, 0.0F, false));

        leftLeg = new ModelRenderer(this);
        leftLeg.setRotationPoint(0.0F, 24.0F, 0.0F);
        leftLeg.cubeList.add(new ModelBox(leftLeg, 0, 27, 5.0F, -2.0F, 3.0F, 3, 2, 5, 0.0F, false));
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        head.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;
    }
}

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What program do you use for…
Sun, 03/22/2020 - 11:42

What program do you use for making models? Also, I watched final space too lol

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh wait now i see it's…
Sun, 03/22/2020 - 11:44

Oh wait now i see it's modelbench, so basically you have in project thing called mob geometry name, it must not contain any spaces, dots, comas etc.