102 protected function newMenu(
Player $player, Inventory $inventory,
Position $position) : BrewingStandInventoryWindow{
107 $world = $this->position->getWorld();
108 $brewing = $world->getTile($this->position);
109 if($brewing instanceof TileBrewingStand){
110 if($brewing->onUpdate()){
111 $world->scheduleDelayedBlockUpdate($this->position, 1);
115 foreach(BrewingStandSlot::cases() as $slot){
116 $occupied = !$brewing->getInventory()->isSlotEmpty($slot->getSlotNumber());
117 if($occupied !== $this->hasSlot($slot)){
118 $this->setSlot($slot, $occupied);
124 $world->setBlock($this->position, $this);