Use VanillaItems::AIR() instead of ItemFactory

This commit is contained in:
Dylan K. Taylor
2022-05-24 15:47:27 +01:00
parent 9a5a03ef83
commit 227f28a6d2
2 changed files with 4 additions and 3 deletions

View File

@@ -678,7 +678,7 @@ class Item implements \JsonSerializable{
*/
public static function nbtDeserialize(CompoundTag $tag) : Item{
if($tag->getTag("id") === null || $tag->getTag("Count") === null){
return ItemFactory::getInstance()->get(0);
return VanillaItems::AIR();
}
$count = Binary::unsignByte($tag->getByte("Count"));