Your model name is not a valid Java name :( (nothing solves it)

Started by DarkDeer0Fire on

Topic category: Troubleshooting, bugs, and solutions

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your model name is not a valid Java name :( (nothing solves it)

 

Hello, I have a problem that has happened to many, but I have tried absolutely everything and it is not solved, it is: Your model name is not a valid Java name, I put my code here to help me, PLEASE

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

public class necromorfoz extends ModelBase {
    private final ModelRenderer PiernaIzquierda;
    private final ModelRenderer PiernaDerecha;
    private final ModelRenderer cuerpo;
    private final ModelRenderer BrazoIzquierdo;
    private final ModelRenderer BrazoDerecho;
    private final ModelRenderer Cabeza;

    public Necromorfoz {
        textureWidth = 64;
        textureHeight = 64;

        PiernaIzquierda = new ModelRenderer(this);
        PiernaIzquierda.setRotationPoint(0.0F, 24.0F, 0.0F);
        PiernaIzquierda.cubeList.add(new ModelBox(PiernaIzquierda, 16, 36, 0.0F, -12.0F, -1.0F, 5, 12, 3, 0.0F, false));

        PiernaDerecha = new ModelRenderer(this);
        PiernaDerecha.setRotationPoint(0.0F, 24.0F, 0.0F);
        PiernaDerecha.cubeList.add(new ModelBox(PiernaDerecha, 36, 0, -5.0F, -12.0F, -1.0F, 5, 12, 3, 0.0F, false));

        cuerpo = new ModelRenderer(this);
        cuerpo.setRotationPoint(0.0F, 24.0F, 0.0F);
        cuerpo.cubeList.add(new ModelBox(cuerpo, 0, 17, -5.0F, -26.0F, -1.0F, 10, 15, 4, 0.0F, false));

        BrazoIzquierdo = new ModelRenderer(this);
        BrazoIzquierdo.setRotationPoint(0.0F, 24.0F, 0.0F);
        BrazoIzquierdo.cubeList.add(new ModelBox(BrazoIzquierdo, 28, 17, 5.0F, -26.0F, -1.0F, 4, 14, 5, 0.0F, false));

        BrazoDerecho = new ModelRenderer(this);
        BrazoDerecho.setRotationPoint(0.0F, 24.0F, 0.0F);
        BrazoDerecho.cubeList.add(new ModelBox(BrazoDerecho, 0, 36, -9.0F, -26.0F, -1.0F, 4, 15, 4, 0.0F, false));

        Cabeza = new ModelRenderer(this);
        Cabeza.setRotationPoint(0.0F, 24.0F, 0.0F);
        Cabeza.cubeList.add(new ModelBox(Cabeza, 0, 0, -5.0F, -35.0F, -3.0F, 10, 9, 8, 0.0F, false));
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        PiernaIzquierda.render(f5);
        PiernaDerecha.render(f5);
        cuerpo.render(f5);
        BrazoIzquierdo.render(f5);
        BrazoDerecho.render(f5);
        Cabeza.render(f5);
    }

    public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it an entity or an item? …
Sat, 03/19/2022 - 03:09

Is it an entity or an item?

 

If it is an entity, check if you chose the correct export version of minecraft in blockbench

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your model has been Exported…
Sat, 03/19/2022 - 05:05

Your model has been Exported for Minecraft version 1.7 - 1.12, if that is your mod version then you are ok ... if not, on Blockbench go to : File >> Project >> and change the Export Version to the mod version you are creating. If it is for 1.18.x, then select Forge 1.17 (Mojmaps). Also, make sure the File name and Model identifier are typed correctly. In your scenario ... necromorfoz 

 

Also, you might want to double check the rotation points. https://www.youtube.com/watch?v=V3IvizLiZL4&t=260s

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
  I solved it finally, I…
Sat, 03/19/2022 - 15:08

 

I solved it finally, I need it to be a mod for 1.12.2, and the problem was the message above, thank you very much for answering