mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Fixed glowing item frames
due to technical limitations, this requires separating them back into two different block types. However, this isn't too egregious since it's just one flag, and actually simplifies some code. closes #5478
This commit is contained in:
@ -49,7 +49,6 @@ use pocketmine\block\Trapdoor;
|
||||
use pocketmine\block\utils\CopperOxidation;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
use pocketmine\block\VanillaBlocks;
|
||||
use pocketmine\block\VanillaBlocks as Blocks;
|
||||
use pocketmine\block\Wall;
|
||||
use pocketmine\block\WallCoralFan;
|
||||
use pocketmine\block\WallSign;
|
||||
@ -172,12 +171,11 @@ final class BlockStateDeserializerHelper{
|
||||
->setFacing($in->readHorizontalFacing());
|
||||
}
|
||||
|
||||
public static function decodeItemFrame(BlockStateReader $in, bool $glowing) : ItemFrame{
|
||||
public static function decodeItemFrame(ItemFrame $block, BlockStateReader $in) : ItemFrame{
|
||||
$in->todo(StateNames::ITEM_FRAME_PHOTO_BIT); //TODO: not sure what the point of this is
|
||||
return Blocks::ITEM_FRAME()
|
||||
return $block
|
||||
->setFacing($in->readFacingDirection())
|
||||
->setHasMap($in->readBool(StateNames::ITEM_FRAME_MAP_BIT))
|
||||
->setGlowing($glowing);
|
||||
->setHasMap($in->readBool(StateNames::ITEM_FRAME_MAP_BIT));
|
||||
}
|
||||
|
||||
/** @throws BlockStateDeserializeException */
|
||||
|
Reference in New Issue
Block a user