Topic category: Troubleshooting, bugs, and solutions
I’m developing a mod using MCreator 2025.2 with NeoForge 1.21.1, and I’m trying to register a Block Entity
But it gives this error here:
Executing Gradle task: runClient
Build info: MCreator 2025.2.28610, neoforge-1.21.1, 64-bit, 32607 MB, Windows 11, JVM 21.0.7, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2025-08-11-10:53:54
Reusing configuration cache.
> Task :processResources UP-TO-DATE
> Task :createMinecraftArtifacts UP-TO-DATE
> Task :downloadAssets UP-TO-DATE
> Task :writeClientLegacyClasspath UP-TO-DATE
> Task :prepareClientRun UP-TO-DATE
> Task :compileJava
C:\Users\User\MCreatorWorkspaces\more_pylons\src\main\java\net\mcreator\morepylons\init\MorePylonsModBlockEntities.java:33: error: cannot find symbol event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, THERMO_PYLON.get(), (blockEntity, side) -> ((ThermoPylonBlockEntity) blockEntity).getItemHandler());
^
symbol: method getItemHandler()
location: class ThermoPylonBlockEntity
1 error
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler output below.
Note: Recompile with -Xlint:unchecked for details.
C:\Users\User\MCreatorWorkspaces\more_pylons\src\main\java\net\mcreator\morepylons\init\MorePylonsModBlockEntities.java:33: error: cannot find symbol event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, THERMO_PYLON.get(), (blockEntity, side) -> ((ThermoPylonBlockEntity) blockEntity).getItemHandler());
^
symbol: method getItemHandler()
location: class ThermoPylonBlockEntity
1 error
* Try:
> Check your code and dependencies to fix the compilation error(s)
> Run with --scan to get full insights.
BUILD FAILED in 6s
6 actionable tasks: 1 executed, 5 up-to-date
Configuration cache entry reused.
BUILD FAILED
Task completed in 12 seconds
Please open a bug report at https://github.com/MCreator/MCreator/issues and include ZIP of your workspace