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

Started by QbertGuyGo on

Topic category: Feature requests and ideas for MCreator

Active 2 weeks ago
Joined Dec 2015
Points:
744

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
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!

Active 2 weeks ago
Joined Dec 2015
Points:
744

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
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

Active 7 months ago
Joined Mar 2023
Points:
213

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
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 !!!

Active 6 months ago
Joined Apr 2024
Points:
55

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
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.