Your model name is invalid!

Started by Mariolover63 on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 03:25, 28. Nov 2018
Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your model name is invalid!

I was making a plush for my mod, BUT when I try to import the model for it, the error 'Your model name is invalid' shows up. The filename is plush.java by the way.

Last seen on 11:53, 20. Jul 2019
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually that was my old one…
Sat, 07/20/2019 - 10:18

Actually that was my old one, this one is the one i want to use:

//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 splodesquatch extends ModelBase {

    private final ModelRenderer Body1;

    private final ModelRenderer Body;

    private final ModelRenderer Head1;

    private final ModelRenderer Neck;

    private final ModelRenderer Head;

    private final ModelRenderer Leg1;

    private final ModelRenderer Leg2;

    private final ModelRenderer Leg3;

    private final ModelRenderer Leg4;

 

    public () {

        textureWidth = 64;

        textureHeight = 64;

 

        Body1 = new ModelRenderer(this);

        Body1.setRotationPoint(0.0F, 0.0F, 0.0F);

        setRotationAngle(Body1, 0.2618F, 0.0F, 0.0F);

        Body.addChild(Body1);

        Body1.cubeList.add(new ModelBox(Body1, 0, 0, -6.0F, -17.9496F, -2.6143F, 12, 12, 12, 0.0F, false));

 

        Body = new ModelRenderer(this);

        Body.setRotationPoint(0.0F, 24.0F, 0.0F);

        Body.cubeList.add(new ModelBox(Body, 30, 36, -3.0026F, -22.5F, -3.0026F, 6, 6, 6, 0.0F, false));

 

        Head1 = new ModelRenderer(this);

        Head1.setRotationPoint(0.0F, -3.0F, 0.0F);

        setRotationAngle(Head1, 0.0873F, 0.0F, 0.0F);

        Neck.addChild(Head1);

        Head1.cubeList.add(new ModelBox(Head1, 0, 24, -4.5026F, -9.0F, -6.0026F, 9, 9, 9, 0.0F, false));

 

        Neck = new ModelRenderer(this);

        Neck.setRotationPoint(0.0F, 0.0F, 0.0F);

        Head.addChild(Neck);

        Neck.cubeList.add(new ModelBox(Neck, 0, 0, -1.5026F, -4.0F, -1.5026F, 3, 4, 3, 0.0F, false));

 

        Head = new ModelRenderer(this);

        Head.setRotationPoint(0.0F, 1.5F, 0.0F);

 

        Leg1 = new ModelRenderer(this);

        Leg1.setRotationPoint(5.25F, 7.5F, -6.0F);

        Leg1.cubeList.add(new ModelBox(Leg1, 0, 42, -1.5F, 0.0F, -1.5F, 3, 17, 3, 0.0F, false));

 

        Leg2 = new ModelRenderer(this);

        Leg2.setRotationPoint(-5.25F, 7.5F, -6.0F);

        Leg2.cubeList.add(new ModelBox(Leg2, 0, 42, -1.5F, 0.0F, -1.5F, 3, 17, 3, 0.0F, false));

 

        Leg3 = new ModelRenderer(this);

        Leg3.setRotationPoint(5.25F, 13.5F, 6.0F);

        Leg3.cubeList.add(new ModelBox(Leg3, 0, 48, -1.5F, 0.0F, -1.5F, 3, 11, 3, 0.0F, false));

 

        Leg4 = new ModelRenderer(this);

        Leg4.setRotationPoint(-5.25F, 13.5F, 6.0F);

        Leg4.cubeList.add(new ModelBox(Leg4, 0, 48, -1.5F, 0.0F, -1.5F, 3, 11, 3, 0.0F, false));

    }

 

    @Override

    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

        Body.render(f5);

        Head.render(f5);

        Leg1.render(f5);

        Leg2.render(f5);

        Leg3.render(f5);

        Leg4.render(f5);

    }

    public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {

        modelRenderer.rotateAngleX = x;

        modelRenderer.rotateAngleY = y;

        modelRenderer.rotateAngleZ = z;

    }

}

 

Last seen on 11:53, 20. Jul 2019
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! works perfectly now!
Sat, 07/20/2019 - 11:18

Thanks! works perfectly now!

Last seen on 14:23, 22. Dec 2019
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it still has the error
Sat, 10/19/2019 - 02:27

it still has the error

Last seen on 19:08, 30. Apr 2021
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hey. im trying to import a…
Sat, 10/26/2019 - 18:27

