Assemble 1.21.40 (#6471)

This commit is contained in:
Dries C
2024-10-25 15:21:51 +02:00
committed by GitHub
parent f1b1a7022d
commit 4814db4fe7
15 changed files with 107 additions and 95 deletions

View File

@ -50,7 +50,6 @@ use pocketmine\block\Stem;
use pocketmine\block\Trapdoor;
use pocketmine\block\utils\CopperOxidation;
use pocketmine\block\utils\SlabType;
use pocketmine\block\VanillaBlocks;
use pocketmine\block\Wall;
use pocketmine\block\WallSign;
use pocketmine\block\WeightedPressurePlate;
@ -210,8 +209,8 @@ final class BlockStateDeserializerHelper{
/** @throws BlockStateDeserializeException */
public static function decodeMushroomBlock(RedMushroomBlock $block, BlockStateReader $in) : Block{
switch($type = $in->readBoundedInt(BlockStateNames::HUGE_MUSHROOM_BITS, 0, 15)){
case BlockLegacyMetadata::MUSHROOM_BLOCK_ALL_STEM: return VanillaBlocks::ALL_SIDED_MUSHROOM_STEM();
case BlockLegacyMetadata::MUSHROOM_BLOCK_STEM: return VanillaBlocks::MUSHROOM_STEM();
case BlockLegacyMetadata::MUSHROOM_BLOCK_ALL_STEM:
case BlockLegacyMetadata::MUSHROOM_BLOCK_STEM: throw new BlockStateDeserializeException("This state does not exist");
default:
//invalid types get left as default
$type = MushroomBlockTypeIdMap::getInstance()->fromId($type);