Your model name is invalid

Started by DarkWolf on

Topic category: Help with modding (Java Edition)

Last seen on 00:46, 5. Dec 2023
Joined Jun 2020
Points:

User statistics:

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

I want to create a lava monster but when trying to import the file that I took out of BlockBench in Mcreator, I get "Invalid Model Name" .... I don't know how to solve it and I didn't understand how to do it from the forums that already exist, I'm not an expert in anything of this and less in codes ...
Here is the code for my mob and maybe you know how to fix it.

Code:

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

public class custom_model extends ModelBase {
    private final ModelRenderer PartesCuerpo;
    private final ModelRenderer PartesCabeza;
    private final ModelRenderer PartesCola;

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

        PartesCuerpo = new ModelRenderer(this);
        PartesCuerpo.setRotationPoint(0.0F, 24.0F, 0.0F);
        PartesCuerpo.cubeList.add(new ModelBox(PartesCuerpo, 0, 0, -5.0F, -17.0F, -5.0F, 10, 8, 10, 0.0F, false));
        PartesCuerpo.cubeList.add(new ModelBox(PartesCuerpo, 0, 42, -7.0F, -11.0F, 1.0F, 2, 4, 4, 0.0F, false));
        PartesCuerpo.cubeList.add(new ModelBox(PartesCuerpo, 40, 19, 5.0F, -11.0F, 1.0F, 2, 4, 4, 0.0F, false));

        PartesCabeza = new ModelRenderer(this);
        PartesCabeza.setRotationPoint(0.0F, 24.0F, 0.0F);
        PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 18, -3.0F, -16.0F, -9.0F, 6, 6, 5, 0.0F, false));
        PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 22, 22, -3.0F, -15.0F, -15.0F, 6, 1, 6, 0.0F, false));
        PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 29, -3.0F, -11.0F, -14.0F, 6, 1, 5, 0.0F, false));
        PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 35, 2.0F, -14.0F, -15.0F, 1, 1, 6, 0.0F, false));
        PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 34, 12, -3.0F, -14.0F, -15.0F, 1, 1, 6, 0.0F, false));
        PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 0, -2.0F, -14.0F, -15.0F, 4, 1, 1, 0.0F, false));
        PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 26, 29, -5.0F, -23.0F, -8.0F, 10, 7, 0, 0.0F, false));

        PartesCola = new ModelRenderer(this);
        PartesCola.setRotationPoint(0.0F, 24.0F, 0.0F);
        PartesCola.cubeList.add(new ModelBox(PartesCola, 30, 0, -2.0F, -17.0F, 5.0F, 4, 3, 5, 0.0F, false));
        PartesCola.cubeList.add(new ModelBox(PartesCola, 15, 29, -1.0F, -16.5F, 10.0F, 2, 2, 7, 0.0F, false));
        PartesCola.cubeList.add(new ModelBox(PartesCola, 0, 2, -1.0F, -18.5F, 17.0F, 2, 4, 1, 0.0F, false));
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        PartesCuerpo.render(f5);
        PartesCabeza.render(f5);
        PartesCola.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 00:46, 5. Dec 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have 2020.3 but it won't…
Wed, 06/10/2020 - 10:52

I have 2020.3 but it won't let me open my mod that I have in 1.12 so I keep using 2020.2

Then you will have to live…
Wed, 06/10/2020 - 10:55

Then you will have to live with bugs. Check the ticket I linked for a workaround.

Last seen on 00:46, 5. Dec 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ah don't forget it xd, I…
Wed, 06/10/2020 - 10:57

ah don't forget it xd, I already found a way to have everything from 1.12 in the latest version. thanks for the warning!!

Last seen on 00:46, 5. Dec 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry for spelling mistakes,…
Wed, 06/10/2020 - 10:59

Sorry for spelling mistakes, I'm from Argentina and my English is sooo bad :v

Last seen on 08:57, 11. Nov 2021
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Delete the first 3 likes of…
Tue, 11/09/2021 - 00:31

Delete the first 3 likes of code from the model. 2020.2 can't read the model if those lines are there. I also thought the best option was to update to a recent version with the 1.12.2 plugin, but it disables oreDictionary support because of the tags from newer Minecraft versions. If you mod doesn't use the oreDictionary, then you'll be fine in newer versions. If not, you'd have to code it yourself.