Can't upload java model into MCreator

Started by Ploxy on

Topic category: Help with MCreator software

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can't upload java model into MCreator

I created entity model in Blockbench, but when i upload model MCreator say Your model name is not valid Java name!

Yes, I renamed file.

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Did you renamed the model,…
Thu, 07/23/2020 - 10:19

Did you renamed the model, not the file? You need to rename the file name and the model identifier inside Blockbench!

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, Project name, model…
Fri, 07/24/2020 - 06:56

Yes, Project name, model name and file name are same

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you tell me what's your…
Fri, 07/24/2020 - 09:58

Can you tell me what's your model name? Because it must contain no CAPS, no space, no "accent",...

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you tell me what's your…
Fri, 07/24/2020 - 09:58

Can you tell me what's your model name? Because it must contain no CAPS, no space, no accent, ...

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
first, if you are using the…
Fri, 07/24/2020 - 10:11

first, if you are using the most recent blockbench version the format is different and the model won't compile. I'm not sure how far you need to go back, but try 6 months back to 2 years back. Also, you need to open the java file with a text editor and change the names in the place that i filled in as cstom. If you change the name in both places and have the right version your model should work.

// Made with Blockbench
// Paste this code into your mod.
// Make sure to generate all required imports

public class cstom_model extends ModelBase {
	private final ModelRenderer head;
	private final ModelRenderer rightLeg;
	private final ModelRenderer leftLeg;
	private final ModelRenderer rightArm;
	private final ModelRenderer leftArm;
	private final ModelRenderer body;

	public cstom_model() {
		textureWidth = 32;
		textureHeight = 32;

		head = new ModelRenderer(this);
		head.setRotationPoint(0.0F, 12.0F, 0.0F);
		head.cubeList.add(new ModelBox(head, 0, 0, -2.0F, -4.0F, -2.0F, 4, 4, 4, 0.0F, false));

		rightLeg = new ModelRenderer(this);
		rightLeg.setRotationPoint(0.95F, 18.0F, 0.0F);
		rightLeg.cubeList.add(new ModelBox(rightLeg, 12, 12, -1.0F, 0.0F, -1.0F, 2, 6, 2, 0.0F, false));

		leftLeg = new ModelRenderer(this);
		leftLeg.setRotationPoint(-0.95F, 18.0F, 0.0F);
		leftLeg.cubeList.add(new ModelBox(leftLeg, 0, 16, -1.0F, 0.0F, -1.0F, 2, 6, 2, 0.0F, false));

		rightArm = new ModelRenderer(this);
		rightArm.setRotationPoint(2.5F, 13.0F, 0.0F);
		rightArm.cubeList.add(new ModelBox(rightArm, 16, 0, -0.5F, -1.0F, -1.0F, 2, 6, 2, 0.0F, false));

		leftArm = new ModelRenderer(this);
		leftArm.setRotationPoint(-2.5F, 13.0F, 0.0F);
		leftArm.cubeList.add(new ModelBox(leftArm, 18, 18, -1.5F, -1.0F, -1.0F, 2, 6, 2, 0.0F, false));

		body = new ModelRenderer(this);
		body.setRotationPoint(0.0F, 12.0F, 0.0F);
		body.cubeList.add(new ModelBox(body, 0, 8, -2.0F, 0.0F, -1.0F, 4, 6, 2, 0.0F, false));
	}

	@Override
	public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
		head.render(f5);
		rightLeg.render(f5);
		leftLeg.render(f5);
		rightArm.render(f5);
		leftArm.render(f5);
		body.render(f5);
	}
	public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
		modelRenderer.rotateAngleX = x;
		modelRenderer.rotateAngleY = y;
		modelRenderer.rotateAngleZ = z;
	}

 

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I created entity model in…
Fri, 07/24/2020 - 10:36

I created entity model in Blockbench, but when i upload model MCreator say Your model name is not valid Java name!

Use latest version of MCreator please, it fixes this issue, this is a known mcreator bug that you didn't bother search

if you still wish to use 2020.2 delete the part of the .java with //something

 

As crispy said, update to…
Fri, 07/24/2020 - 10:55

As crispy said, update to 2020.3 or if you want to stay on 2020.2 for some unknown reason, at least be fair and tell you are using outdated version to not confuse users trying to help you.

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
swamp_monster
Fri, 07/24/2020 - 10:59

swamp_monster

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It works! Thanks
Fri, 07/24/2020 - 11:01

It works! Thanks