Code block for detecting how many slots a block's inventory has

Started by QbertGuyGo on

Topic category: Feature requests and ideas for MCreator

Last seen on 01:10, 30. Jan 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Code block for detecting how many slots a block's inventory has

If you try to access a block entity's slot in that does not exist (for instance, slot 12 in a hopper) the game can crash. It would be great to detect how many slots a block entity has with a code block, or even check if a block has an inventory at all!

Last seen on 01:10, 30. Jan 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also... a "first open slot…
Sun, 01/14/2024 - 07:25

Also... a "first open slot of block at xyz" and "does block at xyz have open slots" would be super handy

Last seen on 17:09, 12. Mar 2024
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but im very much so backing…
Wed, 02/14/2024 - 21:44

but im very much so backing this idea, this is the type of procedure block that makes life so much easier !!!

Last seen on 08:40, 1. Apr 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if it can helps (idk if you…
Mon, 04/01/2024 - 08:42

if it can helps (idk if you have the same version of minecraft i had back when i made this post) here's my code for it !
https://mcreator.net/forum/99985/get-inventorys-tile-entity-max-slot-looping-through-slots-purpose/ geometry dash world 

I think you've got a great idea.