CrafterInventory 5.46.0
Extends SimpleInventory
Implements BlockInventory
The 3x3 crafting grid of a crafter. Slot 0 is the top left corner, slots go row by row.
Disabled slots never hold items. They are stored as a bit mask, bit N for slot N (the Bedrock "disabled_slots" block entity tag; same layout as GeyserMC CrafterContainer.disabledSlotsMask).
Constants
ALL_SLOTS_MASK
php
public const ALL_SLOTS_MASK = (1 << self::SIZE) - 1SIZE
php
public const SIZE = 9Methods
__construct()
php
public function __construct(\pocketmine\world\Position $holder)getDisabledSlotsMask()
php
public function getDisabledSlotsMask() : intisSlotDisabled()
php
public function isSlotDisabled(int $slot) : boolsetDisabledSlotsMask()
php
public function setDisabledSlotsMask(int $mask) : voidsetSlotDisabled()
php
public function setSlotDisabled(int $slot, bool $disabled) : boolDisables or enables a slot. Only empty slots can be disabled; returns false if the slot could not be changed.
