Added a batch of simple blocks from 1.16 and 1.17

This commit is contained in:
Dylan K. Taylor 2022-07-02 21:53:59 +01:00
parent b661c94915
commit 172214386a
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
7 changed files with 203 additions and 107 deletions

View File

@ -558,6 +558,9 @@ class BlockFactory{
BreakInfo::instant(),
));
$this->registerBlocksR16();
$this->registerBlocksR17();
//region --- auto-generated TODOs for bedrock-1.11.0 ---
//TODO: minecraft:bubble_column
//TODO: minecraft:campfire
@ -828,6 +831,46 @@ class BlockFactory{
$this->register(new Element(new BID(Ids::ELEMENT_OGANESSON), "Oganesson", $instaBreak, "og", 118, 7));
}
private function registerBlocksR16() : void{
//for some reason, slabs have weird hardness like the legacy ones
$slabBreakInfo = new BreakInfo(2.0, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel());
$this->register(new Opaque(new BID(Ids::ANCIENT_DEBRIS), "Ancient Debris", new BreakInfo(30, ToolType::PICKAXE, ToolTier::DIAMOND()->getHarvestLevel())));
$basaltBreakInfo = new BreakInfo(1.25, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel());
$this->register(new SimplePillar(new BID(Ids::BASALT), "Basalt", $basaltBreakInfo));
$this->register(new SimplePillar(new BID(Ids::POLISHED_BASALT), "Polished Basalt", $basaltBreakInfo));
$this->register(new Opaque(new BID(Ids::SMOOTH_BASALT), "Smooth Basalt", $basaltBreakInfo));
$blackstoneBreakInfo = new BreakInfo(1.5, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel());
$this->register(new Opaque(new BID(Ids::BLACKSTONE), "Blackstone", $blackstoneBreakInfo));
+$this->register(new Slab(new BID(Ids::BLACKSTONE_SLAB), "Blackstone", $slabBreakInfo));
$this->register(new Stair(new BID(Ids::BLACKSTONE_STAIRS), "Blackstone Stairs", $blackstoneBreakInfo));
$this->register(new Wall(new BID(Ids::BLACKSTONE_WALL), "Blackstone Wall", $blackstoneBreakInfo));
//TODO: polished blackstone ought to have 2.0 hardness (as per java) but it's 1.5 in Bedrock (probably parity bug)
$prefix = fn(string $thing) => "Polished Blackstone" . ($thing !== "" ? " $thing" : "");
$this->register(new Opaque(new BID(Ids::POLISHED_BLACKSTONE), $prefix(""), $blackstoneBreakInfo));
$this->register(new StoneButton(new BID(Ids::POLISHED_BLACKSTONE_BUTTON), $prefix("Button"), new BreakInfo(0.5, ToolType::PICKAXE))); //same as regular stone button
$this->register(new StonePressurePlate(new BID(Ids::POLISHED_BLACKSTONE_PRESSURE_PLATE), $prefix("Pressure Plate"), new BreakInfo(0.5, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel()))); //same as regular stone pressure plate
$this->register(new Slab(new BID(Ids::POLISHED_BLACKSTONE_SLAB), $prefix(""), $slabBreakInfo));
$this->register(new Stair(new BID(Ids::POLISHED_BLACKSTONE_STAIRS), $prefix("Stairs"), $blackstoneBreakInfo));
$this->register(new Wall(new BID(Ids::POLISHED_BLACKSTONE_WALL), $prefix("Wall"), $blackstoneBreakInfo));
$this->register(new Opaque(new BID(Ids::CHISELED_POLISHED_BLACKSTONE), "Chiseled Polished Blackstone", $blackstoneBreakInfo));
$prefix = fn(string $thing) => "Polished Blackstone Brick" . ($thing !== "" ? " $thing" : "");
$this->register(new Opaque(new BID(Ids::POLISHED_BLACKSTONE_BRICKS), "Polished Blackstone Bricks", $blackstoneBreakInfo));
$this->register(new Slab(new BID(Ids::POLISHED_BLACKSTONE_BRICK_SLAB), "Polished Blackstone Brick", $slabBreakInfo));
$this->register(new Stair(new BID(Ids::POLISHED_BLACKSTONE_BRICK_STAIRS), $prefix("Stairs"), $blackstoneBreakInfo));
$this->register(new Wall(new BID(Ids::POLISHED_BLACKSTONE_BRICK_WALL), $prefix("Wall"), $blackstoneBreakInfo));
$this->register(new Opaque(new BID(Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS), "Cracked Polished Blackstone Bricks", $blackstoneBreakInfo));
}
private function registerBlocksR17() : void{
//in java this can be acquired using any tool - seems to be a parity issue in bedrock
$this->register(new Opaque(new BID(Ids::AMETHYST), "Amethyst", new BreakInfo(1.5, ToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())));
}
/**
* Maps a block type to its corresponding type ID. This is necessary for the block to be recognized when loading
* from disk, and also when being read at runtime.

View File

@ -564,6 +564,26 @@ final class BlockTypeIds{
public const WOOL = 10537;
public const GLAZED_TERRACOTTA = 10539;
public const FIRST_UNUSED_BLOCK_ID = 10540;
public const AMETHYST = 10540;
public const ANCIENT_DEBRIS = 10541;
public const BASALT = 10542;
public const POLISHED_BASALT = 10543;
public const SMOOTH_BASALT = 10544;
public const BLACKSTONE = 10545;
public const BLACKSTONE_SLAB = 10546;
public const BLACKSTONE_STAIRS = 10547;
public const BLACKSTONE_WALL = 10548;
public const POLISHED_BLACKSTONE = 10549;
public const POLISHED_BLACKSTONE_BUTTON = 10550;
public const POLISHED_BLACKSTONE_PRESSURE_PLATE = 10551;
public const POLISHED_BLACKSTONE_SLAB = 10552;
public const POLISHED_BLACKSTONE_STAIRS = 10553;
public const POLISHED_BLACKSTONE_WALL = 10554;
public const CHISELED_POLISHED_BLACKSTONE = 10555;
public const POLISHED_BLACKSTONE_BRICKS = 10556;
public const POLISHED_BLACKSTONE_BRICK_SLAB = 10557;
public const POLISHED_BLACKSTONE_BRICK_STAIRS = 10558;
public const POLISHED_BLACKSTONE_BRICK_WALL = 10559;
public const CRACKED_POLISHED_BLACKSTONE_BRICKS = 10560;
public const FIRST_UNUSED_BLOCK_ID = 10561;
}

View File

@ -51,6 +51,8 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static Air AIR()
* @method static Flower ALLIUM()
* @method static MushroomStem ALL_SIDED_MUSHROOM_STEM()
* @method static Opaque AMETHYST()
* @method static Opaque ANCIENT_DEBRIS()
* @method static Opaque ANDESITE()
* @method static Slab ANDESITE_SLAB()
* @method static Stair ANDESITE_STAIRS()
@ -62,6 +64,7 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static FloorBanner BANNER()
* @method static Barrel BARREL()
* @method static Transparent BARRIER()
* @method static SimplePillar BASALT()
* @method static Beacon BEACON()
* @method static Bed BED()
* @method static Bedrock BEDROCK()
@ -82,6 +85,10 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static WoodenTrapdoor BIRCH_TRAPDOOR()
* @method static WallSign BIRCH_WALL_SIGN()
* @method static Wood BIRCH_WOOD()
* @method static Opaque BLACKSTONE()
* @method static Slab BLACKSTONE_SLAB()
* @method static Stair BLACKSTONE_STAIRS()
* @method static Wall BLACKSTONE_WALL()
* @method static Furnace BLAST_FURNACE()
* @method static BlueIce BLUE_ICE()
* @method static Flower BLUE_ORCHID()
@ -102,6 +109,7 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static CarvedPumpkin CARVED_PUMPKIN()
* @method static ChemicalHeat CHEMICAL_HEAT()
* @method static Chest CHEST()
* @method static Opaque CHISELED_POLISHED_BLACKSTONE()
* @method static SimplePillar CHISELED_QUARTZ()
* @method static Opaque CHISELED_RED_SANDSTONE()
* @method static Opaque CHISELED_SANDSTONE()
@ -122,6 +130,7 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static CoralBlock CORAL_BLOCK()
* @method static FloorCoralFan CORAL_FAN()
* @method static Flower CORNFLOWER()
* @method static Opaque CRACKED_POLISHED_BLACKSTONE_BRICKS()
* @method static Opaque CRACKED_STONE_BRICKS()
* @method static CraftingTable CRAFTING_TABLE()
* @method static Opaque CUT_RED_SANDSTONE()
@ -420,6 +429,17 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static Opaque POLISHED_ANDESITE()
* @method static Slab POLISHED_ANDESITE_SLAB()
* @method static Stair POLISHED_ANDESITE_STAIRS()
* @method static SimplePillar POLISHED_BASALT()
* @method static Opaque POLISHED_BLACKSTONE()
* @method static Opaque POLISHED_BLACKSTONE_BRICKS()
* @method static Slab POLISHED_BLACKSTONE_BRICK_SLAB()
* @method static Stair POLISHED_BLACKSTONE_BRICK_STAIRS()
* @method static Wall POLISHED_BLACKSTONE_BRICK_WALL()
* @method static StoneButton POLISHED_BLACKSTONE_BUTTON()
* @method static StonePressurePlate POLISHED_BLACKSTONE_PRESSURE_PLATE()
* @method static Slab POLISHED_BLACKSTONE_SLAB()
* @method static Stair POLISHED_BLACKSTONE_STAIRS()
* @method static Wall POLISHED_BLACKSTONE_WALL()
* @method static Opaque POLISHED_DIORITE()
* @method static Slab POLISHED_DIORITE_SLAB()
* @method static Stair POLISHED_DIORITE_STAIRS()
@ -480,6 +500,7 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static ShulkerBox SHULKER_BOX()
* @method static Slime SLIME()
* @method static Furnace SMOKER()
* @method static Opaque SMOOTH_BASALT()
* @method static Opaque SMOOTH_QUARTZ()
* @method static Slab SMOOTH_QUARTZ_SLAB()
* @method static Stair SMOOTH_QUARTZ_STAIRS()
@ -587,6 +608,8 @@ final class VanillaBlocks{
self::register("air", $factory->get(Ids::AIR, 0));
self::register("all_sided_mushroom_stem", $factory->get(Ids::ALL_SIDED_MUSHROOM_STEM, 0));
self::register("allium", $factory->get(Ids::ALLIUM, 0));
self::register("amethyst", $factory->get(Ids::AMETHYST, 0));
self::register("ancient_debris", $factory->get(Ids::ANCIENT_DEBRIS, 0));
self::register("andesite", $factory->get(Ids::ANDESITE, 0));
self::register("andesite_slab", $factory->get(Ids::ANDESITE_SLAB, 0));
self::register("andesite_stairs", $factory->get(Ids::ANDESITE_STAIRS, 0));
@ -598,6 +621,7 @@ final class VanillaBlocks{
self::register("banner", $factory->get(Ids::BANNER, 0));
self::register("barrel", $factory->get(Ids::BARREL, 0));
self::register("barrier", $factory->get(Ids::BARRIER, 0));
self::register("basalt", $factory->get(Ids::BASALT, 2));
self::register("beacon", $factory->get(Ids::BEACON, 0));
self::register("bed", $factory->get(Ids::BED, 13));
self::register("bedrock", $factory->get(Ids::BEDROCK, 0));
@ -618,6 +642,10 @@ final class VanillaBlocks{
self::register("birch_trapdoor", $factory->get(Ids::BIRCH_TRAPDOOR, 0));
self::register("birch_wall_sign", $factory->get(Ids::BIRCH_WALL_SIGN, 0));
self::register("birch_wood", $factory->get(Ids::BIRCH_WOOD, 0));
self::register("blackstone", $factory->get(Ids::BLACKSTONE, 0));
self::register("blackstone_slab", $factory->get(Ids::BLACKSTONE_SLAB, 0));
self::register("blackstone_stairs", $factory->get(Ids::BLACKSTONE_STAIRS, 0));
self::register("blackstone_wall", $factory->get(Ids::BLACKSTONE_WALL, 0));
self::register("blast_furnace", $factory->get(Ids::BLAST_FURNACE, 0));
self::register("blue_ice", $factory->get(Ids::BLUE_ICE, 0));
self::register("blue_orchid", $factory->get(Ids::BLUE_ORCHID, 0));
@ -638,6 +666,7 @@ final class VanillaBlocks{
self::register("carved_pumpkin", $factory->get(Ids::CARVED_PUMPKIN, 0));
self::register("chemical_heat", $factory->get(Ids::CHEMICAL_HEAT, 0));
self::register("chest", $factory->get(Ids::CHEST, 0));
self::register("chiseled_polished_blackstone", $factory->get(Ids::CHISELED_POLISHED_BLACKSTONE, 0));
self::register("chiseled_quartz", $factory->get(Ids::CHISELED_QUARTZ, 2));
self::register("chiseled_red_sandstone", $factory->get(Ids::CHISELED_RED_SANDSTONE, 0));
self::register("chiseled_sandstone", $factory->get(Ids::CHISELED_SANDSTONE, 0));
@ -658,6 +687,7 @@ final class VanillaBlocks{
self::register("coral_block", $factory->get(Ids::CORAL_BLOCK, 4));
self::register("coral_fan", $factory->get(Ids::CORAL_FAN, 4));
self::register("cornflower", $factory->get(Ids::CORNFLOWER, 0));
self::register("cracked_polished_blackstone_bricks", $factory->get(Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS, 0));
self::register("cracked_stone_bricks", $factory->get(Ids::CRACKED_STONE_BRICKS, 0));
self::register("crafting_table", $factory->get(Ids::CRAFTING_TABLE, 0));
self::register("cut_red_sandstone", $factory->get(Ids::CUT_RED_SANDSTONE, 0));
@ -956,6 +986,17 @@ final class VanillaBlocks{
self::register("polished_andesite", $factory->get(Ids::POLISHED_ANDESITE, 0));
self::register("polished_andesite_slab", $factory->get(Ids::POLISHED_ANDESITE_SLAB, 0));
self::register("polished_andesite_stairs", $factory->get(Ids::POLISHED_ANDESITE_STAIRS, 0));
self::register("polished_basalt", $factory->get(Ids::POLISHED_BASALT, 2));
self::register("polished_blackstone", $factory->get(Ids::POLISHED_BLACKSTONE, 0));
self::register("polished_blackstone_brick_slab", $factory->get(Ids::POLISHED_BLACKSTONE_BRICK_SLAB, 0));
self::register("polished_blackstone_brick_stairs", $factory->get(Ids::POLISHED_BLACKSTONE_BRICK_STAIRS, 0));
self::register("polished_blackstone_brick_wall", $factory->get(Ids::POLISHED_BLACKSTONE_BRICK_WALL, 0));
self::register("polished_blackstone_bricks", $factory->get(Ids::POLISHED_BLACKSTONE_BRICKS, 0));
self::register("polished_blackstone_button", $factory->get(Ids::POLISHED_BLACKSTONE_BUTTON, 0));
self::register("polished_blackstone_pressure_plate", $factory->get(Ids::POLISHED_BLACKSTONE_PRESSURE_PLATE, 0));
self::register("polished_blackstone_slab", $factory->get(Ids::POLISHED_BLACKSTONE_SLAB, 0));
self::register("polished_blackstone_stairs", $factory->get(Ids::POLISHED_BLACKSTONE_STAIRS, 0));
self::register("polished_blackstone_wall", $factory->get(Ids::POLISHED_BLACKSTONE_WALL, 0));
self::register("polished_diorite", $factory->get(Ids::POLISHED_DIORITE, 0));
self::register("polished_diorite_slab", $factory->get(Ids::POLISHED_DIORITE_SLAB, 0));
self::register("polished_diorite_stairs", $factory->get(Ids::POLISHED_DIORITE_STAIRS, 0));
@ -1016,6 +1057,7 @@ final class VanillaBlocks{
self::register("shulker_box", $factory->get(Ids::SHULKER_BOX, 0));
self::register("slime", $factory->get(Ids::SLIME, 0));
self::register("smoker", $factory->get(Ids::SMOKER, 0));
self::register("smooth_basalt", $factory->get(Ids::SMOOTH_BASALT, 0));
self::register("smooth_quartz", $factory->get(Ids::SMOOTH_QUARTZ, 0));
self::register("smooth_quartz_slab", $factory->get(Ids::SMOOTH_QUARTZ_SLAB, 0));
self::register("smooth_quartz_stairs", $factory->get(Ids::SMOOTH_QUARTZ_STAIRS, 0));

View File

@ -36,6 +36,7 @@ use pocketmine\block\BlockFactory;
use pocketmine\block\BoneBlock;
use pocketmine\block\BrewingStand;
use pocketmine\block\BrownMushroomBlock;
use pocketmine\block\Button;
use pocketmine\block\Cactus;
use pocketmine\block\Cake;
use pocketmine\block\Carpet;
@ -96,6 +97,7 @@ use pocketmine\block\RedstoneWire;
use pocketmine\block\Sapling;
use pocketmine\block\SeaPickle;
use pocketmine\block\SimplePillar;
use pocketmine\block\SimplePressurePlate;
use pocketmine\block\Skull;
use pocketmine\block\Slab;
use pocketmine\block\SnowLayer;
@ -190,6 +192,10 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
$this->map($block, fn() => Writer::create($id));
}
public function mapSlab(Slab $block, string $singleId, string $doubleId) : void{
$this->map($block, fn(Slab $block) => Helper::encodeSlab($block, $singleId, $doubleId));
}
public function mapStairs(Stair $block, string $id) : void{
$this->map($block, fn(Stair $block) => Helper::encodeStairs($block, Writer::create($id)));
}
@ -259,6 +265,8 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
$this->map(Blocks::ALLIUM(), fn() => Helper::encodeRedFlower(StringValues::FLOWER_TYPE_ALLIUM));
$this->map(Blocks::ALL_SIDED_MUSHROOM_STEM(), fn() => Writer::create(Ids::BROWN_MUSHROOM_BLOCK)
->writeInt(StateNames::HUGE_MUSHROOM_BITS, BlockLegacyMetadata::MUSHROOM_BLOCK_ALL_STEM));
$this->mapSimple(Blocks::AMETHYST(), Ids::AMETHYST_BLOCK);
$this->mapSimple(Blocks::ANCIENT_DEBRIS(), Ids::ANCIENT_DEBRIS);
$this->map(Blocks::ANDESITE(), fn() => Helper::encodeStone(StringValues::STONE_TYPE_ANDESITE));
$this->map(Blocks::ANDESITE_SLAB(), fn(Slab $block) => Helper::encodeStoneSlab3($block, StringValues::STONE_SLAB_TYPE_3_ANDESITE));
$this->map(Blocks::ANDESITE_STAIRS(), fn(Stair $block) => Helper::encodeStairs($block, new Writer(Ids::ANDESITE_STAIRS)));
@ -302,6 +310,10 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
->writeFacingDirection($block->getFacing());
});
$this->mapSimple(Blocks::BARRIER(), Ids::BARRIER);
$this->map(Blocks::BASALT(), function(SimplePillar $block) : Writer{
return Writer::create(Ids::BASALT)
->writePillarAxis($block->getAxis());
});
$this->mapSimple(Blocks::BEACON(), Ids::BEACON);
$this->map(Blocks::BED(), function(Bed $block) : Writer{
return Writer::create(Ids::BED)
@ -338,6 +350,10 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
$this->map(Blocks::BIRCH_TRAPDOOR(), fn(WoodenTrapdoor $block) => Helper::encodeTrapdoor($block, new Writer(Ids::BIRCH_TRAPDOOR)));
$this->map(Blocks::BIRCH_WALL_SIGN(), fn(WallSign $block) => Helper::encodeWallSign($block, new Writer(Ids::BIRCH_WALL_SIGN)));
$this->map(Blocks::BIRCH_WOOD(), fn(Wood $block) => Helper::encodeAllSidedLog($block));
$this->mapSimple(Blocks::BLACKSTONE(), Ids::BLACKSTONE);
$this->mapSlab(Blocks::BLACKSTONE_SLAB(), Ids::BLACKSTONE_SLAB, Ids::BLACKSTONE_DOUBLE_SLAB);
$this->mapStairs(Blocks::BLACKSTONE_STAIRS(), Ids::BLACKSTONE_STAIRS);
$this->map(Blocks::BLACKSTONE_WALL(), fn(Wall $block) => Helper::encodeWall($block, new Writer(Ids::BLACKSTONE_WALL)));
$this->map(Blocks::BLAST_FURNACE(), fn(Furnace $block) => Helper::encodeFurnace($block, Ids::BLAST_FURNACE, Ids::LIT_BLAST_FURNACE));
$this->mapSimple(Blocks::BLUE_ICE(), Ids::BLUE_ICE);
$this->map(Blocks::BLUE_ORCHID(), fn() => Helper::encodeRedFlower(StringValues::FLOWER_TYPE_ORCHID));
@ -382,6 +398,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
return Writer::create(Ids::CHEST)
->writeHorizontalFacing($block->getFacing());
});
$this->mapSimple(Blocks::CHISELED_POLISHED_BLACKSTONE(), Ids::CHISELED_POLISHED_BLACKSTONE);
$this->map(Blocks::CHISELED_QUARTZ(), fn(SimplePillar $block) => Helper::encodeQuartz(StringValues::CHISEL_TYPE_CHISELED, $block->getAxis()));
$this->map(Blocks::CHISELED_RED_SANDSTONE(), fn() => Helper::encodeSandstone(Ids::RED_SANDSTONE, StringValues::SAND_STONE_TYPE_HEIROGLYPHS));
$this->map(Blocks::CHISELED_SANDSTONE(), fn() => Helper::encodeSandstone(Ids::SANDSTONE, StringValues::SAND_STONE_TYPE_HEIROGLYPHS));
@ -428,6 +445,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
});
});
$this->map(Blocks::CORNFLOWER(), fn() => Helper::encodeRedFlower(StringValues::FLOWER_TYPE_CORNFLOWER));
$this->mapSimple(Blocks::CRACKED_POLISHED_BLACKSTONE_BRICKS(), Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS);
$this->map(Blocks::CRACKED_STONE_BRICKS(), fn() => Helper::encodeStoneBricks(StringValues::STONE_BRICK_TYPE_CRACKED));
$this->mapSimple(Blocks::CRAFTING_TABLE(), Ids::CRAFTING_TABLE);
$this->map(Blocks::CUT_RED_SANDSTONE(), fn() => Helper::encodeSandstone(Ids::RED_SANDSTONE, StringValues::SAND_STONE_TYPE_CUT));
@ -853,6 +871,21 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
$this->map(Blocks::POLISHED_ANDESITE(), fn() => Helper::encodeStone(StringValues::STONE_TYPE_ANDESITE_SMOOTH));
$this->map(Blocks::POLISHED_ANDESITE_SLAB(), fn(Slab $block) => Helper::encodeStoneSlab3($block, StringValues::STONE_SLAB_TYPE_3_POLISHED_ANDESITE));
$this->mapStairs(Blocks::POLISHED_ANDESITE_STAIRS(), Ids::POLISHED_ANDESITE_STAIRS);
$this->map(Blocks::POLISHED_BASALT(), function(SimplePillar $block) : Writer{
return Writer::create(Ids::POLISHED_BASALT)
->writePillarAxis($block->getAxis());
});
$this->mapSimple(Blocks::POLISHED_BLACKSTONE(), Ids::POLISHED_BLACKSTONE);
$this->mapSimple(Blocks::POLISHED_BLACKSTONE_BRICKS(), Ids::POLISHED_BLACKSTONE_BRICKS);
$this->mapSlab(Blocks::POLISHED_BLACKSTONE_BRICK_SLAB(), Ids::POLISHED_BLACKSTONE_BRICK_SLAB, Ids::POLISHED_BLACKSTONE_BRICK_DOUBLE_SLAB);
$this->mapStairs(Blocks::POLISHED_BLACKSTONE_BRICK_STAIRS(), Ids::POLISHED_BLACKSTONE_BRICK_STAIRS);
$this->map(Blocks::POLISHED_BLACKSTONE_BRICK_WALL(), fn(Wall $block) => Helper::encodeWall($block, new Writer(Ids::POLISHED_BLACKSTONE_BRICK_WALL)));
$this->map(Blocks::POLISHED_BLACKSTONE_BUTTON(), fn(Button $block) => Helper::encodeButton($block, new Writer(Ids::POLISHED_BLACKSTONE_BUTTON)));
$this->map(Blocks::POLISHED_BLACKSTONE_PRESSURE_PLATE(), fn(SimplePressurePlate $block) => Helper::encodeSimplePressurePlate($block, new Writer(Ids::POLISHED_BLACKSTONE_PRESSURE_PLATE)));
$this->mapSlab(Blocks::POLISHED_BLACKSTONE_SLAB(), Ids::POLISHED_BLACKSTONE_SLAB, Ids::POLISHED_BLACKSTONE_DOUBLE_SLAB);
$this->mapStairs(Blocks::POLISHED_BLACKSTONE_STAIRS(), Ids::POLISHED_BLACKSTONE_STAIRS);
$this->map(Blocks::POLISHED_BLACKSTONE_WALL(), fn(Wall $block) => Helper::encodeWall($block, new Writer(Ids::POLISHED_BLACKSTONE_WALL)));
$this->map(Blocks::POLISHED_DIORITE(), fn() => Helper::encodeStone(StringValues::STONE_TYPE_DIORITE_SMOOTH));
$this->map(Blocks::POLISHED_DIORITE_SLAB(), fn(Slab $block) => Helper::encodeStoneSlab3($block, StringValues::STONE_SLAB_TYPE_3_POLISHED_DIORITE));
$this->mapStairs(Blocks::POLISHED_DIORITE_STAIRS(), Ids::POLISHED_DIORITE_STAIRS);
@ -954,6 +987,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
$this->mapSimple(Blocks::SHULKER_BOX(), Ids::UNDYED_SHULKER_BOX);
$this->mapSimple(Blocks::SLIME(), Ids::SLIME);
$this->map(Blocks::SMOKER(), fn(Furnace $block) => Helper::encodeFurnace($block, Ids::SMOKER, Ids::LIT_SMOKER));
$this->mapSimple(Blocks::SMOOTH_BASALT(), Ids::SMOOTH_BASALT);
$this->map(Blocks::SMOOTH_QUARTZ(), fn() => Helper::encodeQuartz(StringValues::CHISEL_TYPE_SMOOTH, Axis::Y));
$this->map(Blocks::SMOOTH_QUARTZ_SLAB(), fn(Slab $block) => Helper::encodeStoneSlab4($block, StringValues::STONE_SLAB_TYPE_4_SMOOTH_QUARTZ));
$this->mapStairs(Blocks::SMOOTH_QUARTZ_STAIRS(), Ids::SMOOTH_QUARTZ_STAIRS);

View File

@ -185,7 +185,7 @@ final class BlockStateSerializerHelper{
->writeInt(BlockStateNames::REDSTONE_SIGNAL, $block->isPressed() ? 15 : 0);
}
private static function encodeSlab(Slab $block, string $singleId, string $doubleId) : BlockStateWriter{
public static function encodeSlab(Slab $block, string $singleId, string $doubleId) : BlockStateWriter{
$slabType = $block->getSlabType();
return BlockStateWriter::create($slabType->equals(SlabType::DOUBLE()) ? $doubleId : $singleId)

View File

@ -25,6 +25,7 @@ namespace pocketmine\data\bedrock\block\convert;
use pocketmine\block\Bamboo;
use pocketmine\block\Block;
use pocketmine\block\Slab;
use pocketmine\block\Stair;
use pocketmine\block\SweetBerryBush;
use pocketmine\block\utils\BrewingStandSlot;
@ -71,6 +72,17 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
$this->deserializeFuncs[$id] = $c;
}
/**
* @phpstan-param \Closure() : Slab $getBlock
*/
public function mapSlab(string $singleId, string $doubleId, \Closure $getBlock) : void{
$this->map($singleId, fn(Reader $in) : Slab => $getBlock()->setSlabType($in->readSlabPosition()));
$this->map($doubleId, function(Reader $in) use ($getBlock) : Slab{
$in->ignored(StateNames::TOP_SLOT_BIT);
return $getBlock()->setSlabType(SlabType::DOUBLE());
});
}
/**
* @phpstan-param \Closure() : Stair $getBlock
*/
@ -93,6 +105,8 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
->setShape($in->readBoundedInt(StateNames::RAIL_DIRECTION, 0, 5));
});
$this->map(Ids::AIR, fn() => Blocks::AIR());
$this->map(Ids::AMETHYST_BLOCK, fn() => Blocks::AMETHYST());
$this->map(Ids::ANCIENT_DEBRIS, fn() => Blocks::ANCIENT_DEBRIS());
$this->mapStairs(Ids::ANDESITE_STAIRS, fn() => Blocks::ANDESITE_STAIRS());
$this->map(Ids::ANVIL, function(Reader $in) : Block{
return Blocks::ANVIL()
@ -130,6 +144,10 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
->setOpen($in->readBool(StateNames::OPEN_BIT));
});
$this->map(Ids::BARRIER, fn() => Blocks::BARRIER());
$this->map(Ids::BASALT, function(Reader $in){
return Blocks::BASALT()
->setAxis($in->readPillarAxis());
});
$this->map(Ids::BEACON, fn() => Blocks::BEACON());
$this->map(Ids::BED, function(Reader $in) : Block{
return Blocks::BED()
@ -156,6 +174,10 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
$this->map(Ids::BIRCH_STANDING_SIGN, fn(Reader $in) => Helper::decodeFloorSign(Blocks::BIRCH_SIGN(), $in));
$this->map(Ids::BIRCH_TRAPDOOR, fn(Reader $in) => Helper::decodeTrapdoor(Blocks::BIRCH_TRAPDOOR(), $in));
$this->map(Ids::BIRCH_WALL_SIGN, fn(Reader $in) => Helper::decodeWallSign(Blocks::BIRCH_WALL_SIGN(), $in));
$this->map(Ids::BLACKSTONE, fn() => Blocks::BLACKSTONE());
$this->mapSlab(Ids::BLACKSTONE_SLAB, Ids::BLACKSTONE_DOUBLE_SLAB, fn() => Blocks::BLACKSTONE_SLAB());
$this->mapStairs(Ids::BLACKSTONE_STAIRS, fn() => Blocks::BLACKSTONE_STAIRS());
$this->map(Ids::BLACKSTONE_WALL, fn(Reader $in) => Helper::decodeWall(Blocks::BLACKSTONE_WALL(), $in));
$this->map(Ids::BLACK_GLAZED_TERRACOTTA, fn(Reader $in) => Helper::decodeGlazedTerracotta(DyeColor::BLACK(), $in));
$this->map(Ids::BLAST_FURNACE, function(Reader $in) : Block{
return Blocks::BLAST_FURNACE()
@ -211,6 +233,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
return Blocks::CHEST()
->setFacing($in->readHorizontalFacing());
});
$this->map(Ids::CHISELED_POLISHED_BLACKSTONE, fn() => Blocks::CHISELED_POLISHED_BLACKSTONE());
$this->map(Ids::CLAY, fn() => Blocks::CLAY());
$this->map(Ids::COAL_BLOCK, fn() => Blocks::COAL());
$this->map(Ids::COAL_ORE, fn() => Blocks::COAL_ORE());
@ -264,6 +287,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
return Helper::decodeWallCoralFan(Blocks::WALL_CORAL_FAN(), $in)
->setCoralType(CoralType::HORN());
});
$this->map(Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS, fn() => Blocks::CRACKED_POLISHED_BLACKSTONE_BRICKS());
$this->map(Ids::CRAFTING_TABLE, fn() => Blocks::CRAFTING_TABLE());
$this->map(Ids::CYAN_GLAZED_TERRACOTTA, fn(Reader $in) => Helper::decodeGlazedTerracotta(DyeColor::CYAN(), $in));
$this->map(Ids::DARK_OAK_BUTTON, fn(Reader $in) => Helper::decodeButton(Blocks::DARK_OAK_BUTTON(), $in));
@ -712,6 +736,21 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
});
$this->map(Ids::PODZOL, fn() => Blocks::PODZOL());
$this->mapStairs(Ids::POLISHED_ANDESITE_STAIRS, fn() => Blocks::POLISHED_ANDESITE_STAIRS());
$this->map(Ids::POLISHED_BASALT, function(Reader $in) : Block{
return Blocks::POLISHED_BASALT()
->setAxis($in->readPillarAxis());
});
$this->map(Ids::POLISHED_BLACKSTONE, fn() => Blocks::POLISHED_BLACKSTONE());
$this->map(Ids::POLISHED_BLACKSTONE_BUTTON, fn(Reader $in) => Helper::decodeButton(Blocks::POLISHED_BLACKSTONE_BUTTON(), $in));
$this->mapSlab(Ids::POLISHED_BLACKSTONE_SLAB, Ids::POLISHED_BLACKSTONE_DOUBLE_SLAB, fn() => Blocks::POLISHED_BLACKSTONE_SLAB());
$this->map(Ids::POLISHED_BLACKSTONE_PRESSURE_PLATE, fn(Reader $in) => Helper::decodeSimplePressurePlate(Blocks::POLISHED_BLACKSTONE_PRESSURE_PLATE(), $in));
$this->mapStairs(Ids::POLISHED_BLACKSTONE_STAIRS, fn() => Blocks::POLISHED_BLACKSTONE_STAIRS());
$this->map(Ids::POLISHED_BLACKSTONE_WALL, fn(Reader $in) => Helper::decodeWall(Blocks::POLISHED_BLACKSTONE_WALL(), $in));
$this->map(Ids::POLISHED_BLACKSTONE_BRICKS, fn() => Blocks::POLISHED_BLACKSTONE_BRICKS());
$this->mapSlab(Ids::POLISHED_BLACKSTONE_BRICK_SLAB, Ids::POLISHED_BLACKSTONE_BRICK_DOUBLE_SLAB, fn() => Blocks::POLISHED_BLACKSTONE_BRICK_SLAB());
$this->mapStairs(Ids::POLISHED_BLACKSTONE_BRICK_STAIRS, fn() => Blocks::POLISHED_BLACKSTONE_BRICK_STAIRS());
$this->map(Ids::POLISHED_BLACKSTONE_BRICK_WALL, fn(Reader $in) => Helper::decodeWall(Blocks::POLISHED_BLACKSTONE_BRICK_WALL(), $in));
$this->mapStairs(Ids::POLISHED_DIORITE_STAIRS, fn() => Blocks::POLISHED_DIORITE_STAIRS());
$this->mapStairs(Ids::POLISHED_GRANITE_STAIRS, fn() => Blocks::POLISHED_GRANITE_STAIRS());
$this->map(Ids::PORTAL, function(Reader $in) : Block{
@ -884,6 +923,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
->setFacing($in->readHorizontalFacing())
->setLit(false);
});
$this->map(Ids::SMOOTH_BASALT, fn() => Blocks::SMOOTH_BASALT());
$this->mapStairs(Ids::SMOOTH_QUARTZ_STAIRS, fn() => Blocks::SMOOTH_QUARTZ_STAIRS());
$this->mapStairs(Ids::SMOOTH_RED_SANDSTONE_STAIRS, fn() => Blocks::SMOOTH_RED_SANDSTONE_STAIRS());
$this->mapStairs(Ids::SMOOTH_SANDSTONE_STAIRS, fn() => Blocks::SMOOTH_SANDSTONE_STAIRS());
@ -1064,18 +1104,12 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
//$this->map(Ids::ALLOW, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::AMETHYST_BLOCK, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::AMETHYST_CLUSTER, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* facing_direction (IntTag) = 0, 1, 2, 3, 4, 5
*/
//});
//$this->map(Ids::ANCIENT_DEBRIS, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::AZALEA, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
@ -1093,12 +1127,6 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
* update_bit (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::BASALT, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* pillar_axis (StringTag) = x, y, z
*/
//});
//$this->map(Ids::BEE_NEST, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
@ -1284,9 +1312,6 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
//$this->map(Ids::CHISELED_NETHER_BRICKS, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::CHISELED_POLISHED_BLACKSTONE, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::CHORUS_FLOWER, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
@ -1362,9 +1387,6 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
//$this->map(Ids::CRACKED_NETHER_BRICKS, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::CRIMSON_BUTTON, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
@ -1918,89 +1940,6 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
* hanging (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::POLISHED_BASALT, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* pillar_axis (StringTag) = x, y, z
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::POLISHED_BLACKSTONE_BRICK_DOUBLE_SLAB, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* top_slot_bit (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_BRICK_SLAB, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* top_slot_bit (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_BRICK_STAIRS, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* upside_down_bit (ByteTag) = 0, 1
* weirdo_direction (IntTag) = 0, 1, 2, 3
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_BRICK_WALL, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* wall_connection_type_east (StringTag) = none, short, tall
* wall_connection_type_north (StringTag) = none, short, tall
* wall_connection_type_south (StringTag) = none, short, tall
* wall_connection_type_west (StringTag) = none, short, tall
* wall_post_bit (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_BRICKS, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::POLISHED_BLACKSTONE_BUTTON, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* button_pressed_bit (ByteTag) = 0, 1
* facing_direction (IntTag) = 0, 1, 2, 3, 4, 5
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_DOUBLE_SLAB, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* top_slot_bit (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_PRESSURE_PLATE, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* redstone_signal (IntTag) = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_SLAB, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* top_slot_bit (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_STAIRS, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* upside_down_bit (ByteTag) = 0, 1
* weirdo_direction (IntTag) = 0, 1, 2, 3
*/
//});
//$this->map(Ids::POLISHED_BLACKSTONE_WALL, function(Reader $in) : Block{
/*
* TODO: Un-implemented block
* wall_connection_type_east (StringTag) = none, short, tall
* wall_connection_type_north (StringTag) = none, short, tall
* wall_connection_type_south (StringTag) = none, short, tall
* wall_connection_type_west (StringTag) = none, short, tall
* wall_post_bit (ByteTag) = 0, 1
*/
//});
//$this->map(Ids::POLISHED_DEEPSLATE, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
@ -2146,9 +2085,6 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
//$this->map(Ids::SMITHING_TABLE, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::SMOOTH_BASALT, function(Reader $in) : Block{
/* TODO: Un-implemented block */
//});
//$this->map(Ids::SOUL_CAMPFIRE, function(Reader $in) : Block{
/*
* TODO: Un-implemented block

View File

@ -95,6 +95,8 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("air", fn() => Blocks::AIR());
$result->registerBlock("all_sided_mushroom_stem", fn() => Blocks::ALL_SIDED_MUSHROOM_STEM());
$result->registerBlock("allium", fn() => Blocks::ALLIUM());
$result->registerBlock("amethyst_block", fn() => Blocks::AMETHYST());
$result->registerBlock("ancient_debris", fn() => Blocks::ANCIENT_DEBRIS());
$result->registerBlock("andesite", fn() => Blocks::ANDESITE());
$result->registerBlock("andesite_slab", fn() => Blocks::ANDESITE_SLAB());
$result->registerBlock("andesite_stairs", fn() => Blocks::ANDESITE_STAIRS());
@ -107,6 +109,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("banner", fn() => Blocks::BANNER());
$result->registerBlock("barrel", fn() => Blocks::BARREL());
$result->registerBlock("barrier", fn() => Blocks::BARRIER());
$result->registerBlock("basalt", fn() => Blocks::BASALT());
$result->registerBlock("beacon", fn() => Blocks::BEACON());
$result->registerBlock("bed_block", fn() => Blocks::BED());
$result->registerBlock("bedrock", fn() => Blocks::BEDROCK());
@ -132,6 +135,10 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("birch_wood", fn() => Blocks::BIRCH_WOOD()->setStripped(false));
$result->registerBlock("birch_wood_stairs", fn() => Blocks::BIRCH_STAIRS());
$result->registerBlock("birch_wooden_stairs", fn() => Blocks::BIRCH_STAIRS());
$result->registerBlock("blackstone", fn() => Blocks::BLACKSTONE());
$result->registerBlock("blackstone_slab", fn() => Blocks::BLACKSTONE_SLAB());
$result->registerBlock("blackstone_stairs", fn() => Blocks::BLACKSTONE_STAIRS());
$result->registerBlock("blackstone_wall", fn() => Blocks::BLACKSTONE_WALL());
$result->registerBlock("blast_furnace", fn() => Blocks::BLAST_FURNACE());
$result->registerBlock("blue_ice", fn() => Blocks::BLUE_ICE());
$result->registerBlock("blue_orchid", fn() => Blocks::BLUE_ORCHID());
@ -161,6 +168,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("chemistry_table", fn() => Blocks::COMPOUND_CREATOR());
$result->registerBlock("chest", fn() => Blocks::CHEST());
$result->registerBlock("chipped_anvil", fn() => Blocks::ANVIL()->setDamage(1));
$result->registerBlock("chiseled_polished_blackstone", fn() => Blocks::CHISELED_POLISHED_BLACKSTONE());
$result->registerBlock("chiseled_quartz", fn() => Blocks::CHISELED_QUARTZ());
$result->registerBlock("chiseled_red_sandstone", fn() => Blocks::CHISELED_RED_SANDSTONE());
$result->registerBlock("chiseled_sandstone", fn() => Blocks::CHISELED_SANDSTONE());
@ -197,6 +205,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("coral_fan_hang2", fn() => Blocks::WALL_CORAL_FAN()->setCoralType(CoralType::BUBBLE()));
$result->registerBlock("coral_fan_hang3", fn() => Blocks::WALL_CORAL_FAN()->setCoralType(CoralType::HORN()));
$result->registerBlock("cornflower", fn() => Blocks::CORNFLOWER());
$result->registerBlock("cracked_polished_blackstone_bricks", fn() => Blocks::CRACKED_POLISHED_BLACKSTONE_BRICKS());
$result->registerBlock("cracked_stone_bricks", fn() => Blocks::CRACKED_STONE_BRICKS());
$result->registerBlock("crafting_table", fn() => Blocks::CRAFTING_TABLE());
$result->registerBlock("cut_red_sandstone", fn() => Blocks::CUT_RED_SANDSTONE());
@ -716,6 +725,17 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("polished_andesite", fn() => Blocks::POLISHED_ANDESITE());
$result->registerBlock("polished_andesite_slab", fn() => Blocks::POLISHED_ANDESITE_SLAB());
$result->registerBlock("polished_andesite_stairs", fn() => Blocks::POLISHED_ANDESITE_STAIRS());
$result->registerBlock("polished_basalt", fn() => Blocks::POLISHED_BASALT());
$result->registerBlock("polished_blackstone", fn() => Blocks::POLISHED_BLACKSTONE());
$result->registerBlock("polished_blackstone_brick_slab", fn() => Blocks::POLISHED_BLACKSTONE_BRICK_SLAB());
$result->registerBlock("polished_blackstone_brick_stairs", fn() => Blocks::POLISHED_BLACKSTONE_BRICK_STAIRS());
$result->registerBlock("polished_blackstone_brick_wall", fn() => Blocks::POLISHED_BLACKSTONE_BRICK_WALL());
$result->registerBlock("polished_blackstone_bricks", fn() => Blocks::POLISHED_BLACKSTONE_BRICKS());
$result->registerBlock("polished_blackstone_button", fn() => Blocks::POLISHED_BLACKSTONE_BUTTON());
$result->registerBlock("polished_blackstone_pressure_plate", fn() => Blocks::POLISHED_BLACKSTONE_PRESSURE_PLATE());
$result->registerBlock("polished_blackstone_slab", fn() => Blocks::POLISHED_BLACKSTONE_SLAB());
$result->registerBlock("polished_blackstone_stairs", fn() => Blocks::POLISHED_BLACKSTONE_STAIRS());
$result->registerBlock("polished_blackstone_wall", fn() => Blocks::POLISHED_BLACKSTONE_WALL());
$result->registerBlock("polished_diorite", fn() => Blocks::POLISHED_DIORITE());
$result->registerBlock("polished_diorite_slab", fn() => Blocks::POLISHED_DIORITE_SLAB());
$result->registerBlock("polished_diorite_stairs", fn() => Blocks::POLISHED_DIORITE_STAIRS());
@ -800,6 +820,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("slime", fn() => Blocks::SLIME());
$result->registerBlock("slime_block", fn() => Blocks::SLIME());
$result->registerBlock("smoker", fn() => Blocks::SMOKER());
$result->registerBlock("smooth_basalt", fn() => Blocks::SMOOTH_BASALT());
$result->registerBlock("smooth_quartz", fn() => Blocks::SMOOTH_QUARTZ());
$result->registerBlock("smooth_quartz_slab", fn() => Blocks::SMOOTH_QUARTZ_SLAB());
$result->registerBlock("smooth_quartz_stairs", fn() => Blocks::SMOOTH_QUARTZ_STAIRS());