mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Implemented log stripping via axe right-click
This commit is contained in:
@ -33,6 +33,7 @@ use pocketmine\block\FloorCoralFan;
|
||||
use pocketmine\block\FloorSign;
|
||||
use pocketmine\block\GlazedTerracotta;
|
||||
use pocketmine\block\Liquid;
|
||||
use pocketmine\block\Log;
|
||||
use pocketmine\block\RedMushroomBlock;
|
||||
use pocketmine\block\RedstoneComparator;
|
||||
use pocketmine\block\RedstoneRepeater;
|
||||
@ -149,6 +150,13 @@ final class BlockStateDeserializerHelper{
|
||||
return self::decodeLiquid($block, $in, true);
|
||||
}
|
||||
|
||||
/** @throws BlockStateDeserializeException */
|
||||
public static function decodeLog(Log $block, bool $stripped, BlockStateReader $in) : Log{
|
||||
return $block
|
||||
->setAxis($in->readPillarAxis())
|
||||
->setStripped($stripped);
|
||||
}
|
||||
|
||||
/** @throws BlockStateDeserializeException */
|
||||
public static function decodeMushroomBlock(RedMushroomBlock $block, BlockStateReader $in) : Block{
|
||||
switch($type = $in->readBoundedInt(BlockStateNames::HUGE_MUSHROOM_BITS, 0, 15)){
|
||||
|
Reference in New Issue
Block a user