hey. im trying to import a model (java) and it just keeps saying "Custom mob model names cannot contain any whitespace, start with numbers, or cotain any no ASCII letters."

Last seen on 19:08, 30. Apr 2021
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Klemen, i fixed the first…
Sat, 10/26/2019 - 18:53

Klemen, i fixed the first problem myself but when i import the model, there is no error, it just doesn't appear in resources

Klemen, i fixed the first…
Sat, 10/26/2019 - 19:43

Klemen, i fixed the first problem myself but when i import the model, there is no error, it just doesn't appear in resources

Make sure to set a valid name of the model before exporting it to JAVA.

Last seen on 22:01, 21. May 2020
Joined Jan 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i was reading through this…
Tue, 05/05/2020 - 13:43

i was reading through this but nothing silved it for me 

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

public class goblincave extends EntityModel<Entity> {
    private final ModelRenderer head;
    private final ModelRenderer legleft;
    private final ModelRenderer legright;
    private final ModelRenderer armleft;
    private final ModelRenderer armright;
    private final ModelRenderer jaw;
    private final ModelRenderer body;

    public goblincave() {
        textureWidth = 64;
        textureHeight = 64;

        head = new ModelRenderer(this);
        head.setRotationPoint(0.0F, 24.0F, 0.0F);
        head.setTextureOffset(0, 21).addBox(-4.0F, -14.0F, -4.0F, 8.0F, 3.0F, 5.0F, 0.0F, false);
        head.setTextureOffset(21, 21).addBox(-1.0F, -13.0F, -6.0F, 2.0F, 1.0F, 2.0F, 0.0F, false);
        head.setTextureOffset(8, 25).addBox(-4.0F, -17.0F, -3.0F, 0.0F, 4.0F, 4.0F, 0.0F, false);
        head.setTextureOffset(0, 25).addBox(4.0F, -17.0F, -3.0F, 0.0F, 4.0F, 4.0F, 0.0F, false);

        legleft = new ModelRenderer(this);
        legleft.setRotationPoint(0.0F, 24.0F, 0.0F);
        legleft.setTextureOffset(28, 21).addBox(-7.0F, -5.0F, -1.0F, 1.0F, 5.0F, 3.0F, 0.0F, false);

        legright = new ModelRenderer(this);
        legright.setRotationPoint(0.0F, 24.0F, 0.0F);
        legright.setTextureOffset(23, 26).addBox(6.0F, -5.0F, -1.0F, 1.0F, 5.0F, 3.0F, 0.0F, false);

        armleft = new ModelRenderer(this);
        armleft.setRotationPoint(0.0F, 24.0F, 0.0F);
        armleft.setTextureOffset(16, 29).addBox(-7.0F, -8.0F, -5.0F, 1.0F, 6.0F, 2.0F, 0.0F, false);

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

        jaw = new ModelRenderer(this);
        jaw.setRotationPoint(0.0F, 24.0F, 0.0F);
        jaw.setTextureOffset(0, 14).addBox(-5.0F, -11.0F, -5.0F, 10.0F, 1.0F, 6.0F, 0.0F, false);

        body = new ModelRenderer(this);
        body.setRotationPoint(0.0F, 24.0F, 0.0F);
        body.setTextureOffset(0, 0).addBox(-6.0F, -10.0F, -4.0F, 12.0F, 7.0F, 7.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){
        head.render(matrixStack, buffer, packedLight, packedOverlay);
        legleft.render(matrixStack, buffer, packedLight, packedOverlay);
        legright.render(matrixStack, buffer, packedLight, packedOverlay);
        armleft.render(matrixStack, buffer, packedLight, packedOverlay);
        armright.render(matrixStack, buffer, packedLight, packedOverlay);
        jaw.render(matrixStack, buffer, packedLight, packedOverlay);
        body.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;
    }
}

Last seen on 22:01, 21. May 2020
Joined Jan 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ty!
Tue, 05/05/2020 - 14:47

ty!

Last seen on 11:08, 30. May 2020
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have the same problem and…
Thu, 05/21/2020 - 11:53

I have the same problem and I tried to do all your advice to repair this problem but nothing is actually working. My filename is casque.java. Thanks for your help 

Last seen on 21:15, 19. Feb 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I followed through and it…
Wed, 12/30/2020 - 11:01

I followed through and it still replies with "Your model name is not a valid Java name"

I have edited everything but still.