Very strange things happen when working with GUI procedures.

Started by StellaeLux on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Very strange things happen when working with GUI procedures.

The GUI is simple:

One input slot (0), One button, One output slot (1).

When a player places in an item (say diamonds) inside of the input slot and press the button, the same amount of another item (say dirt?) appears in the output slot and the input slots gets cleared.

The button has the following procedure attached:

------------------------------------------------------------------------

if Get number of items from slot 0 of inventory [nameOfInventory] >= 1 AND Get item from slot 0 of inventory [nameOfInvetory] = [Diamond] 
//If there's 1 or more diamonds in slot 0

do Set Get number of items from slot 0 of inventory [nameOfInventory] [Dirt] in slot 1 of inventory [nameOfInventory] 
//Place that amount of dirt in slot 1

do Remove Get number of items from slot 0 of inventory [nameOfInventory] items from slot 0 of inventory [nameOfInventory] 
//Remove that amount of diamonds from slot 0

------------------------------------------------------------------------

What I was expecting is that upon pressing the button, slot 0 would become empty. Slot 1 would have Dirt and you'd simply drag that dirt into your inventory.

But this is what happened:

1. When pressing the button, the Dirt appears, but when you press it, it disappears and the Diamonds are back in slot 0...

2. When pressing the button, the Dirt appears. When Shift Clicking the Dirt, you make it jump into your inventory. Upon closing your inventory, your Dirt will disappear, leaving you with neither diamonds nor dirt.

3. When pressing the button, the Dirt appears. When Shift Clicking the Dirt, you make it jump into your inventory. If you now press the dirt, it will disappear and your diamonds (that were previously gone) will now be back inside of input slot 0.

4. When leaving your diamonds inside of input slot 0 and closing the GUI (with e), the diamonds will be dropped automatically, but cannot be picked up (not even by a hopper).

Are these behaviours bugs? 

Last seen on 15:00, 30. Dec 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
WHERE DO I FIND A "AND"…
Sat, 07/17/2021 - 16:57

WHERE DO I FIND A "AND" BLOCK???