Custom entity variable randomly going null.

Started by AGNAB on

Topic category: Help with modding (Java Edition)

Last seen on 17:23, 31. Dec 2023
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom entity variable randomly going null.

hiya, currently my code basically scans for an unclaimed entity, then follows it

but for some reason, after the scanning occurs (which works just fine) it just kind of clears the follow variable and sets it to null and i'm not sure why

here is the code: https://imgur.com/a/Gk5pkGD

Last seen on 05:21, 25. Apr 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Local variables are cleared…
Wed, 05/31/2023 - 11:41

Local variables are cleared after the procedure finishes executing once.

Last seen on 17:23, 31. Dec 2023
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that makes sense, i can…
Wed, 05/31/2023 - 11:59

that makes sense, i can probably just use nbt tags to work around it

thank you