mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Item frames can now be placed on the up or down faces of blocks
This commit is contained in:
@ -694,7 +694,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
|
||||
return Writer::create(Ids::FRAME)
|
||||
->writeBool(StateNames::ITEM_FRAME_MAP_BIT, $block->hasMap())
|
||||
->writeBool(StateNames::ITEM_FRAME_PHOTO_BIT, false)
|
||||
->writeHorizontalFacing($block->getFacing());
|
||||
->writeFacingDirection($block->getFacing());
|
||||
});
|
||||
$this->map(Blocks::JUKEBOX(), fn() => new Writer(Ids::JUKEBOX));
|
||||
$this->map(Blocks::JUNGLE_BUTTON(), fn(WoodenButton $block) => Helper::encodeButton($block, new Writer(Ids::JUNGLE_BUTTON)));
|
||||
|
@ -486,10 +486,9 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
|
||||
$this->map(Ids::FLOWING_LAVA, fn(Reader $in) => Helper::decodeFlowingLiquid(Blocks::LAVA(), $in));
|
||||
$this->map(Ids::FLOWING_WATER, fn(Reader $in) => Helper::decodeFlowingLiquid(Blocks::WATER(), $in));
|
||||
$this->map(Ids::FRAME, function(Reader $in) : Block{
|
||||
//TODO: in R13 this can be any side, not just horizontal
|
||||
$in->todo(StateNames::ITEM_FRAME_PHOTO_BIT); //TODO: not sure what the point of this is
|
||||
return Blocks::ITEM_FRAME()
|
||||
->setFacing($in->readHorizontalFacing())
|
||||
->setFacing($in->readFacingDirection())
|
||||
->setHasMap($in->readBool(StateNames::ITEM_FRAME_MAP_BIT));
|
||||
});
|
||||
$this->map(Ids::FROSTED_ICE, function(Reader $in) : Block{
|
||||
|
Reference in New Issue
Block a user