Started by
Afacto
on
Topic category: Troubleshooting, bugs, and solutions
Hi, I discovered this while regenerating the code on my mod. I tried regenerating several times but it didn't make a change. I am using an M1 mac. (I deleted a few unimportant parts) It says "cannot find symbol" and this randomly popped up; I haven't had this before and I haven't made any changes since then. I'm not sure if this the reason why MCreator crashes when I load this workspace into a version newer than 2022.1 and I can't work on it on those versions. All these blocks are blocks with a GUI and that variable defined is one that it automatically created so I don't know how to fix it. Can anyone understand the reason? Thanks in advance.
Here's part of the build log
_____
> Task :compileJava
/Users/user/MCreatorWorkspaces/afacto_minecraft_edition_1_1/src/main/java/com/afactohq/afactominecraftedition/block/entity/SteelMillBlockEntity.java:92: error: cannot find symbol return new SteelMillGUIMenu(id, inventory, new FriendlyByteBuf(Unpooled.buffer()).writeBlockPos(this.worldPosition));
^
symbol: class SteelMillGUIMenu
location: class SteelMillBlockEntity
12 errors
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
BUILD FAILED in 9s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 15 seconds
It seems that MCreator doesn't find SteelMillGuiMenu Class.
Do you have a Mod Element locked?
There shouldn't be, there are 12 errors that say the same thing but with different blocks with GUIs
Part of the code around that line:
I believe it comes from broken custom java models. Not sure though. I think you need to delete the element that's using the model then remake it from scratch. Hope this helps!
Looking at the code, I believe this is the case.
I believe to have found a solution. I had the same issue with Geckolib models. My solution was to delete then re-import the models. Gradle was happy after that. Maybe it will help with your problem as well