Map variable/overlay problem

Published by thebebist on Sat, 03/23/2019 - 07:23
Upvotes: 1
Issue description

when i use a overlay to display a map variable over the hotbar the display on screen does not update so it is always 0.0, but all my machines that uses this variable to run works perfectly. so the variable is increased but the overlay does not update the text on screen.

Issue comments

This could be caused because most procedures are server side but variables are client side. One way to solve this is to have another variable with scope GLOBAL_SESSION which is client-side variable and is not stored. Then set the same value to this variable too, so one variable is server side and stored and one variable is bound to the client and shown to the player in the overlay, which is a client-side mod element.

MCreator 1.9.1 will automatically sync GLOBAL_MAP and GLOBAL_WORLD variables between all clients and server so there will be no need to make the workaround I wrote in the comment above plus the whole system will work in a server multiplayer scenario too.

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.