World & blocks · Check
Container has item
Whether a chest, barrel or other container holds at least some of an item.
m.world.container_has
In a flow
“When a player right-clicks → If Container has item: 1 minecraft:diamond → Give a reward.”
When a player right-clicks → If Container has item: 1 minecraft:diamond → Give a reward.
What it does
Whether a chest, barrel or other container holds at least some of an item. It's a check: put it in an If, and the flow goes one way when it's true and the other when it isn't. Find it under World & blocks in the palette.
When to use it
Use it when the flow needs to: whether a chest, barrel or other container holds at least some of an item.
When not to
To pick between more than two outcomes, Switch or Random reads better than a chain of checks.
Typical wiring
Sockets: settings you can wire
- Container Location
-
Where: wire a location in, or type world x y z. It must be a container like a chest, barrel or hopper.
What goes there: Type it in the side panel, or wire in a location. e.g. world 10.5 64 -3.2
If it's empty: Optional. Left empty and unwired, the step runs without it.