mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 19:59:11 +00:00
Use Item->canStackWith() instead of Item->equals() wherever possible
This commit is contained in:
@@ -637,7 +637,7 @@ class Item implements \JsonSerializable{
|
||||
* Returns whether the specified item stack has the same ID, damage, NBT and count as this item stack.
|
||||
*/
|
||||
final public function equalsExact(Item $other) : bool{
|
||||
return $this->equals($other, true, true) && $this->count === $other->count;
|
||||
return $this->canStackWith($other) && $this->count === $other->count;
|
||||
}
|
||||
|
||||
final public function __toString() : string{
|
||||
|
Reference in New Issue
Block a user