Commit 4606dcd8 authored by Frago9876543210's avatar Frago9876543210
Browse files

fix

parent 9b5a812a
Pipeline #11397071 failed with stage
in 51 seconds
......@@ -69,29 +69,32 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder {
return $index < $this->left->getSize() ? $this->left->getItem($index) : $this->right->getItem($index - $this->right->getSize());
}
/**
* @param int $index
* @param Item $item
*
* @return bool
*/
public function setItem($index, Item $item){
/**
* @param int $index
* @param Item $item
*
* @param bool $send
* @return bool
*/
public function setItem($index, Item $item, $send = true){
return $index < $this->left->getSize() ? $this->left->setItem($index, $item) : $this->right->setItem($index - $this->right->getSize(), $item);
}
/**
* @param int $index
*
* @return bool
*/
public function clear($index){
/**
* @param int $index
*
* @param bool $send
* @return bool
*/
public function clear($index, $send = true){
return $index < $this->left->getSize() ? $this->left->clear($index) : $this->right->clear($index - $this->right->getSize());
}
/**
* @return array
*/
public function getContents(){
/**
* @param bool $withAir
* @return array
*/
public function getContents($withAir = false){
$contents = [];
for($i = 0; $i < $this->getSize(); ++$i){
$contents[$i] = $this->getItem($i);
......@@ -100,10 +103,11 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder {
return $contents;
}
/**
* @param Item[] $items
*/
public function setContents(array $items){
/**
* @param Item[] $items
* @param bool $send
*/
public function setContents(array $items, $send = true){
if(count($items) > $this->size){
$items = array_slice($items, 0, $this->size, true);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment