added serializers for newly implemented blocks

This commit is contained in:
Dylan K. Taylor 2022-01-27 16:58:32 +00:00
parent f01887fb1e
commit 440a48b973
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -703,6 +703,7 @@ final class BlockStateDeserializerR13{
return VanillaBlocks::FIRE()
->setAge($in->readBoundedInt(BlockStateNamesR13::AGE, 0, 15));
});
$this->mapVanilla("fletching_table", fn() => VanillaBlocks::FLETCHING_TABLE());
$this->mapVanilla("flower_pot", function() : Block{
//TODO: ignored update_bit (only useful on network to make the client actually render contents, not needed on disk)
return VanillaBlocks::FLOWER_POT();
@ -820,6 +821,11 @@ final class BlockStateDeserializerR13{
->setNoDecay($in->readBool(BlockStateNamesR13::PERSISTENT_BIT))
->setCheckDecay($in->readBool(BlockStateNamesR13::UPDATE_BIT));
});
$this->mapVanilla("lectern", function(BlockStateReader $in) : Block{
return VanillaBlocks::LECTERN()
->setFacing($in->readLegacyHorizontalFacing())
->setProducingSignal($in->readBool(BlockStateNamesR13::POWERED_BIT));
});
$this->mapVanilla("lever", function(BlockStateReader $in) : Block{
return VanillaBlocks::LEVER()
->setActivated($in->readBool(BlockStateNamesR13::OPEN_BIT))
@ -1373,9 +1379,6 @@ final class BlockStateDeserializerR13{
//$this->mapVanilla("end_portal", function(BlockStateReader $in) : Block{
//TODO: un-implemented block
//});
//$this->mapVanilla("fletching_table", function(BlockStateReader $in) : Block{
//TODO: un-implemented block
//});
//$this->mapVanilla("grindstone", function(BlockStateReader $in) : Block{
/* TODO: parse properties
* attachment (StringTag) = hanging, multiple, side, standing
@ -1398,12 +1401,6 @@ final class BlockStateDeserializerR13{
* fill_level (IntTag) = 0, 1, 2, 3, 4, 5, 6
*/
//});
//$this->mapVanilla("lectern", function(BlockStateReader $in) : Block{
/* TODO: parse properties
* direction (IntTag) = 0, 1, 2, 3
* powered_bit (ByteTag) = 0, 1
*/
//});
//$this->mapVanilla("light_block", function(BlockStateReader $in) : Block{
/* TODO: parse properties
* block_light_level (IntTag) = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
@ -1491,4 +1488,4 @@ final class BlockStateDeserializerR13{
}
return $this->deserializeFuncs[$id](new BlockStateReader($blockState));
}
}
}