mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-25 14:57:08 +00:00
added serializers for newly implemented blocks
This commit is contained in:
parent
f01887fb1e
commit
440a48b973
@ -703,6 +703,7 @@ final class BlockStateDeserializerR13{
|
|||||||
return VanillaBlocks::FIRE()
|
return VanillaBlocks::FIRE()
|
||||||
->setAge($in->readBoundedInt(BlockStateNamesR13::AGE, 0, 15));
|
->setAge($in->readBoundedInt(BlockStateNamesR13::AGE, 0, 15));
|
||||||
});
|
});
|
||||||
|
$this->mapVanilla("fletching_table", fn() => VanillaBlocks::FLETCHING_TABLE());
|
||||||
$this->mapVanilla("flower_pot", function() : Block{
|
$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)
|
//TODO: ignored update_bit (only useful on network to make the client actually render contents, not needed on disk)
|
||||||
return VanillaBlocks::FLOWER_POT();
|
return VanillaBlocks::FLOWER_POT();
|
||||||
@ -820,6 +821,11 @@ final class BlockStateDeserializerR13{
|
|||||||
->setNoDecay($in->readBool(BlockStateNamesR13::PERSISTENT_BIT))
|
->setNoDecay($in->readBool(BlockStateNamesR13::PERSISTENT_BIT))
|
||||||
->setCheckDecay($in->readBool(BlockStateNamesR13::UPDATE_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{
|
$this->mapVanilla("lever", function(BlockStateReader $in) : Block{
|
||||||
return VanillaBlocks::LEVER()
|
return VanillaBlocks::LEVER()
|
||||||
->setActivated($in->readBool(BlockStateNamesR13::OPEN_BIT))
|
->setActivated($in->readBool(BlockStateNamesR13::OPEN_BIT))
|
||||||
@ -1373,9 +1379,6 @@ final class BlockStateDeserializerR13{
|
|||||||
//$this->mapVanilla("end_portal", function(BlockStateReader $in) : Block{
|
//$this->mapVanilla("end_portal", function(BlockStateReader $in) : Block{
|
||||||
//TODO: un-implemented block
|
//TODO: un-implemented block
|
||||||
//});
|
//});
|
||||||
//$this->mapVanilla("fletching_table", function(BlockStateReader $in) : Block{
|
|
||||||
//TODO: un-implemented block
|
|
||||||
//});
|
|
||||||
//$this->mapVanilla("grindstone", function(BlockStateReader $in) : Block{
|
//$this->mapVanilla("grindstone", function(BlockStateReader $in) : Block{
|
||||||
/* TODO: parse properties
|
/* TODO: parse properties
|
||||||
* attachment (StringTag) = hanging, multiple, side, standing
|
* attachment (StringTag) = hanging, multiple, side, standing
|
||||||
@ -1398,12 +1401,6 @@ final class BlockStateDeserializerR13{
|
|||||||
* fill_level (IntTag) = 0, 1, 2, 3, 4, 5, 6
|
* 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{
|
//$this->mapVanilla("light_block", function(BlockStateReader $in) : Block{
|
||||||
/* TODO: parse properties
|
/* TODO: parse properties
|
||||||
* block_light_level (IntTag) = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
* 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));
|
return $this->deserializeFuncs[$id](new BlockStateReader($blockState));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user