Unable to properly import Java model

Started by JayStarPlays on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 20:54, 16. Jul 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unable to properly import Java model

Whenever I attempt to upload a Java model, it gives me this error saying

"Your model name is not a valid Java name! Custom mob model names can not contain whitespace, start with number or contain any non ASCII letters. Model name is not filename, but the name inside the model Java code (model class name)! The best solution to this problem is to properly define the model name in your modeler before exporting the model."

I've tried messing around, making new models from scratch and messing around with the code inside the file, but it doesn't change. Please help!

I am using blockbench to make these models, fyi.

Last seen on 09:13, 31. May 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you saved your model, go…
Sat, 05/02/2020 - 13:36

If you saved your model, go to blockbench, click File>Project...>Change the mob geometry name to the same thing as your file name.
If you haven't, open the .java file with for example notepad++ and replace:
public class *SOMETHING* extends ModelBase {
to 
public class FILENAME(without the .java) extends ModelBase {
do the same thing with everything that has the wrong name, such as
    public SOMETHING() {
 

Last seen on 20:54, 16. Jul 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've tried all that, and it…
Sat, 05/02/2020 - 18:24

I've tried all that, and it still gives me the same error message. :/ 

Last seen on 20:54, 16. Jul 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wow, you're a very nice…
Sun, 05/03/2020 - 02:39

Wow, you're a very nice person. You are soooo nice and so friendly.