Topic category: Troubleshooting, bugs, and solutions
Hello everyone,
I'm encountering an issue with MCreator while working on a Minecraft mod. Everything was working fine until recently, but now I’m facing a compilation error. I'm getting numerous "cannot find symbol" errors related to the OcmModBlocks
class, where all of my blocks are registered.
Here’s an example of the errors I'm seeing:
Executing Gradle task: build
Build info: MCreator 2024.2.32117, forge-1.20.1, 64-bit, 16303 MB, Windows 10, JVM 21.0.3, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2024-09-22-01:29:43
BUILD FAILED
Task completed in 3 minutes and 44 seconds
> Task :compileJava
D:\dev\ocm-mod 1.20.1\src\main\java\net\mcreator\ocmd\OcmMod.java:34
: error: cannot find symbol import net.mcreator.ocmd.init.OcmModBlocks;
^
symbol: class OcmModBlocks
location: package net.mcreator.ocmd.init
Here is pasterbin link : https://pastebin.com/Y35vDYqj
The OcmModBlocks class does exist in the correct directory (src/main/java/net/mcreator/ocmd/init/), and all the blocks are correctly registered in this class. However, it seems that other files in the project are no longer able to recognize it, and I get errors wherever this class is used.
Here’s what I’ve already tried to fix the issue:
- I cleaned and rebuilt the project using the ./gradlew clean and ./gradlew build commands.
- I checked that the import statement is correctly declared in all the relevant files: import net.mcreator.ocmd.init.OcmModBlocks.
- The OcmModBlocks class seems to be correctly defined, and all the blocks are registered.
I'm using MCreator with Forge for Minecraft 1.20.1. If anyone has experienced this issue before or has any ideas on how to solve it, I’d greatly appreciate your help!
Thanks in advance for any suggestions!
Do you have any plugins installed? This could happen due to some plugin overriding this class definition
Nop :c
I was able to fix the issue by removing about thirty decorative blocks from my mod that weren't particularly important. After that, the error resolved itself and the compilation went through without any problems.
For your information, my mod currently contains 1838 blocks and a total of 5700 elements (blocks, items, etc.). I'm wondering if there's a known limit to how many elements you can add in MCreator? Does anyone know if there's an implicit limit where compilation errors start to occur?
Thanks again for the help!
This should be below the limit. At around ~3000-4000 blocks, strange things may start to happen in some cases