Added raw copper, gold and iron blocks

This commit is contained in:
Dylan K. Taylor
2022-07-02 23:17:10 +01:00
parent 0d0296d535
commit 0e0b858b69
6 changed files with 23 additions and 1 deletions

View File

@ -938,6 +938,9 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
return Writer::create(Ids::RAIL)
->writeInt(StateNames::RAIL_DIRECTION, $block->getShape());
});
$this->mapSimple(Blocks::RAW_COPPER(), Ids::RAW_COPPER_BLOCK);
$this->mapSimple(Blocks::RAW_GOLD(), Ids::RAW_GOLD_BLOCK);
$this->mapSimple(Blocks::RAW_IRON(), Ids::RAW_IRON_BLOCK);
$this->mapSimple(Blocks::REDSTONE(), Ids::REDSTONE_BLOCK);
$this->map(Blocks::REDSTONE_COMPARATOR(), function(RedstoneComparator $block) : Writer{
return Writer::create($block->isPowered() ? Ids::POWERED_COMPARATOR : Ids::UNPOWERED_COMPARATOR)

View File

@ -824,6 +824,9 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
return Blocks::RAIL()
->setShape($in->readBoundedInt(StateNames::RAIL_DIRECTION, 0, 9));
});
$this->map(Ids::RAW_COPPER_BLOCK, fn() => Blocks::RAW_COPPER());
$this->map(Ids::RAW_GOLD_BLOCK, fn() => Blocks::RAW_GOLD());
$this->map(Ids::RAW_IRON_BLOCK, fn() => Blocks::RAW_IRON());
$this->map(Ids::RED_FLOWER, function(Reader $in) : Block{
return match($type = $in->readString(StateNames::FLOWER_TYPE)){
StringValues::FLOWER_TYPE_ALLIUM => Blocks::ALLIUM(),