Your model name is not valid Java name

Started by ecranplasma on

Topic category: Help with modding (Java Edition)

Last seen on 05:53, 16. Jul 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your model name is not valid Java name

Hi i wanted to create a mod i made the the tex ,it worked but when i tried to import java java model(made on tabula) that show me "your model name is not valid)someone can help me?

Last seen on 00:30, 24. Aug 2023
Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You model name cannot…
Sun, 07/05/2020 - 00:34

You model name cannot contain:

- Spaces

- Special characters (-, *, &, ^, %, $, # etc.)

Your model name can contain:

- Capital / lowercase letters (a-z)

- Numbers

 

Last seen on 05:53, 16. Jul 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know that my mob name is …
Sun, 07/05/2020 - 01:27

I know that my mob name is "endervillager" and still the same message 

Last seen on 05:53, 16. Jul 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry im french my english…
Sun, 07/05/2020 - 13:44

Sorry im french my english is really bad

 

Last seen on 20:01, 17. Sep 2022
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is the model a java model?  …
Sun, 07/05/2020 - 14:16

is the model a java model?

 

 

Last seen on 05:53, 16. Jul 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes  
Sun, 07/05/2020 - 17:04

Yes

 

Last seen on 20:01, 17. Sep 2022
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
open it in notepad or any…
Sun, 07/05/2020 - 19:36

open it in notepad or any text editor and delete the first 3 lines of code so it looks like this

 

public class wild_boar_yes extends EntityModel<Entity> {
    private final ModelRenderer head;
    private final ModelRenderer head2;
    private final ModelRenderer head3;
    private final ModelRenderer head4;
    private final ModelRenderer bone2;
    private final ModelRenderer bone;
    private final ModelRenderer bb_main;

    public wild_boar_yes() {
        textureWidth = 64;
        textureHeight = 32;

        head = new ModelRenderer(this);
        head.setRotationPoint(0.0F, 9.0F, 1.0F);
        setRotationAngle(head, 1.7453F, 0.0F, 0.0F);
        head.setTextureOffset(16, 13).addBox(-2.0F, -14.8301F, -6.634F, 5.0F, 5.0F, 6.0F, 0.0F, false);

        head2 = new ModelRenderer(this);
        head2.setRotationPoint(0.0F, 9.0F, 0.0F);
        setRotationAngle(head2, 1.7453F, 0.0F, 0.0F);
        head2.setTextureOffset(3, 5).addBox(-1.0F, -15.8301F, -6.634F, 3.0F, 2.0F, 4.0F, 0.0F, false);

        head3 = new ModelRenderer(this);
        head3.setRotationPoint(0.0F, 9.0F, -1.0F);
        setRotationAngle(head3, 1.7453F, 0.0F, 0.0F);
        head3.setTextureOffset(3, 6).addBox(-0.5F, -15.8149F, -6.4603F, 2.0F, 1.0F, 3.0F, 0.0F, false);

        head4 = new ModelRenderer(this);
        head4.setRotationPoint(0.0F, 9.0F, -2.0F);
        setRotationAngle(head4, 1.7453F, 0.0F, 0.0F);
        head4.setTextureOffset(52, 16).addBox(-0.5F, -15.7997F, -6.2867F, 2.0F, 1.0F, 2.0F, 0.0F, false);
        head4.setTextureOffset(11, 16).addBox(-2.0F, -10.3842F, -1.3916F, 2.0F, 2.0F, 2.0F, 0.0F, false);
        head4.setTextureOffset(12, 16).addBox(1.0F, -10.3842F, -1.3916F, 2.0F, 2.0F, 2.0F, 0.0F, false);

        bone2 = new ModelRenderer(this);
        bone2.setRotationPoint(0.0F, -7.6983F, -10.5513F);
        head4.addChild(bone2);
        setRotationAngle(bone2, 0.6109F, 0.0F, 0.0F);
        bone2.setTextureOffset(56, 28).addBox(-2.0F, -1.9277F, 6.2561F, 1.0F, 1.0F, 3.0F, 0.0F, false);
        bone2.setTextureOffset(56, 26).addBox(2.0F, -1.9277F, 6.2561F, 1.0F, 1.0F, 3.0F, 0.0F, false);

        bone = new ModelRenderer(this);
        bone.setRotationPoint(0.0F, 0.0F, 0.0F);
        head4.addChild(bone);
        

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

    @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);
        head2.render(matrixStack, buffer, packedLight, packedOverlay);
        head3.render(matrixStack, buffer, packedLight, packedOverlay);
        head4.render(matrixStack, buffer, packedLight, packedOverlay);
        bb_main.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;
    }
}

 

and in the part where it says wild boar you have you're name and you have to change the name to a valid name (no spaces or punctuation)

Last seen on 05:53, 16. Jul 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes
Mon, 07/06/2020 - 00:27

Yes

Last seen on 05:53, 16. Jul 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks
Mon, 07/06/2020 - 00:28

Thanks

Last seen on 20:01, 17. Sep 2022
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you're welcome
Mon, 07/06/2020 - 14:57

you're welcome