How to convert player persistent variable into something without entities to work it with proced that dislikes entities?

Started by kittysatanic on

Topic category: Help with modding (Java Edition)

Last seen on 13:50, 21. Mar 2024
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to convert player persistent variable into something without entities to work it with proced that dislikes entities?

Ok, I have an somekind of super abilities and I want it to work in multiplayer. The scheme is: player using ability (connected to item with special enchantment) -> procedure of ability works -> it triggers another procedure that setting up time of reload and time of animation (universal for all abilities) -> overlay animation procedure (I did it super long ago and it is super noobie of course cuz im stupid to understand some more human alike possibilities). Overlay is also tied to item and its enchantment.

 The problem is - this animation procedure dislikes entities which makes player_persistent variables useless. I thought about nbt but the "get" thing still requires what item it uses. Usage of "item in main hand" causes a lot of unwanted bugs. Using Global_map variables instead of/with player_persistent will make my mod unusable in multiplayer which is acceptable but sad. I don't have any other ideas how to deal with that with minimal effort...