-
Bug
-
Resolution: Incomplete
-
None
-
1.19.50
-
Unconfirmed
-
Multiple
The following GameTest function:
block.getComponent('minecraft:inventory')
Fails to get the Inventory component from every other block excluding chests and trapped chests. Blocks like shulker boxes, barrels, furnaces and hoppers don't work with it.
The following code was used to test the bug:
import { world } from "@minecraft/server"; world.events.blockPlace.subscribe(({ block, player }) => { player.tell(String('§7' + block.typeId + '§r - §b' + (block.getComponent('inventory')?.container.size ?? '§cNoInventory'))); });
This is the chat output that the code sends when placing the following block types:
- minecraft:stone (Stone is just for looks thb. Idk why I included it in to the test)
- minecraft:chest (+Large Chest)
- minecraft:trapped_chest (+Large Trapped Chest)
- minecraft:barrel
- minecraft:shulker_box