Improved trees, improved inventory transactions, improved snowball/bow usage

This commit is contained in:
Shoghi Cervantes
2015-03-28 16:59:15 +01:00
parent 47de616ac5
commit 0a85ad0d1f
22 changed files with 363 additions and 360 deletions

View File

@ -53,12 +53,12 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
return $index < $this->left->getSize() ? $this->left->getItem($index) : $this->right->getItem($index - $this->right->getSize());
}
public function setItem($index, Item $item, $source = null){
return $index < $this->left->getSize() ? $this->left->setItem($index, $item, $source) : $this->right->setItem($index - $this->right->getSize(), $item, $source);
public function setItem($index, Item $item){
return $index < $this->left->getSize() ? $this->left->setItem($index, $item) : $this->right->setItem($index - $this->right->getSize(), $item);
}
public function clear($index, $source = null){
return $index < $this->left->getSize() ? $this->left->clear($index, $source) : $this->right->clear($index - $this->right->getSize(), $source);
public function clear($index){
return $index < $this->left->getSize() ? $this->left->clear($index) : $this->right->clear($index - $this->right->getSize());
}
public function getContents(){