Implemented new crafting mechanism

This commit is contained in:
Shoghi Cervantes
2015-08-07 21:26:12 +02:00
parent 696edfd31f
commit d026e2ecf0
6 changed files with 112 additions and 233 deletions

View File

@ -1247,8 +1247,8 @@ class Item{
return $this->id === $item->getId() and ($checkDamage === false or $this->getDamage() === $item->getDamage()) and ($checkCompound === false or $this->getCompoundTag() === $item->getCompoundTag());
}
public final function deepEquals(Item $item){
if($item->equals($item)){
public final function deepEquals(Item $item, $checkDamage = true, $checkCompound = true){
if($item->equals($item, $checkDamage, $checkCompound)){
return true;
}elseif($item->hasCompoundTag() or $this->hasCompoundTag()){
return NBT::matchTree($this->getNamedTag(), $item->getNamedTag());