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

Started by QbertGuyGo on

Topic category: Feature requests and ideas for MCreator

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!

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

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 !!!

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.