Started by
Raspad
on
Topic category: Help with Minecraft modding (Java Edition)
Is it possible for one NPC to have multiple guis?
I wanted to make a merchant NPC like custom npc.
I made a similar set of slots as well as created a copy of the gui with some differences.
But it turns out that either the gui specified in the character itself opens or not one of the guis opens
According to the idea, if with RMB on the NPC a store opens, and with RMB with a chicken feather in hand, the gui should open to configure the store.
You can make it a right click on entity action, instead of having a GUI bound to the NPC. But yeah, it wouldn't be bound then, so that wouldn't work.
My solution is to have it in one gui, and trade editing options appear only when the player is holding a feather. In my opinion a better way to start editing would be being in creative mode instead.
In truth, I did not do such logic in the gui itself, since I did not see any examples.
PS. I looked at the description of the RMB trigger in the NPC .. most likely the problem here may be that this procedure is needed to tame some creatures .. And my RMB procedure returns the wrong data, which is why the selective opening of the GUI is not processed.