Topic category: Help with Minecraft modding (Java Edition)
Howdy!
I recently finished working on a small mod I wanted to have on my friend's server, and everything worked just fine in singleplayer.
As for servers... there is something weird happening.
I have a player-specific gui that basically sets an item into a slot when you press a button.
And until this point, everything works, the item appears.
But as soon as I want to click on it or move it out of the output slot, it just disappears.
As I said, this only happens on servers. In singleplayer, I can transfer the item in to my inventory without any problems.
I tried figuring this out for a while and looked through some threads, but there wasn't anything helpful at all.
Well, I'd be very thankful if anyone could help me with this annoying issue.
Thank you in advance!
You need to bind GUI to some container for it to be synced correctly, meaning item, block, or entitiy
Yea, I already thought of that
In my case, you need to interact with a block which opens up a GUI that is not bound to the block, because I want it to be separately for each player, meaning that the item that's set into the slot can't be picked up by another player.
How would I do that? How do I bind the gui to the player?
There is no way without coding to bind GUI to the player. You would likely need to implement custom player capability and bind to that
Okay, alright
Right now I decided to bind the GUI to the block, so it is now bound to the block, but the issue still persists.
Okay, after some testing I figured out that there is something wrong with changing an items NBT tags or display names in a gui, for some reason
It works when I set a normal item in the slot, tho, but I want to change the nbt tags and display name tho
Nevermind.
I just found out that textfield synchronisation between client and server, which is needed for the correct item nbt, is not possible in MCreator.
After looking through countless threads, this has been a problem for many others too, and honestly I do not understand why this is still not being implemented as this is a very important function in my opinion.
Well, it seems I will have to make the way the player inputs the text/number very awkward by buttons. Great.
Thank you for the help, anyways.