CreativeInventory: do not disable meta comparison for durable items

this check no longer applies, and it's usually undesirable to avoid comparing meta in every other case.
This commit is contained in:
Dylan K. Taylor 2022-06-29 16:58:52 +01:00
parent 09c1e161e0
commit ff96f1b93c
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -24,7 +24,6 @@ declare(strict_types=1);
namespace pocketmine\inventory;
use pocketmine\data\SavedDataLoadingException;
use pocketmine\item\Durable;
use pocketmine\item\Item;
use pocketmine\utils\SingletonTrait;
use Webmozart\PathUtil\Path;
@ -72,7 +71,7 @@ final class CreativeInventory{
public function getItemIndex(Item $item) : int{
foreach($this->creative as $i => $d){
if($item->equals($d, !($item instanceof Durable))){
if($item->equals($d, true, false)){
return $i;
}
}