Damage Tool not working?

Started by SRTX_999 on

Topic category: Help with modding (Java Edition)

Last seen on 08:39, 24. Feb 2019
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Damage Tool not working?

Hi, I'm trying to do a tool, which can make a coal ore to diamond ore, if rightclicked, and it has 30 uses. The only problem is, when I make the damage item event, I got an error. How can I make it to work?

 

:clean
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\mcreator_presser.java:80: error: cannot find symbol
:compileJava FAILED
               itemstack.damageItem(1, entity);
               ^
  symbol: variable itemstack
1 error
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.
BUILD FAILED
Total time: 51.297 secs
C:\Pylo\MCreator175\forge>
Task completed with return code 0 in 55397 milliseconds

 

Sorry for my bad english.

In the event system, this is…
Sun, 02/24/2019 - 11:13

In the event system, this is not possible always, unfortunately. Update MCreator to 1.8.2 and start using procedure system which has this working.