77 protected function addFillLevels(
int $amount,
Item $usedItem,
Item $returnedItem, array &$returnedItems) : void{
78 if($this->fillLevel >= self::MAX_FILL_LEVEL){
81 $this->position->getWorld()->setBlock($this->position, $this->withFillLevel($this->fillLevel + $amount));
82 $this->position->getWorld()->addSound($this->position->add(0.5, 0.5, 0.5), $this->getFillSound());
85 $returnedItems[] = $returnedItem;
92 if($this->fillLevel < $amount){
96 $this->position->getWorld()->setBlock($this->position, $this->withFillLevel($this->fillLevel - $amount));
97 $this->position->getWorld()->addSound($this->position->add(0.5, 0.5, 0.5), $this->getEmptySound());
100 $returnedItems[] = $returnedItem;