problem with compile java symbol: method getWorld()

Started by WizaRed on

Topic category: Help with modding (Java Edition)

Last seen on 15:54, 17. Nov 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
problem with compile java symbol: method getWorld()

 

> Task :compileJava
C:\MCreatorWorkspaces\thaumcraftmalum\src\main\java\net\mcreator\thaumcraftmalum\procedures\TestProcedure.java:28: error: cannot find symbol if (event.getHand() != event.getPlayer().getUsedItemHand())
^
symbol: method getPlayer()
location: variable event of type RightClickBlock
C:\MCreatorWorkspaces\thaumcraftmalum\src\main\java\net\mcreator\thaumcraftmalum\procedures\TestProcedure.java:30: error: cannot find symbol execute(event.getWorld(), event.getPlayer());
^
symbol: method getWorld()
location: variable event of type RightClickBlock
C:\MCreatorWorkspaces\thaumcraftmalum\src\main\java\net\mcreator\thaumcraftmalum\procedures\TestProcedure.java:30: error: cannot find symbol execute(event.getWorld(), event.getPlayer());
^
symbol: method getPlayer()
location: variable event of type RightClickBlock
C:\MCreatorWorkspaces\thaumcraftmalum\src\main\java\net\mcreator\thaumcraftmalum\procedures\TestProcedure.java:37: error: no suitable method found for execute(,Level,LivingEntity) execute(null, (Level) world, entity);
^
method TestProcedure.execute(LevelAccessor,LivingEntity) is not applicable
(actual and formal argument lists differ in length)
method TestProcedure.execute(Level,LivingEntity) is not applicable
(actual and formal argument lists differ in length)
4 errors
> Task :compileJava FAILED
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