Merge branch 'stable'

# Conflicts:
#	resources/vanilla
#	src/network/mcpe/protocol/serializer/PacketSerializer.php
#	src/world/biome/Biome.php
#	tests/phpstan/configs/l8-baseline.neon
This commit is contained in:
Dylan K. Taylor 2020-12-05 01:30:39 +00:00
commit a5315991d5
3 changed files with 6 additions and 22 deletions

View File

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

View File

@ -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());

View File

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