my java entity is saying same name in code and don't know why

Started by itzmodestep3 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
my java entity is saying same name in code and don't know why

so i have an error in importing where it says the name in the code is the same, could someone help me

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this is a known issue, they…
Thu, 05/28/2020 - 10:20

this is a known issue, they fixed it in 1.15.

Joined Jan 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had a similar problem. I…
Thu, 05/28/2020 - 17:22

I had a similar problem. I didn't understand very well what is your problem about, but if it is what happened to me with entities then this might help you.

So in my mod i made some mobs, and I imported one of them sucsesfully, but when i tried to import other one, it showed an error saying that there was alredy a mob with that name (even if they were different files with different names). After exploring a little, it turns out that yu just need to open the mob model (.java) with notepad, then in the first few lines you will see this: "public class custom_model extends EntityModel<Entity>" and down in other line this: "public custom_model()". in there, where it says "custom model" (or whatever it ways in that exact place), you need to change from "custom_model" to other thing (normally, the mob name). in the other line you need to do the same, changing the "custom_model" to EXACTLY the same as you changed to in the other line. Make sure that both replacements of "custom_model" has the exact same name (even capital letters). then save it and import it. It turns out that for .java models, it doesnt use the file name, instead it uses the java class name. So even if the file names are different, if both java class has same name it will count as same name of file in MCreator.

Again, i don't know if this is exactly what happens to you, but for me it worked

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oops, not 1.15, 2020.3 :D…
Fri, 05/29/2020 - 00:56

oops, not 1.15, 2020.3 :D
don't rename your model and change the model identifier to use no special symbols and use lowercase characters when importing to mcreator 2020.3