mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Added glowing item frames
This commit is contained in:
@ -36,6 +36,7 @@ use pocketmine\block\FenceGate;
|
||||
use pocketmine\block\FloorCoralFan;
|
||||
use pocketmine\block\FloorSign;
|
||||
use pocketmine\block\GlazedTerracotta;
|
||||
use pocketmine\block\ItemFrame;
|
||||
use pocketmine\block\Liquid;
|
||||
use pocketmine\block\RedMushroomBlock;
|
||||
use pocketmine\block\RedstoneComparator;
|
||||
@ -48,6 +49,7 @@ 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;
|
||||
@ -170,6 +172,14 @@ final class BlockStateDeserializerHelper{
|
||||
->setFacing($in->readHorizontalFacing());
|
||||
}
|
||||
|
||||
public static function decodeItemFrame(BlockStateReader $in, bool $glowing) : ItemFrame{
|
||||
$in->todo(StateNames::ITEM_FRAME_PHOTO_BIT); //TODO: not sure what the point of this is
|
||||
return Blocks::ITEM_FRAME()
|
||||
->setFacing($in->readFacingDirection())
|
||||
->setHasMap($in->readBool(StateNames::ITEM_FRAME_MAP_BIT))
|
||||
->setGlowing($glowing);
|
||||
}
|
||||
|
||||
/** @throws BlockStateDeserializeException */
|
||||
public static function decodeLiquid(Liquid $block, BlockStateReader $in, bool $still) : Liquid{
|
||||
$fluidHeightState = $in->readBoundedInt(BlockStateNames::LIQUID_DEPTH, 0, 15);
|
||||
|
Reference in New Issue
Block a user