getPersistentData() stops compiling

Started by Silly Billy on

Topic category: Help with modding (Java Edition)

Last seen on 14:56, 22. Oct 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
getPersistentData() stops compiling

entity.getPersistentData().putDouble("redrep", (entity.getPersistentData().getDouble("redrep") - 1));
^
symbol: method getPersistentData()
location: variable entity of type Entity
3 errors
> Task :compileJava FAILED

This is one of the three errors my console showed me. What I did was create a procedure for when my custom mob dies (Im creating a faction reputation system and this is a guard for a faction) so when this mob dies it sets the event entities custom number nbt tag "redrep" (reputation of the red faction) to the current redrep subtracted by 1. however this block code is stopping my stuff from compiling somehow and I cant figure out what it is or how to fix it myself.

Last seen on 16:37, 22. Oct 2024
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try clicking the plaster…
Tue, 10/22/2024 - 12:09

Try clicking the plaster icon in the top right

Last seen on 14:56, 22. Oct 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
regenerate code and build?…
Tue, 10/22/2024 - 14:53

regenerate code and build? If so I have tried that multiple times and it doesnt seem to change anything about my issue so far.

Last seen on 16:37, 22. Oct 2024
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you send your procedure?
Tue, 10/22/2024 - 14:55

Can you send your procedure?