server side to client side variables

Started by jeed_90 on

Topic category: Help with modding (Java Edition)

Last seen on 06:30, 28. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
server side to client side variables
Fri, 06/28/2024 - 03:53 (edited)

I was testing stuff and i notice that "is entity attacking" only acts in server side, but if is true i wanna do  "make entity look" which is client side both can work together. i dont wanna use global variables since for entity will be alot of trouble for using uuid and stuff. any clue how to make a server var sync to a render var?

 

i saw that changing the display name  in server side can make client side read it, but i dont wanna change the name for something like that.

 

nbt are not sync, maybe if entity  spawn other entity then send back nbt to original entity but thats too much trouble for 1 variable to 1 entity which is an enemy an can be alot of them. any clues?

Edited by jeed_90 on Fri, 06/28/2024 - 03:53
Last seen on 06:30, 28. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
for now i can use the uuid,…
Fri, 06/28/2024 - 04:48

for now i can use the uuid, lets say if text contain uuid means true. the text i use is global_session for all entitys that use it, if uuid is in text it means true for each entitys uuid.

server side (TRUE means: text contain uuid,if uuid not already in text -> add text)(False means: text doesnt contain uuid,if uuid already in text -> remove)

client side (if entitys uuid is in text -> true)(if entitys uuid is not in text -> false)

 

Not sure there is any easier way, any clues?, also it can only use string so adding variables is tricky but possible