Use Item->canStackWith() instead of Item->equals() wherever possible

This commit is contained in:
Dylan K. Taylor
2023-03-07 17:08:35 +00:00
parent 867b8945e4
commit fff8f0f815
2 changed files with 2 additions and 2 deletions

View File

@@ -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{