public final function deepEquals(Item $item, $checkDamage = true, $checkCompound = true) { if ($this->equals($item, $checkDamage, $checkCompound)) { return true; } elseif ($item->hasCompoundTag() and $this->hasCompoundTag()) { return NBT::matchTree($this->getNamedTag(), $item->getNamedTag()); } return false; }