Added quartz bricks

This commit is contained in:
Dylan K. Taylor 2022-07-03 02:11:28 +01:00
parent 227a481473
commit 4acf7aadbd
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
7 changed files with 9 additions and 2 deletions

View File

@ -299,6 +299,7 @@ class BlockFactory{
$this->register(new SimplePillar(new BID(Ids::CHISELED_QUARTZ), "Chiseled Quartz Block", $quartzBreakInfo));
$this->register(new SimplePillar(new BID(Ids::QUARTZ_PILLAR), "Quartz Pillar", $quartzBreakInfo));
$this->register(new Opaque(new BID(Ids::SMOOTH_QUARTZ), "Smooth Quartz Block", $quartzBreakInfo));
$this->register(new Opaque(new BID(Ids::QUARTZ_BRICKS), "Quartz Bricks", $quartzBreakInfo));
$this->register(new Stair(new BID(Ids::QUARTZ_STAIRS), "Quartz Stairs", $quartzBreakInfo));
$this->register(new Stair(new BID(Ids::SMOOTH_QUARTZ_STAIRS), "Smooth Quartz Stairs", $quartzBreakInfo));

View File

@ -609,6 +609,7 @@ final class BlockTypeIds{
public const POLISHED_DEEPSLATE_SLAB = 10582;
public const POLISHED_DEEPSLATE_STAIRS = 10583;
public const POLISHED_DEEPSLATE_WALL = 10584;
public const QUARTZ_BRICKS = 10585;
public const FIRST_UNUSED_BLOCK_ID = 10585;
public const FIRST_UNUSED_BLOCK_ID = 10586;
}

View File

@ -485,6 +485,7 @@ use pocketmine\utils\CloningRegistryTrait;
* @method static Slab PURPUR_SLAB()
* @method static Stair PURPUR_STAIRS()
* @method static Opaque QUARTZ()
* @method static Opaque QUARTZ_BRICKS()
* @method static SimplePillar QUARTZ_PILLAR()
* @method static Slab QUARTZ_SLAB()
* @method static Stair QUARTZ_STAIRS()
@ -1066,6 +1067,7 @@ final class VanillaBlocks{
self::register("purpur_slab", $factory->get(Ids::PURPUR_SLAB, 0));
self::register("purpur_stairs", $factory->get(Ids::PURPUR_STAIRS, 0));
self::register("quartz", $factory->get(Ids::QUARTZ, 0));
self::register("quartz_bricks", $factory->get(Ids::QUARTZ_BRICKS, 0));
self::register("quartz_pillar", $factory->get(Ids::QUARTZ_PILLAR, 2));
self::register("quartz_slab", $factory->get(Ids::QUARTZ_SLAB, 0));
self::register("quartz_stairs", $factory->get(Ids::QUARTZ_STAIRS, 0));

View File

@ -954,6 +954,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
$this->map(Blocks::PURPUR_SLAB(), fn(Slab $block) => Helper::encodeStoneSlab2($block, StringValues::STONE_SLAB_TYPE_2_PURPUR));
$this->mapStairs(Blocks::PURPUR_STAIRS(), Ids::PURPUR_STAIRS);
$this->map(Blocks::QUARTZ(), fn() => Helper::encodeQuartz(StringValues::CHISEL_TYPE_DEFAULT, Axis::Y));
$this->mapSimple(Blocks::QUARTZ_BRICKS(), Ids::QUARTZ_BRICKS);
$this->map(Blocks::QUARTZ_PILLAR(), fn(SimplePillar $block) => Helper::encodeQuartz(StringValues::CHISEL_TYPE_LINES, $block->getAxis()));
$this->map(Blocks::QUARTZ_SLAB(), fn(Slab $block) => Helper::encodeStoneSlab1($block, StringValues::STONE_SLAB_TYPE_QUARTZ));
$this->mapStairs(Blocks::QUARTZ_STAIRS(), Ids::QUARTZ_STAIRS);

View File

@ -840,6 +840,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
return throw $in->badValueException(StateNames::CHISEL_TYPE, $type);
}
});
$this->map(Ids::QUARTZ_BRICKS, fn() => Blocks::QUARTZ_BRICKS());
$this->map(Ids::QUARTZ_ORE, fn() => Blocks::NETHER_QUARTZ_ORE());
$this->mapStairs(Ids::QUARTZ_STAIRS, fn() => Blocks::QUARTZ_STAIRS());
$this->map(Ids::RAIL, function(Reader $in) : Block{

View File

@ -801,6 +801,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("purpur_slab", fn() => Blocks::PURPUR_SLAB());
$result->registerBlock("purpur_stairs", fn() => Blocks::PURPUR_STAIRS());
$result->registerBlock("quartz_block", fn() => Blocks::QUARTZ());
$result->registerBlock("quartz_bricks", fn() => Blocks::QUARTZ_BRICKS());
$result->registerBlock("quartz_ore", fn() => Blocks::NETHER_QUARTZ_ORE());
$result->registerBlock("quartz_pillar", fn() => Blocks::QUARTZ_PILLAR());
$result->registerBlock("quartz_slab", fn() => Blocks::QUARTZ_SLAB());

File diff suppressed because one or more lines are too long