Model name is not a valid Java name!

Started by periodt. on Wed, 07/24/2019 - 08:32

Topic category: Help with modding (Java Edition)

Last seen on 11:56, 26. Jul 2019
Joined Jul 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Model name is not a valid Java name!
Wed, 07/24/2019 - 08:33 (edited)

I made my mob and i named it to Mob1 and i was trying to import mob into MCreator and it gave me error saying:

Screenshot of that error

What does that mean i don't understand help me

Edited by periodt. on Wed, 07/24/2019 - 08:33
Last seen on 11:56, 26. Jul 2019
Joined Jul 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Russian
Thu, 07/25/2019 - 14:08

Russian

Last seen on 07:53, 10. Apr 2020
Joined Mar 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
im having the same error its…
Mon, 08/05/2019 - 20:13

im having the same error its so annoying, i renamed it 5 times, and i even renamed it to nothing but .java, nothing works. 

Not the filename, change the…
Mon, 08/05/2019 - 20:51

Not the filename, change the name in Java code. Check other forum topics like this one.

Last seen on 15:54, 28. May 2020
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
unhelpful
Thu, 05/28/2020 - 15:55

unhelpful

Last seen on 18:13, 17. Jun 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
you just need to open the…
Thu, 05/28/2020 - 17:33

you 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.