Your workspace contains mod elements that dont compile correctly

Started by AInvisiblePerson on

Topic category: Troubleshooting, bugs, and solutions

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your workspace contains mod elements that dont compile correctly

I'm trying to make a mod using the fabric plugin 1.19.1 using MCreator 2022.2 EAP (31711)

The error is (from the console)

Executing Gradle task: build
Build info: MCreator 2022.2.31711 EAP (31711), fabric-1.19.1, 64-bit, 8192 MB, Mac OS X, JVM 17.0.3, JAVA_HOME: /private/var/folders/p1/qvhm3gr57md3cc4s7vd1jrv80000gn/T/AppTranslocation/AC5A68D8-5AE9-469F-A12A-D5541F3289C2/d/MCreator.app/Contents/MacOS/jdk/Contents/Home, started on: 2022-07-30-10:13:45
 
> Configure project :
Fabric Loom: 0.12.55
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.
> Task :compileJava FAILED
/Users/######/MCreatorWorkspaces/notasusmod/src/main/java/net/mcreator/notasusmod/procedures/GivePotatoProcedure.java:24: error: cannot find symbol   entity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> {
     ^
 symbol: variable CapabilityItemHandler
 location: class GivePotatoProcedure
/Users/#######/MCreatorWorkspaces/notasusmod/src/main/java/net/mcreator/notasusmod/procedures/GivePotatoProcedure.java:25: error: cannot find symbol   if (capability instanceof IItemHandlerModifiable _modHandler)
      ^
 symbol: class IItemHandlerModifiable
 location: class GivePotatoProcedure
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
1 actionable task: 1 executed
 
BUILD FAILED
Task completed in 5 seconds

For context, I am trying to make a mod with a person with a hot potato and want the player to have it in their 8th inventory slot.