Started by
StellaeLux
on
Topic category: Help with MCreator software
Each variable has 2 values: 1 value on the client side and 1 on the server side. Using [World Data] Is provided world remote (client side) and the NOT option, it's possible to check whether something is either server or client side.
Currently, I want to use On Player Tick Update/Player Joins the World (Server Side only) to set an NBT tag to 10 for example. Then I want to check for that NBT tag in the Overlay procedures (Client Side only).
How would I be able to achieve that?
Why not? This is the standard way to do this for most things, even when not using MCreator but with plain Java code.
I meant: if "Is provided world remote (client side)" // = client side.
do...
if NOT "Is provided world remote (client side)" // = server side.
do...
Then I am not sure I understood you properly. You want to hold a separate set of NBT tags for client and server-side?
I need to set an entity NBT tag "Counter" in a server only procedure and use the value in a client only procedure. (The player tick, server only and overlay client only).
This is what will happen:
Setting the NBT tag to 10 in on player tick: Counter Client side = 0, Counter Server side = 10.
Then I need to check the value in overlay: Checks client side = 0.
I was wondering how I could manage to be able to see the 10 instead of the 0.
I am not sure if you can do this as NBT should be assumed to be synchronized and should be. If you are doing this for a player entity, consider using GLOBAL_SESSION instead which is stored per player/client on the client-side.
Thanks!
Check the email when you have time ;)
Done deal!