Your model name is invalid!

Started by Mariolover63 on

Topic category: Troubleshooting, bugs, and solutions

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.

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nvmnd the name in the code…
Fri, 09/21/2018 - 16:51

nvmnd the name in the code is different from the filename

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have the sample problem,…
Thu, 07/18/2019 - 23:47

I have the sample problem, help me :(

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
//Made with Blockbench /…
Thu, 07/18/2019 - 23:48

//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  extends ModelBase {
    private final ModelRenderer Body;
    private final ModelRenderer Head;
    private final ModelRenderer Neck;

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

        Body = new ModelRenderer(this);
        Body.setRotationPoint(0.0F, 24.0F, -3.0F);
 

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks :)
Fri, 07/19/2019 - 09:57

thanks :)

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ummmm, It still gives me an…
Fri, 07/19/2019 - 10:01

ummmm, It still gives me an invalid name error, this is my code now:

//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 cobra class  extends ModelBase {
    private final ModelRenderer Body;
    private final ModelRenderer Head;
    private final ModelRenderer Neck;

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

        Body = new ModelRenderer(this);
        Body.setRotationPoint(0.0F, 24.0F, -3.0F);
        Body.cubeList.add(new ModelBox(Body, 0, 0, -1.0F, -1.0F, 8.0F, 2, 1, 2, 0.0F, false));
        Body.cubeList.add(new ModelBox(Body, 0, 0, -1.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F, false));
        Body.cubeList.add(new ModelBox(Body, 0, 0, -1.0F, -1.0F, 4.0F, 2, 1, 2, 0.0F, false));
        Body.cubeList.add(new ModelBox(Body, 0, 0, -2.0F, -1.0F, 2.0F, 4, 1, 2, 0.0F, false));
        Body.cubeList.add(new ModelBox(Body, 0, 0, -2.0F, -2.0F, 0.0F, 4, 2, 2, 0.0F, false));

        Head = new ModelRenderer(this);
        Head.setRotationPoint(0.0F, 18.0F, -4.0F);
        Head.cubeList.add(new ModelBox(Head, 6, 4, -2.0F, -2.0F, -3.0F, 4, 2, 3, 0.0F, false));
        Head.cubeList.add(new ModelBox(Head, 6, 9, -5.0F, -3.0F, 0.0F, 4, 6, 1, 0.0F, false));
        Head.cubeList.add(new ModelBox(Head, 0, 9, 1.0F, -3.0F, 0.0F, 4, 6, 1, 0.0F, false));

        Neck = new ModelRenderer(this);
        Neck.setRotationPoint(0.0F, 23.0F, -3.0F);
        Neck.cubeList.add(new ModelBox(Neck, 0, 0, -1.0F, -5.0F, -1.0F, 2, 5, 1, 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);
        Neck.render(f5);
    }
    public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your model name is not a…
Fri, 07/19/2019 - 10:58

Your model name is not a valid Java name

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That solved it, though now…
Fri, 07/19/2019 - 11:04

That solved it, though now it says it's an invalid model D:

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That solved it, though now…
Fri, 07/19/2019 - 11:24

That solved it, though now it says it's an invalid model D:

please

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
//Made with Blockbench /…
Sat, 07/20/2019 - 10:13

//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 bone;

    private final ModelRenderer Body;

    private final ModelRenderer head;

    private final ModelRenderer neck;

    private final ModelRenderer Head;

    private final ModelRenderer Leg1;

    private final ModelRenderer Leg2;

    private final ModelRenderer Leg3;

    private final ModelRenderer Leg4;

    private final ModelRenderer Creeper;

    private final ModelRenderer Body1;

    private final ModelRenderer Head1;

    private final ModelRenderer Neck;

 

    public () {

        textureWidth = 64;

        textureHeight = 64;

 

        bone = new ModelRenderer(this);

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

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

        Body.addChild(bone);

 

        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));

 

        head = new ModelRenderer(this);

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

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

        neck.addChild(head);

 

        neck = new ModelRenderer(this);

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

        Head.addChild(neck);

 

        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));

 

        Creeper = new ModelRenderer(this);

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

 

        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));

 

        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));

    }

 

    @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);

        Creeper.render(f5);

    }

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

        modelRenderer.rotateAngleX = x;

        modelRenderer.rotateAngleY = y;

        modelRenderer.rotateAngleZ = z;

    }

}