can't import java models

Started by Lqe on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 00:25, 16. Mar 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can't import java models

im making a mod that adds more mobs to minecraft but when I tried to import the second model I created it said "Model with the name name of first model already exists! Make sure that the model name is different and import it again." I did that and even tried forcing the files into the models folder on my mod but it only accepts one model and the other model breaks the living entity elements whenever I try to let them have it

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's probably because you…
Sun, 10/20/2019 - 15:17

It's probably because you changed the file name instead of the Geometry name.

To change the geometry name try this:

import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;

public class GeometryName extends ModelBase {
	private final ModelRenderer bone;

	public GeometryName() {
		textureWidth = 16;
		textureHeight = 16;

		bone = new ModelRenderer(this);
		bone.setRotationPoint(0.0F, 24.0F, 0.0F);
		bone.cubeList.add(new ModelBox(bone, 0, 0, -1.0F, -1.0F, 0.0F, 1, 1, 1, 0.0F, false));
	}

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

You can open your java file in a text editor.

Where ever you see "GeometryName" (this will be a different name for you), write something else in ASCII letters.

The "GeometryName" can be found twice where the class is defined and where the constructor is defined.