diff --git a/src/network/mcpe/convert/TypeConverter.php b/src/network/mcpe/convert/TypeConverter.php index 575887566..20d52b9d1 100644 --- a/src/network/mcpe/convert/TypeConverter.php +++ b/src/network/mcpe/convert/TypeConverter.php @@ -165,18 +165,15 @@ class TypeConverter{ if(($damageTag = $compound->getTag(self::DAMAGE_TAG)) instanceof IntTag){ $meta = $damageTag->getValue(); $compound->removeTag(self::DAMAGE_TAG); - if($compound->count() === 0){ + if(($conflicted = $compound->getTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION)) !== null){ + $compound->removeTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION); + $compound->setTag(self::DAMAGE_TAG, $conflicted); + }elseif($compound->count() === 0){ $compound = null; - goto end; } } - if(($conflicted = $compound->getTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION)) !== null){ - $compound->removeTag(self::DAMAGE_TAG_CONFLICT_RESOLUTION); - $compound->setTag(self::DAMAGE_TAG, $conflicted); - } } - end: return ItemFactory::getInstance()->get( $id, $meta, diff --git a/src/world/biome/BiomeRegistry.php b/src/world/biome/BiomeRegistry.php index c488770d0..803d1b1c3 100644 --- a/src/world/biome/BiomeRegistry.php +++ b/src/world/biome/BiomeRegistry.php @@ -48,6 +48,8 @@ final class BiomeRegistry{ $this->register(BiomeIds::SWAMP, new SwampBiome()); $this->register(BiomeIds::RIVER, new RiverBiome()); + $this->register(BiomeIds::HELL, new HellBiome()); + $this->register(BiomeIds::ICE_PLAINS, new IcePlainsBiome()); $this->register(BiomeIds::SMALL_MOUNTAINS, new SmallMountainsBiome()); diff --git a/tests/phpstan/configs/l8-baseline.neon b/tests/phpstan/configs/l8-baseline.neon index f6022b303..75b2055b3 100644 --- a/tests/phpstan/configs/l8-baseline.neon +++ b/tests/phpstan/configs/l8-baseline.neon @@ -195,21 +195,6 @@ parameters: count: 1 path: ../../../src/network/mcpe/NetworkSession.php - - - message: "#^Cannot call method getTag\\(\\) on pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\|null\\.$#" - count: 1 - path: ../../../src/network/mcpe/convert/TypeConverter.php - - - - message: "#^Cannot call method removeTag\\(\\) on pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\|null\\.$#" - count: 1 - path: ../../../src/network/mcpe/convert/TypeConverter.php - - - - message: "#^Cannot call method setTag\\(\\) on pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\|null\\.$#" - count: 1 - path: ../../../src/network/mcpe/convert/TypeConverter.php - - message: "#^Property pocketmine\\\\network\\\\mcpe\\\\protocol\\\\LevelSoundEventPacket\\:\\:\\$position \\(pocketmine\\\\math\\\\Vector3\\) does not accept pocketmine\\\\math\\\\Vector3\\|null\\.$#" count: 1