Invalid Name for Java?

Started by Duccy on Thu, 10/29/2020 - 20:49

Topic category: Help with modding (Java Edition)

Last seen on 19:02, 10. Nov 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Invalid Name for Java?
Thu, 10/29/2020 - 20:49

Im trying to import a normal wolf model from blockbench and it tells me my model name or whatever is wrong in the file, I know its a common problem because I've looked it up everywhere but cant find a solution that works for me, I'm modding for 1.12.2 and heres the code of the model.

 

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

public class geometry.wolf extends ModelBase {
    private final ModelRenderer head;
    private final ModelRenderer body;
    private final ModelRenderer upperBody;
    private final ModelRenderer leg0;
    private final ModelRenderer leg1;
    private final ModelRenderer leg2;
    private final ModelRenderer leg3;
    private final ModelRenderer tail;

    public geometry.wolf() {
        textureWidth = 64;
        textureHeight = 32;

        head = new ModelRenderer(this);
        head.setRotationPoint(1.0F, 13.5F, -7.0F);
        head.cubeList.add(new ModelBox(head, 0, 0, -3.0F, -3.0F, -2.0F, 6, 6, 4, 0.0F, true));
        head.cubeList.add(new ModelBox(head, 16, 14, 1.0F, -5.0F, 0.0F, 2, 2, 1, 0.0F, true));
        head.cubeList.add(new ModelBox(head, 16, 14, -3.0F, -5.0F, 0.0F, 2, 2, 1, 0.0F, true));
        head.cubeList.add(new ModelBox(head, 0, 10, -1.5F, -0.02F, -5.0F, 3, 3, 4, 0.0F, true));

        body = new ModelRenderer(this);
        body.setRotationPoint(0.0F, 14.0F, 2.0F);
        body.cubeList.add(new ModelBox(body, 18, 14, -2.0F, -3.0F, -3.0F, 6, 6, 9, 0.0F, true));

        upperBody = new ModelRenderer(this);
        upperBody.setRotationPoint(1.0F, 14.0F, 2.0F);
        upperBody.cubeList.add(new ModelBox(upperBody, 21, 0, -4.0F, -3.0F, -8.0F, 8, 6, 7, 0.0F, true));

        leg0 = new ModelRenderer(this);
        leg0.setRotationPoint(2.5F, 16.0F, 7.0F);
        leg0.cubeList.add(new ModelBox(leg0, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        leg1 = new ModelRenderer(this);
        leg1.setRotationPoint(-0.5F, 16.0F, 7.0F);
        leg1.cubeList.add(new ModelBox(leg1, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        leg2 = new ModelRenderer(this);
        leg2.setRotationPoint(2.5F, 16.0F, -4.0F);
        leg2.cubeList.add(new ModelBox(leg2, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        leg3 = new ModelRenderer(this);
        leg3.setRotationPoint(-0.5F, 16.0F, -4.0F);
        leg3.cubeList.add(new ModelBox(leg3, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        tail = new ModelRenderer(this);
        tail.setRotationPoint(1.0F, 12.0F, 8.0F);
        tail.cubeList.add(new ModelBox(tail, 9, 18, -1.0F, 0.0F, 0.0F, 2, 8, 2, 0.0F, true));
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        head.render(f5);
        body.render(f5);
        upperBody.render(f5);
        leg0.render(f5);
        leg1.render(f5);
        leg2.render(f5);
        leg3.render(f5);
        tail.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 17:31, 26. Nov 2020
Joined Nov 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
geometry.wolf When you use…
Thu, 10/29/2020 - 21:10

geometry.wolf

When you use the model identifier name is invalid. Change it in Blockbench and reimport it.

Last seen on 19:02, 10. Nov 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I did it and it still doesnt…
Thu, 10/29/2020 - 21:14

I did it and it still doesnt work, heres the new code

 

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

public class geometry.wolf extends ModelBase {
    private final ModelRenderer head;
    private final ModelRenderer body;
    private final ModelRenderer upperBody;
    private final ModelRenderer leg0;
    private final ModelRenderer leg1;
    private final ModelRenderer leg2;
    private final ModelRenderer leg3;
    private final ModelRenderer tail;

    public geometry.wolf() {
        textureWidth = 64;
        textureHeight = 32;

        head = new ModelRenderer(this);
        head.setRotationPoint(1.0F, 13.5F, -7.0F);
        head.cubeList.add(new ModelBox(head, 0, 0, -3.0F, -3.0F, -2.0F, 6, 6, 4, 0.0F, true));
        head.cubeList.add(new ModelBox(head, 16, 14, 1.0F, -5.0F, 0.0F, 2, 2, 1, 0.0F, true));
        head.cubeList.add(new ModelBox(head, 16, 14, -3.0F, -5.0F, 0.0F, 2, 2, 1, 0.0F, true));
        head.cubeList.add(new ModelBox(head, 0, 10, -1.5F, -0.02F, -5.0F, 3, 3, 4, 0.0F, true));

        body = new ModelRenderer(this);
        body.setRotationPoint(0.0F, 14.0F, 2.0F);
        body.cubeList.add(new ModelBox(body, 18, 14, -2.0F, -3.0F, -3.0F, 6, 6, 9, 0.0F, true));

        upperBody = new ModelRenderer(this);
        upperBody.setRotationPoint(1.0F, 14.0F, 2.0F);
        upperBody.cubeList.add(new ModelBox(upperBody, 21, 0, -4.0F, -3.0F, -8.0F, 8, 6, 7, 0.0F, true));

        leg0 = new ModelRenderer(this);
        leg0.setRotationPoint(2.5F, 16.0F, 7.0F);
        leg0.cubeList.add(new ModelBox(leg0, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        leg1 = new ModelRenderer(this);
        leg1.setRotationPoint(-0.5F, 16.0F, 7.0F);
        leg1.cubeList.add(new ModelBox(leg1, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        leg2 = new ModelRenderer(this);
        leg2.setRotationPoint(2.5F, 16.0F, -4.0F);
        leg2.cubeList.add(new ModelBox(leg2, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        leg3 = new ModelRenderer(this);
        leg3.setRotationPoint(-0.5F, 16.0F, -4.0F);
        leg3.cubeList.add(new ModelBox(leg3, 0, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));

        tail = new ModelRenderer(this);
        tail.setRotationPoint(1.0F, 12.0F, 8.0F);
        tail.cubeList.add(new ModelBox(tail, 9, 18, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, true));
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        head.render(f5);
        body.render(f5);
        upperBody.render(f5);
        leg0.render(f5);
        leg1.render(f5);
        leg2.render(f5);
        leg3.render(f5);
        tail.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 19:02, 10. Nov 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
what can I change the name…
Fri, 10/30/2020 - 11:50

what can I change the name to?

 

 

Last seen on 17:31, 26. Nov 2020
Joined Nov 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Anything without full stops…
Fri, 10/30/2020 - 12:30

Anything without full stops and special characters.

Change the model identifier field in Blockbench.

 

It is under File, Project.

Click Project and change the model identifier name.

Last seen on 19:02, 10. Nov 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks!! It worked! :D
Fri, 10/30/2020 - 13:50

Thanks!! It worked! :D