Player Persistent global variable not syncing between clients

Started by Stevenator155 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Player Persistent global variable not syncing between clients
Sun, 04/09/2023 - 20:50 (edited)

Im on MCreator 2023.1 creating a mod for 1.19.2, im currently having trouble with syncing animations, using the player animator Plugin im trying to have an animation play when pressing g and this works fine on the client but it will not show for other clients, so I decided to try to sync it manually. In my attempt I tried using a Player Persistent variable, the way it works is whenever the g key is pressed it will toggle the variable for the player and another procedure that runs every player tick will look through all of the players and if the variable is true it will play the animation on that player for the current client. The variable does not seem to sync as whenever the key is presses the player can see the animation played on themselves but the other client does not play it for that player due to the variable not being true.

 

 

on player tick

 

when g key pressed

 

Edited by Stevenator155 on Sun, 04/09/2023 - 20:50
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think the player…
Mon, 04/24/2023 - 20:28

I think the player consistent type is different for every client...so u should use a global one instead