Started by
TheoTrickser
on
Topic category: Help with MCreator software
So I tried testing my mod one the test server after everything worked fine on the client. I added a GUI that changes Player Persistent Variables when I enter their name and an ability slot, but nothing happens. I am displaying the Variables with an overlay an when I spam the GUI button hard enough, the value of the Variable changes for a few ms, but goes back afterwards. How do I fix that? Here's the procedure:
The Image does not seem to be working, so here's the link: https://imgur.com/a/3jhCde5
In your procedure you have a small icon (to the right) on the "Get text inside textfield" block.
This is to say that you the block works only on the client side and not on the server side!
I encountered the same problem, I am looking for a solution, if I find it I share. But java is like my English! Not terrible.
I am actually using a workaround right now which works, but isn't perfect at all. Just bind the GUI to an item, save the text field contents into Item NBT Tags and then use their values to change the variables of the current player when he uses it. That should work for now, but it requires opening your inventory after every change made to the NBT Tags or else the values won't apply.