1.7.9 Procedure: How to detect number of items in a GUI?

Started by RedInventor on

Topic category: Advanced modding

Last seen on 03:57, 30. Oct 2020
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1.7.9 Procedure: How to detect number of items in a GUI?

I am trying to make a machine where it takes two items and converts them into something else. I can't find anything that detects the number of items only set, and get items from inventory.

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a block in…
Thu, 05/10/2018 - 14:12

There is a block in Procedures that is consuming abount of Specyfic item in CGUI slot  with number
but consuming item from slot is not updating so you might expect that items might disappear from slont and come back there 

Last seen on 03:57, 30. Oct 2020
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I notice that. What can I do…
Thu, 05/10/2018 - 18:38

I notice that. What can I do to make my machine work the way it supposes to?

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well you can try to make…
Sat, 05/12/2018 - 17:23

Well you can try to make procedure and assgn it to On Tick update in Block that technicy should work

Last seen on 03:57, 30. Oct 2020
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://docs.google.com…
Tue, 05/22/2018 - 22:26

https://docs.google.com/document/d/1Sv_GiUERcJa5ovccmi4C7FK3vil-5JC5CR2…

Here are some pictures of what I have. The first picture is the code, which detects the item. In the 2nd and 3rd picture shows what it does, but when I try to take the item out it goes back to normal (2nd picture).

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can try to make button…
Wed, 05/23/2018 - 20:25

You can try to make button that is checking if specific items are in gui slot than after clicking on it it will remove items and place specific item in output slot, I was doing similar think and got same results as you the think is that mcreator is not updating this gui properly so if you for example put stack of something it will constantly taking this item from stack without any break or check its taking because its write in code that he have to take it but I will try to bypass this 

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use block actions instead of…
Wed, 05/23/2018 - 21:12

Use block actions instead of GUI actions because they don't work properly.

For checking the number of items in a slot, use the get number of items of slot x in block at x y z

For example, if you want that your procedure adds an item to the output slot

Set (number of items: get number of items at slot x +1) items to slot x of block at x y z (choose item)

Last seen on 03:57, 30. Oct 2020
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It works now. Thank you,…
Wed, 05/23/2018 - 22:58

It works now. Thank you, RaolTgeBest.