GUI clear slot and add item to slot don't work.

Started by molioron123 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
GUI clear slot and add item to slot don't work.

Hey, 

So i have created a gui (using the node based codes) where players can input cash (item), and the mod will transfer it to emeralds. it looks something like this:

Event trigger(button in gui)

{

setItemInSlot(numbers of items in slot [2] of inventory [inherited] [(number of items)] , emerald [(item type)] , [3] [(slot)])

clearSlot(2)

}

 

the button works (used text debugging), slots are correct, but nothing happens,

 

Thanks.