mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-11 14:02:05 +00:00
Add blocks interfaces for commons properties (#6639)
This commit is contained in:
parent
5bfa02716d
commit
cc17e68072
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PoweredByRedstone;
|
||||||
use pocketmine\block\utils\RailPoweredByRedstoneTrait;
|
use pocketmine\block\utils\RailPoweredByRedstoneTrait;
|
||||||
|
|
||||||
class ActivatorRail extends StraightOnlyRail{
|
class ActivatorRail extends StraightOnlyRail implements PoweredByRedstone{
|
||||||
use RailPoweredByRedstoneTrait;
|
use RailPoweredByRedstoneTrait;
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\AmethystTrait;
|
use pocketmine\block\utils\AmethystTrait;
|
||||||
|
use pocketmine\block\utils\AnyFacing;
|
||||||
use pocketmine\block\utils\AnyFacingTrait;
|
use pocketmine\block\utils\AnyFacingTrait;
|
||||||
use pocketmine\block\utils\FortuneDropHelper;
|
use pocketmine\block\utils\FortuneDropHelper;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
@ -38,7 +39,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\utils\AssumptionFailedError;
|
use pocketmine\utils\AssumptionFailedError;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class AmethystCluster extends Transparent{
|
final class AmethystCluster extends Transparent implements AnyFacing{
|
||||||
use AmethystTrait;
|
use AmethystTrait;
|
||||||
use AnyFacingTrait;
|
use AnyFacingTrait;
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ namespace pocketmine\block;
|
|||||||
use pocketmine\block\inventory\AnvilInventory;
|
use pocketmine\block\inventory\AnvilInventory;
|
||||||
use pocketmine\block\utils\Fallable;
|
use pocketmine\block\utils\Fallable;
|
||||||
use pocketmine\block\utils\FallableTrait;
|
use pocketmine\block\utils\FallableTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -41,7 +42,7 @@ use pocketmine\world\sound\AnvilFallSound;
|
|||||||
use pocketmine\world\sound\Sound;
|
use pocketmine\world\sound\Sound;
|
||||||
use function round;
|
use function round;
|
||||||
|
|
||||||
class Anvil extends Transparent implements Fallable{
|
class Anvil extends Transparent implements Fallable, HorizontalFacing{
|
||||||
use FallableTrait;
|
use FallableTrait;
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\tile\Barrel as TileBarrel;
|
use pocketmine\block\tile\Barrel as TileBarrel;
|
||||||
|
use pocketmine\block\utils\AnyFacing;
|
||||||
use pocketmine\block\utils\AnyFacingTrait;
|
use pocketmine\block\utils\AnyFacingTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use function abs;
|
use function abs;
|
||||||
|
|
||||||
class Barrel extends Opaque{
|
class Barrel extends Opaque implements AnyFacing{
|
||||||
use AnyFacingTrait;
|
use AnyFacingTrait;
|
||||||
|
|
||||||
protected bool $open = false;
|
protected bool $open = false;
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\tile\Banner as TileBanner;
|
use pocketmine\block\tile\Banner as TileBanner;
|
||||||
use pocketmine\block\utils\BannerPatternLayer;
|
use pocketmine\block\utils\BannerPatternLayer;
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\item\Banner as ItemBanner;
|
use pocketmine\item\Banner as ItemBanner;
|
||||||
@ -36,7 +37,7 @@ use pocketmine\world\BlockTransaction;
|
|||||||
use function assert;
|
use function assert;
|
||||||
use function count;
|
use function count;
|
||||||
|
|
||||||
abstract class BaseBanner extends Transparent{
|
abstract class BaseBanner extends Transparent implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\event\block\StructureGrowEvent;
|
use pocketmine\event\block\StructureGrowEvent;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
abstract class BaseBigDripleaf extends Transparent{
|
abstract class BaseBigDripleaf extends Transparent implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
abstract protected function isHead() : bool;
|
abstract protected function isHead() : bool;
|
||||||
|
@ -24,12 +24,13 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
|
use pocketmine\block\utils\CoralMaterial;
|
||||||
use pocketmine\block\utils\CoralTypeTrait;
|
use pocketmine\block\utils\CoralTypeTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
abstract class BaseCoral extends Transparent{
|
abstract class BaseCoral extends Transparent implements CoralMaterial{
|
||||||
use CoralTypeTrait;
|
use CoralTypeTrait;
|
||||||
|
|
||||||
public function onNearbyBlockChange() : void{
|
public function onNearbyBlockChange() : void{
|
||||||
|
@ -27,6 +27,7 @@ use pocketmine\block\tile\Sign as TileSign;
|
|||||||
use pocketmine\block\utils\DyeColor;
|
use pocketmine\block\utils\DyeColor;
|
||||||
use pocketmine\block\utils\SignText;
|
use pocketmine\block\utils\SignText;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodType;
|
use pocketmine\block\utils\WoodType;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
use pocketmine\color\Color;
|
use pocketmine\color\Color;
|
||||||
@ -44,7 +45,7 @@ use function array_map;
|
|||||||
use function assert;
|
use function assert;
|
||||||
use function strlen;
|
use function strlen;
|
||||||
|
|
||||||
abstract class BaseSign extends Transparent{
|
abstract class BaseSign extends Transparent implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
protected SignText $text;
|
protected SignText $text;
|
||||||
|
@ -24,8 +24,10 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\tile\Bed as TileBed;
|
use pocketmine\block\tile\Bed as TileBed;
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
use pocketmine\block\utils\DyeColor;
|
use pocketmine\block\utils\DyeColor;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -41,7 +43,7 @@ use pocketmine\utils\TextFormat;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use pocketmine\world\World;
|
use pocketmine\world\World;
|
||||||
|
|
||||||
class Bed extends Transparent{
|
class Bed extends Transparent implements Colored, HorizontalFacing{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\tile\Bell as TileBell;
|
use pocketmine\block\tile\Bell as TileBell;
|
||||||
use pocketmine\block\utils\BellAttachmentType;
|
use pocketmine\block\utils\BellAttachmentType;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -38,7 +39,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use pocketmine\world\sound\BellRingSound;
|
use pocketmine\world\sound\BellRingSound;
|
||||||
|
|
||||||
final class Bell extends Transparent{
|
final class Bell extends Transparent implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
private BellAttachmentType $attachmentType = BellAttachmentType::FLOOR;
|
private BellAttachmentType $attachmentType = BellAttachmentType::FLOOR;
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PillarRotation;
|
||||||
use pocketmine\block\utils\PillarRotationTrait;
|
use pocketmine\block\utils\PillarRotationTrait;
|
||||||
|
|
||||||
class BoneBlock extends Opaque{
|
class BoneBlock extends Opaque implements PillarRotation{
|
||||||
use PillarRotationTrait;
|
use PillarRotationTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\AnyFacing;
|
||||||
use pocketmine\block\utils\AnyFacingTrait;
|
use pocketmine\block\utils\AnyFacingTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\world\BlockTransaction;
|
|||||||
use pocketmine\world\sound\RedstonePowerOffSound;
|
use pocketmine\world\sound\RedstonePowerOffSound;
|
||||||
use pocketmine\world\sound\RedstonePowerOnSound;
|
use pocketmine\world\sound\RedstonePowerOnSound;
|
||||||
|
|
||||||
abstract class Button extends Flowable{
|
abstract class Button extends Flowable implements AnyFacing{
|
||||||
use AnyFacingTrait;
|
use AnyFacingTrait;
|
||||||
|
|
||||||
protected bool $pressed = false;
|
protected bool $pressed = false;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\event\entity\EntityDamageEvent;
|
|||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
class Cactus extends Transparent{
|
class Cactus extends Transparent implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\CandleTrait;
|
use pocketmine\block\utils\CandleTrait;
|
||||||
|
use pocketmine\block\utils\Lightable;
|
||||||
use pocketmine\entity\Living;
|
use pocketmine\entity\Living;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
@ -31,7 +32,7 @@ use pocketmine\math\Facing;
|
|||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
class CakeWithCandle extends BaseCake{
|
class CakeWithCandle extends BaseCake implements Lightable{
|
||||||
use CandleTrait {
|
use CandleTrait {
|
||||||
onInteract as onInteractCandle;
|
onInteract as onInteractCandle;
|
||||||
}
|
}
|
||||||
|
@ -23,10 +23,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
use pocketmine\block\utils\DyeColor;
|
use pocketmine\block\utils\DyeColor;
|
||||||
|
|
||||||
class CakeWithDyedCandle extends CakeWithCandle{
|
class CakeWithDyedCandle extends CakeWithCandle implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
|
|
||||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockTypeInfo $typeInfo){
|
public function __construct(BlockIdentifier $idInfo, string $name, BlockTypeInfo $typeInfo){
|
||||||
|
@ -25,7 +25,9 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\inventory\CampfireInventory;
|
use pocketmine\block\inventory\CampfireInventory;
|
||||||
use pocketmine\block\tile\Campfire as TileCampfire;
|
use pocketmine\block\tile\Campfire as TileCampfire;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
|
use pocketmine\block\utils\Lightable;
|
||||||
use pocketmine\block\utils\LightableTrait;
|
use pocketmine\block\utils\LightableTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\crafting\FurnaceRecipe;
|
use pocketmine\crafting\FurnaceRecipe;
|
||||||
@ -59,7 +61,7 @@ use function count;
|
|||||||
use function min;
|
use function min;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class Campfire extends Transparent{
|
class Campfire extends Transparent implements Lightable, HorizontalFacing{
|
||||||
use HorizontalFacingTrait{
|
use HorizontalFacingTrait{
|
||||||
HorizontalFacingTrait::describeBlockOnlyState as encodeFacingState;
|
HorizontalFacingTrait::describeBlockOnlyState as encodeFacingState;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\CandleTrait;
|
use pocketmine\block\utils\CandleTrait;
|
||||||
|
use pocketmine\block\utils\Lightable;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -35,7 +36,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\utils\AssumptionFailedError;
|
use pocketmine\utils\AssumptionFailedError;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class Candle extends Transparent{
|
class Candle extends Transparent implements Lightable{
|
||||||
use CandleTrait {
|
use CandleTrait {
|
||||||
describeBlockOnlyState as encodeLitState;
|
describeBlockOnlyState as encodeLitState;
|
||||||
getLightLevel as getBaseLightLevel;
|
getLightLevel as getBaseLightLevel;
|
||||||
|
@ -23,12 +23,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
class Carpet extends Flowable{
|
class Carpet extends Flowable implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
|
|
||||||
class CarvedPumpkin extends Opaque{
|
class CarvedPumpkin extends Opaque implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
@ -39,7 +40,7 @@ use pocketmine\world\BlockTransaction;
|
|||||||
use pocketmine\world\sound\GlowBerriesPickSound;
|
use pocketmine\world\sound\GlowBerriesPickSound;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class CaveVines extends Flowable{
|
class CaveVines extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -23,13 +23,14 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PillarRotation;
|
||||||
use pocketmine\block\utils\PillarRotationTrait;
|
use pocketmine\block\utils\PillarRotationTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\math\Axis;
|
use pocketmine\math\Axis;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
final class Chain extends Transparent{
|
final class Chain extends Transparent implements PillarRotation{
|
||||||
use PillarRotationTrait;
|
use PillarRotationTrait;
|
||||||
|
|
||||||
public function getSupportType(int $facing) : SupportType{
|
public function getSupportType(int $facing) : SupportType{
|
||||||
|
@ -24,11 +24,12 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
final class ChemistryTable extends Opaque{
|
final class ChemistryTable extends Opaque implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
|
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\tile\Chest as TileChest;
|
use pocketmine\block\tile\Chest as TileChest;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\event\block\ChestPairEvent;
|
use pocketmine\event\block\ChestPairEvent;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\math\Facing;
|
|||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
class Chest extends Transparent{
|
class Chest extends Transparent implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
protected function recalculateCollisionBoxes() : array{
|
protected function recalculateCollisionBoxes() : array{
|
||||||
|
@ -26,6 +26,7 @@ namespace pocketmine\block;
|
|||||||
use pocketmine\block\tile\ChiseledBookshelf as TileChiseledBookshelf;
|
use pocketmine\block\tile\ChiseledBookshelf as TileChiseledBookshelf;
|
||||||
use pocketmine\block\utils\ChiseledBookshelfSlot;
|
use pocketmine\block\utils\ChiseledBookshelfSlot;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Book;
|
use pocketmine\item\Book;
|
||||||
@ -38,7 +39,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use function spl_object_id;
|
use function spl_object_id;
|
||||||
|
|
||||||
class ChiseledBookshelf extends Opaque{
|
class ChiseledBookshelf extends Opaque implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
use pocketmine\entity\projectile\Projectile;
|
use pocketmine\entity\projectile\Projectile;
|
||||||
@ -40,7 +41,7 @@ use function array_rand;
|
|||||||
use function min;
|
use function min;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
final class ChorusFlower extends Flowable{
|
final class ChorusFlower extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -23,8 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\WoodType;
|
use pocketmine\block\utils\WoodType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -39,7 +41,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class CocoaBlock extends Flowable{
|
class CocoaBlock extends Flowable implements Ageable, HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
|
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
class Concrete extends Opaque{
|
class Concrete extends Opaque implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,13 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
use pocketmine\block\utils\Fallable;
|
use pocketmine\block\utils\Fallable;
|
||||||
use pocketmine\block\utils\FallableTrait;
|
use pocketmine\block\utils\FallableTrait;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
class ConcretePowder extends Opaque implements Fallable{
|
class ConcretePowder extends Opaque implements Fallable, Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
use FallableTrait {
|
use FallableTrait {
|
||||||
onNearbyBlockChange as protected startFalling;
|
onNearbyBlockChange as protected startFalling;
|
||||||
|
@ -26,11 +26,13 @@ namespace pocketmine\block;
|
|||||||
use pocketmine\block\utils\CopperMaterial;
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperOxidation;
|
use pocketmine\block\utils\CopperOxidation;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
|
use pocketmine\block\utils\Lightable;
|
||||||
use pocketmine\block\utils\LightableTrait;
|
use pocketmine\block\utils\LightableTrait;
|
||||||
|
use pocketmine\block\utils\PoweredByRedstone;
|
||||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
|
|
||||||
class CopperBulb extends Opaque implements CopperMaterial{
|
class CopperBulb extends Opaque implements CopperMaterial, Lightable, PoweredByRedstone{
|
||||||
use CopperTrait;
|
use CopperTrait;
|
||||||
use PoweredByRedstoneTrait;
|
use PoweredByRedstoneTrait;
|
||||||
use LightableTrait{
|
use LightableTrait{
|
||||||
|
@ -24,11 +24,12 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
|
use pocketmine\block\utils\CoralMaterial;
|
||||||
use pocketmine\block\utils\CoralTypeTrait;
|
use pocketmine\block\utils\CoralTypeTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
final class CoralBlock extends Opaque{
|
final class CoralBlock extends Opaque implements CoralMaterial{
|
||||||
use CoralTypeTrait;
|
use CoralTypeTrait;
|
||||||
|
|
||||||
public function onNearbyBlockChange() : void{
|
public function onNearbyBlockChange() : void{
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\CropGrowthHelper;
|
use pocketmine\block\utils\CropGrowthHelper;
|
||||||
@ -34,7 +35,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
abstract class Crops extends Flowable{
|
abstract class Crops extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitter;
|
||||||
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -36,7 +37,7 @@ use function max;
|
|||||||
use function round;
|
use function round;
|
||||||
use const M_PI;
|
use const M_PI;
|
||||||
|
|
||||||
class DaylightSensor extends Transparent{
|
class DaylightSensor extends Transparent implements AnalogRedstoneSignalEmitter{
|
||||||
use AnalogRedstoneSignalEmitterTrait;
|
use AnalogRedstoneSignalEmitterTrait;
|
||||||
|
|
||||||
protected bool $inverted = false;
|
protected bool $inverted = false;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -34,7 +35,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use pocketmine\world\sound\DoorSound;
|
use pocketmine\world\sound\DoorSound;
|
||||||
|
|
||||||
class Door extends Transparent{
|
class Door extends Transparent implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected bool $top = false;
|
protected bool $top = false;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\CropGrowthHelper;
|
use pocketmine\block\utils\CropGrowthHelper;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -37,7 +38,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class DoublePitcherCrop extends DoublePlant{
|
final class DoublePitcherCrop extends DoublePlant implements Ageable{
|
||||||
use AgeableTrait {
|
use AgeableTrait {
|
||||||
describeBlockOnlyState as describeAge;
|
describeBlockOnlyState as describeAge;
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
class DyedCandle extends Candle{
|
class DyedCandle extends Candle implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
|
|
||||||
protected function getCandleIfCompatibleType(Block $block) : ?Candle{
|
protected function getCandleIfCompatibleType(Block $block) : ?Candle{
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
final class DyedShulkerBox extends ShulkerBox{
|
final class DyedShulkerBox extends ShulkerBox implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,12 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
class EndPortalFrame extends Opaque{
|
class EndPortalFrame extends Opaque implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
protected bool $eye = false;
|
protected bool $eye = false;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\AnyFacing;
|
||||||
use pocketmine\block\utils\AnyFacingTrait;
|
use pocketmine\block\utils\AnyFacingTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Axis;
|
use pocketmine\math\Axis;
|
||||||
@ -32,7 +33,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class EndRod extends Flowable{
|
class EndRod extends Flowable implements AnyFacing{
|
||||||
use AnyFacingTrait;
|
use AnyFacingTrait;
|
||||||
|
|
||||||
public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
|
public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
|
||||||
|
@ -26,6 +26,7 @@ namespace pocketmine\block;
|
|||||||
use pocketmine\block\inventory\EnderChestInventory;
|
use pocketmine\block\inventory\EnderChestInventory;
|
||||||
use pocketmine\block\tile\EnderChest as TileEnderChest;
|
use pocketmine\block\tile\EnderChest as TileEnderChest;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\math\Facing;
|
|||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
class EnderChest extends Transparent{
|
class EnderChest extends Transparent implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
public function getLightLevel() : int{
|
public function getLightLevel() : int{
|
||||||
|
@ -23,8 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -35,7 +37,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use pocketmine\world\sound\DoorSound;
|
use pocketmine\world\sound\DoorSound;
|
||||||
|
|
||||||
class FenceGate extends Transparent{
|
class FenceGate extends Transparent implements HorizontalFacing, WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
@ -35,7 +36,7 @@ use function max;
|
|||||||
use function min;
|
use function min;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class Fire extends BaseFire{
|
class Fire extends BaseFire implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
|
|
||||||
public const MAX_AGE = 15;
|
public const MAX_AGE = 15;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\SignLikeRotation;
|
||||||
use pocketmine\block\utils\SignLikeRotationTrait;
|
use pocketmine\block\utils\SignLikeRotationTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
@ -30,7 +31,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class FloorBanner extends BaseBanner{
|
final class FloorBanner extends BaseBanner implements SignLikeRotation{
|
||||||
use SignLikeRotationTrait;
|
use SignLikeRotationTrait;
|
||||||
|
|
||||||
protected function getSupportingFace() : int{
|
protected function getSupportingFace() : int{
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\SignLikeRotation;
|
||||||
use pocketmine\block\utils\SignLikeRotationTrait;
|
use pocketmine\block\utils\SignLikeRotationTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
@ -30,7 +31,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class FloorSign extends BaseSign{
|
final class FloorSign extends BaseSign implements SignLikeRotation{
|
||||||
use SignLikeRotationTrait;
|
use SignLikeRotationTrait;
|
||||||
|
|
||||||
protected function getSupportingFace() : int{
|
protected function getSupportingFace() : int{
|
||||||
|
@ -23,11 +23,12 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class FrostedIce extends Ice{
|
class FrostedIce extends Ice implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
|
|
||||||
public const MAX_AGE = 3;
|
public const MAX_AGE = 3;
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\tile\Furnace as TileFurnace;
|
use pocketmine\block\tile\Furnace as TileFurnace;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\Lightable;
|
||||||
use pocketmine\block\utils\LightableTrait;
|
use pocketmine\block\utils\LightableTrait;
|
||||||
use pocketmine\crafting\FurnaceType;
|
use pocketmine\crafting\FurnaceType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class Furnace extends Opaque{
|
class Furnace extends Opaque implements Lightable{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
use LightableTrait;
|
use LightableTrait;
|
||||||
|
|
||||||
|
@ -23,10 +23,12 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
|
|
||||||
class GlazedTerracotta extends Opaque{
|
class GlazedTerracotta extends Opaque implements Colored, HorizontalFacing{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\MultiAnySupportTrait;
|
use pocketmine\block\utils\MultiAnySupportTrait;
|
||||||
|
use pocketmine\block\utils\MultiFacing;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\item\Fertilizer;
|
use pocketmine\item\Fertilizer;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -35,7 +36,7 @@ use pocketmine\world\World;
|
|||||||
use function count;
|
use function count;
|
||||||
use function shuffle;
|
use function shuffle;
|
||||||
|
|
||||||
class GlowLichen extends Transparent{
|
class GlowLichen extends Transparent implements MultiFacing{
|
||||||
use MultiAnySupportTrait;
|
use MultiAnySupportTrait;
|
||||||
|
|
||||||
public function getLightLevel() : int{
|
public function getLightLevel() : int{
|
||||||
|
@ -23,10 +23,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PillarRotation;
|
||||||
use pocketmine\block\utils\PillarRotationTrait;
|
use pocketmine\block\utils\PillarRotationTrait;
|
||||||
use pocketmine\entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
|
|
||||||
class HayBale extends Opaque{
|
class HayBale extends Opaque implements PillarRotation{
|
||||||
use PillarRotationTrait;
|
use PillarRotationTrait;
|
||||||
|
|
||||||
public function getFlameEncouragement() : int{
|
public function getFlameEncouragement() : int{
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\tile\Hopper as TileHopper;
|
use pocketmine\block\tile\Hopper as TileHopper;
|
||||||
|
use pocketmine\block\utils\PoweredByRedstone;
|
||||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -34,7 +35,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class Hopper extends Transparent{
|
class Hopper extends Transparent implements PoweredByRedstone{
|
||||||
use PoweredByRedstoneTrait;
|
use PoweredByRedstoneTrait;
|
||||||
|
|
||||||
private int $facing = Facing::DOWN;
|
private int $facing = Facing::DOWN;
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\tile\ItemFrame as TileItemFrame;
|
use pocketmine\block\tile\ItemFrame as TileItemFrame;
|
||||||
|
use pocketmine\block\utils\AnyFacing;
|
||||||
use pocketmine\block\utils\AnyFacingTrait;
|
use pocketmine\block\utils\AnyFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -39,7 +40,7 @@ use pocketmine\world\sound\ItemFrameRotateItemSound;
|
|||||||
use function is_infinite;
|
use function is_infinite;
|
||||||
use function is_nan;
|
use function is_nan;
|
||||||
|
|
||||||
class ItemFrame extends Flowable{
|
class ItemFrame extends Flowable implements AnyFacing{
|
||||||
use AnyFacingTrait;
|
use AnyFacingTrait;
|
||||||
|
|
||||||
public const ROTATIONS = 8;
|
public const ROTATIONS = 8;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
@ -35,7 +36,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class Ladder extends Transparent{
|
class Ladder extends Transparent implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
public function hasEntityCollision() : bool{
|
public function hasEntityCollision() : bool{
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\tile\Lectern as TileLectern;
|
use pocketmine\block\tile\Lectern as TileLectern;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -36,7 +37,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\sound\LecternPlaceBookSound;
|
use pocketmine\world\sound\LecternPlaceBookSound;
|
||||||
use function count;
|
use function count;
|
||||||
|
|
||||||
class Lectern extends Transparent{
|
class Lectern extends Transparent implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
protected int $viewedPage = 0;
|
protected int $viewedPage = 0;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\AnyFacing;
|
||||||
use pocketmine\block\utils\AnyFacingTrait;
|
use pocketmine\block\utils\AnyFacingTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Axis;
|
use pocketmine\math\Axis;
|
||||||
@ -32,7 +33,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class LightningRod extends Transparent{
|
final class LightningRod extends Transparent implements AnyFacing{
|
||||||
use AnyFacingTrait;
|
use AnyFacingTrait;
|
||||||
|
|
||||||
protected function recalculateCollisionBoxes() : array{
|
protected function recalculateCollisionBoxes() : array{
|
||||||
|
@ -25,11 +25,12 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\inventory\LoomInventory;
|
use pocketmine\block\inventory\LoomInventory;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
final class Loom extends Opaque{
|
final class Loom extends Opaque implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
|
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\FortuneDropHelper;
|
use pocketmine\block\utils\FortuneDropHelper;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
@ -41,7 +42,7 @@ use function mt_rand;
|
|||||||
/**
|
/**
|
||||||
* This class is used for Weeping & Twisting vines, because they have same behaviour
|
* This class is used for Weeping & Twisting vines, because they have same behaviour
|
||||||
*/
|
*/
|
||||||
class NetherVines extends Flowable{
|
class NetherVines extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\FortuneDropHelper;
|
use pocketmine\block\utils\FortuneDropHelper;
|
||||||
@ -31,7 +32,7 @@ use pocketmine\item\Item;
|
|||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class NetherWartPlant extends Flowable{
|
class NetherWartPlant extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -34,7 +35,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class PinkPetals extends Flowable{
|
class PinkPetals extends Flowable implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
use StaticSupportTrait {
|
use StaticSupportTrait {
|
||||||
canBePlacedAt as supportedWhenPlacedAt;
|
canBePlacedAt as supportedWhenPlacedAt;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\CropGrowthHelper;
|
use pocketmine\block\utils\CropGrowthHelper;
|
||||||
@ -38,7 +39,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class PitcherCrop extends Flowable{
|
final class PitcherCrop extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class Planks extends Opaque{
|
class Planks extends Opaque implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
public function getFuelTime() : int{
|
public function getFuelTime() : int{
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PoweredByRedstone;
|
||||||
use pocketmine\block\utils\RailPoweredByRedstoneTrait;
|
use pocketmine\block\utils\RailPoweredByRedstoneTrait;
|
||||||
|
|
||||||
class PoweredRail extends StraightOnlyRail{
|
class PoweredRail extends StraightOnlyRail implements PoweredByRedstone{
|
||||||
use RailPoweredByRedstoneTrait;
|
use RailPoweredByRedstoneTrait;
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,11 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\tile\Comparator;
|
use pocketmine\block\tile\Comparator;
|
||||||
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitter;
|
||||||
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
|
use pocketmine\block\utils\PoweredByRedstone;
|
||||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
@ -38,7 +41,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use function assert;
|
use function assert;
|
||||||
|
|
||||||
class RedstoneComparator extends Flowable{
|
class RedstoneComparator extends Flowable implements AnalogRedstoneSignalEmitter, PoweredByRedstone, HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
use AnalogRedstoneSignalEmitterTrait;
|
use AnalogRedstoneSignalEmitterTrait;
|
||||||
use PoweredByRedstoneTrait;
|
use PoweredByRedstoneTrait;
|
||||||
|
@ -23,10 +23,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PoweredByRedstone;
|
||||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
|
|
||||||
class RedstoneLamp extends Opaque{
|
class RedstoneLamp extends Opaque implements PoweredByRedstone{
|
||||||
use PoweredByRedstoneTrait;
|
use PoweredByRedstoneTrait;
|
||||||
|
|
||||||
protected function describeBlockOnlyState(RuntimeDataDescriber $w) : void{
|
protected function describeBlockOnlyState(RuntimeDataDescriber $w) : void{
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\FortuneDropHelper;
|
use pocketmine\block\utils\FortuneDropHelper;
|
||||||
|
use pocketmine\block\utils\Lightable;
|
||||||
use pocketmine\block\utils\LightableTrait;
|
use pocketmine\block\utils\LightableTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\item\VanillaItems;
|
use pocketmine\item\VanillaItems;
|
||||||
@ -31,7 +32,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class RedstoneOre extends Opaque{
|
class RedstoneOre extends Opaque implements Lightable{
|
||||||
use LightableTrait;
|
use LightableTrait;
|
||||||
|
|
||||||
public function getLightLevel() : int{
|
public function getLightLevel() : int{
|
||||||
|
@ -23,7 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
|
use pocketmine\block\utils\PoweredByRedstone;
|
||||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
@ -35,7 +37,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class RedstoneRepeater extends Flowable{
|
class RedstoneRepeater extends Flowable implements PoweredByRedstone, HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
use PoweredByRedstoneTrait;
|
use PoweredByRedstoneTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
@ -23,10 +23,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Lightable;
|
||||||
use pocketmine\block\utils\LightableTrait;
|
use pocketmine\block\utils\LightableTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
|
|
||||||
class RedstoneTorch extends Torch{
|
class RedstoneTorch extends Torch implements Lightable{
|
||||||
use LightableTrait;
|
use LightableTrait;
|
||||||
|
|
||||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockTypeInfo $typeInfo){
|
public function __construct(BlockIdentifier $idInfo, string $name, BlockTypeInfo $typeInfo){
|
||||||
|
@ -23,13 +23,14 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitter;
|
||||||
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\item\VanillaItems;
|
use pocketmine\item\VanillaItems;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
class RedstoneWire extends Flowable{
|
class RedstoneWire extends Flowable implements AnalogRedstoneSignalEmitter{
|
||||||
use AnalogRedstoneSignalEmitterTrait;
|
use AnalogRedstoneSignalEmitterTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -24,9 +24,10 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\MultiAnySupportTrait;
|
use pocketmine\block\utils\MultiAnySupportTrait;
|
||||||
|
use pocketmine\block\utils\MultiFacing;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
|
|
||||||
final class ResinClump extends Transparent{
|
final class ResinClump extends Transparent implements MultiFacing{
|
||||||
use MultiAnySupportTrait;
|
use MultiAnySupportTrait;
|
||||||
|
|
||||||
public function isSolid() : bool{
|
public function isSolid() : bool{
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\tile\ShulkerBox as TileShulkerBox;
|
use pocketmine\block\tile\ShulkerBox as TileShulkerBox;
|
||||||
|
use pocketmine\block\utils\AnyFacing;
|
||||||
use pocketmine\block\utils\AnyFacingTrait;
|
use pocketmine\block\utils\AnyFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -32,7 +33,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class ShulkerBox extends Opaque{
|
class ShulkerBox extends Opaque implements AnyFacing{
|
||||||
use AnyFacingTrait;
|
use AnyFacingTrait;
|
||||||
|
|
||||||
protected function describeBlockOnlyState(RuntimeDataDescriber $w) : void{
|
protected function describeBlockOnlyState(RuntimeDataDescriber $w) : void{
|
||||||
|
@ -23,12 +23,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PillarRotation;
|
||||||
use pocketmine\block\utils\PillarRotationTrait;
|
use pocketmine\block\utils\PillarRotationTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class provides a general base for pillar-like blocks. It **should not** be used for contract binding
|
* @internal This class provides a general base for pillar-like blocks. It **should not** be used for contract binding
|
||||||
* in APIs, because not all pillar-like blocks extend this class.
|
* in APIs, because not all pillar-like blocks extend this class.
|
||||||
*/
|
*/
|
||||||
class SimplePillar extends Opaque{
|
class SimplePillar extends Opaque implements PillarRotation{
|
||||||
use PillarRotationTrait;
|
use PillarRotationTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -36,7 +37,7 @@ use pocketmine\world\BlockTransaction;
|
|||||||
use pocketmine\world\Position;
|
use pocketmine\world\Position;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class SmallDripleaf extends Transparent{
|
class SmallDripleaf extends Transparent implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected bool $top = false;
|
protected bool $top = false;
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
final class StainedGlass extends Glass{
|
final class StainedGlass extends Glass implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
final class StainedGlassPane extends GlassPane{
|
final class StainedGlassPane extends GlassPane implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
final class StainedHardenedClay extends HardenedClay{
|
final class StainedHardenedClay extends HardenedClay implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
final class StainedHardenedGlass extends HardenedGlass{
|
final class StainedHardenedGlass extends HardenedGlass implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
final class StainedHardenedGlassPane extends HardenedGlassPane{
|
final class StainedHardenedGlassPane extends HardenedGlassPane implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\StairShape;
|
use pocketmine\block\utils\StairShape;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
@ -35,7 +36,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class Stair extends Transparent{
|
class Stair extends Transparent implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected bool $upsideDown = false;
|
protected bool $upsideDown = false;
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\inventory\StonecutterInventory;
|
use pocketmine\block\inventory\StonecutterInventory;
|
||||||
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
use pocketmine\block\utils\FacesOppositePlacingPlayerTrait;
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
@ -32,7 +33,7 @@ use pocketmine\math\Facing;
|
|||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
class Stonecutter extends Transparent{
|
class Stonecutter extends Transparent implements HorizontalFacing{
|
||||||
use FacesOppositePlacingPlayerTrait;
|
use FacesOppositePlacingPlayerTrait;
|
||||||
|
|
||||||
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
|
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\StaticSupportTrait;
|
use pocketmine\block\utils\StaticSupportTrait;
|
||||||
@ -34,7 +35,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use pocketmine\world\Position;
|
use pocketmine\world\Position;
|
||||||
|
|
||||||
class Sugarcane extends Flowable{
|
class Sugarcane extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait {
|
use StaticSupportTrait {
|
||||||
onNearbyBlockChange as onSupportBlockChange;
|
onNearbyBlockChange as onSupportBlockChange;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Ageable;
|
||||||
use pocketmine\block\utils\AgeableTrait;
|
use pocketmine\block\utils\AgeableTrait;
|
||||||
use pocketmine\block\utils\BlockEventHelper;
|
use pocketmine\block\utils\BlockEventHelper;
|
||||||
use pocketmine\block\utils\FortuneDropHelper;
|
use pocketmine\block\utils\FortuneDropHelper;
|
||||||
@ -39,7 +40,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\sound\SweetBerriesPickSound;
|
use pocketmine\world\sound\SweetBerriesPickSound;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class SweetBerryBush extends Flowable{
|
class SweetBerryBush extends Flowable implements Ageable{
|
||||||
use AgeableTrait;
|
use AgeableTrait;
|
||||||
use StaticSupportTrait;
|
use StaticSupportTrait;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
@ -34,7 +35,7 @@ use pocketmine\player\Player;
|
|||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use pocketmine\world\sound\DoorSound;
|
use pocketmine\world\sound\DoorSound;
|
||||||
|
|
||||||
class Trapdoor extends Transparent{
|
class Trapdoor extends Transparent implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected bool $open = false;
|
protected bool $open = false;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -32,7 +33,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
class TripwireHook extends Flowable{
|
class TripwireHook extends Flowable implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected bool $connected = false;
|
protected bool $connected = false;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Axis;
|
use pocketmine\math\Axis;
|
||||||
@ -31,7 +32,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class WallBanner extends BaseBanner{
|
final class WallBanner extends BaseBanner implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected function getSupportingFace() : int{
|
protected function getSupportingFace() : int{
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
@ -33,7 +34,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class WallCoralFan extends BaseCoral{
|
final class WallCoralFan extends BaseCoral implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected function describeBlockOnlyState(RuntimeDataDescriber $w) : void{
|
protected function describeBlockOnlyState(RuntimeDataDescriber $w) : void{
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\HorizontalFacing;
|
||||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Axis;
|
use pocketmine\math\Axis;
|
||||||
@ -31,7 +32,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
|
|
||||||
final class WallSign extends BaseSign{
|
final class WallSign extends BaseSign implements HorizontalFacing{
|
||||||
use HorizontalFacingTrait;
|
use HorizontalFacingTrait;
|
||||||
|
|
||||||
protected function getSupportingFace() : int{
|
protected function getSupportingFace() : int{
|
||||||
|
@ -23,13 +23,14 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitter;
|
||||||
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
||||||
use function ceil;
|
use function ceil;
|
||||||
use function count;
|
use function count;
|
||||||
use function max;
|
use function max;
|
||||||
use function min;
|
use function min;
|
||||||
|
|
||||||
class WeightedPressurePlate extends PressurePlate{
|
class WeightedPressurePlate extends PressurePlate implements AnalogRedstoneSignalEmitter{
|
||||||
use AnalogRedstoneSignalEmitterTrait;
|
use AnalogRedstoneSignalEmitterTrait;
|
||||||
|
|
||||||
private readonly float $signalStrengthFactor;
|
private readonly float $signalStrengthFactor;
|
||||||
|
@ -23,7 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\PillarRotation;
|
||||||
use pocketmine\block\utils\PillarRotationTrait;
|
use pocketmine\block\utils\PillarRotationTrait;
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
use pocketmine\item\Axe;
|
use pocketmine\item\Axe;
|
||||||
@ -32,7 +34,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\world\sound\ItemUseOnBlockSound;
|
use pocketmine\world\sound\ItemUseOnBlockSound;
|
||||||
|
|
||||||
class Wood extends Opaque{
|
class Wood extends Opaque implements PillarRotation, WoodMaterial{
|
||||||
use PillarRotationTrait;
|
use PillarRotationTrait;
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class WoodenButton extends Button{
|
class WoodenButton extends Button implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
protected function getActivationTime() : int{
|
protected function getActivationTime() : int{
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class WoodenDoor extends Door{
|
class WoodenDoor extends Door implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
public function getFuelTime() : int{
|
public function getFuelTime() : int{
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class WoodenFence extends Fence{
|
class WoodenFence extends Fence implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
public function getFuelTime() : int{
|
public function getFuelTime() : int{
|
||||||
|
@ -23,10 +23,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodType;
|
use pocketmine\block\utils\WoodType;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class WoodenPressurePlate extends SimplePressurePlate{
|
class WoodenPressurePlate extends SimplePressurePlate implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class WoodenSlab extends Slab{
|
class WoodenSlab extends Slab implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
public function getFuelTime() : int{
|
public function getFuelTime() : int{
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class WoodenStairs extends Stair{
|
class WoodenStairs extends Stair implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
public function getFuelTime() : int{
|
public function getFuelTime() : int{
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\WoodMaterial;
|
||||||
use pocketmine\block\utils\WoodTypeTrait;
|
use pocketmine\block\utils\WoodTypeTrait;
|
||||||
|
|
||||||
class WoodenTrapdoor extends Trapdoor{
|
class WoodenTrapdoor extends Trapdoor implements WoodMaterial{
|
||||||
use WoodTypeTrait;
|
use WoodTypeTrait;
|
||||||
|
|
||||||
public function getFuelTime() : int{
|
public function getFuelTime() : int{
|
||||||
|
@ -23,9 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\Colored;
|
||||||
use pocketmine\block\utils\ColoredTrait;
|
use pocketmine\block\utils\ColoredTrait;
|
||||||
|
|
||||||
class Wool extends Opaque{
|
class Wool extends Opaque implements Colored{
|
||||||
use ColoredTrait;
|
use ColoredTrait;
|
||||||
|
|
||||||
public function getFlameEncouragement() : int{
|
public function getFlameEncouragement() : int{
|
||||||
|
34
src/block/utils/Ageable.php
Normal file
34
src/block/utils/Ageable.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* @author PocketMine Team
|
||||||
|
* @link http://www.pocketmine.net/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace pocketmine\block\utils;
|
||||||
|
|
||||||
|
interface Ageable{
|
||||||
|
|
||||||
|
public function getAge() : int;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setAge(int $age) : self;
|
||||||
|
}
|
34
src/block/utils/AnalogRedstoneSignalEmitter.php
Normal file
34
src/block/utils/AnalogRedstoneSignalEmitter.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* @author PocketMine Team
|
||||||
|
* @link http://www.pocketmine.net/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace pocketmine\block\utils;
|
||||||
|
|
||||||
|
interface AnalogRedstoneSignalEmitter{
|
||||||
|
|
||||||
|
public function getOutputSignalStrength() : int;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setOutputSignalStrength(int $signalStrength) : self;
|
||||||
|
}
|
41
src/block/utils/AnyFacing.php
Normal file
41
src/block/utils/AnyFacing.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* @author PocketMine Team
|
||||||
|
* @link http://www.pocketmine.net/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace pocketmine\block\utils;
|
||||||
|
|
||||||
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
|
interface AnyFacing{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see Facing
|
||||||
|
*/
|
||||||
|
public function getFacing() : int;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*
|
||||||
|
* @see Facing
|
||||||
|
*/
|
||||||
|
public function setFacing(int $facing) : self;
|
||||||
|
}
|
34
src/block/utils/Colored.php
Normal file
34
src/block/utils/Colored.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* @author PocketMine Team
|
||||||
|
* @link http://www.pocketmine.net/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace pocketmine\block\utils;
|
||||||
|
|
||||||
|
interface Colored{
|
||||||
|
|
||||||
|
public function getColor() : DyeColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setColor(DyeColor $color) : self;
|
||||||
|
}
|
41
src/block/utils/CoralMaterial.php
Normal file
41
src/block/utils/CoralMaterial.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* @author PocketMine Team
|
||||||
|
* @link http://www.pocketmine.net/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace pocketmine\block\utils;
|
||||||
|
|
||||||
|
interface CoralMaterial{
|
||||||
|
|
||||||
|
public function getCoralType() : CoralType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setCoralType(CoralType $coralType) : self;
|
||||||
|
|
||||||
|
public function isDead() : bool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setDead(bool $dead) : self;
|
||||||
|
}
|
41
src/block/utils/HorizontalFacing.php
Normal file
41
src/block/utils/HorizontalFacing.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* ____ _ _ __ __ _ __ __ ____
|
||||||
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||||
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||||
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||||
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* @author PocketMine Team
|
||||||
|
* @link http://www.pocketmine.net/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace pocketmine\block\utils;
|
||||||
|
|
||||||
|
use pocketmine\math\Facing;
|
||||||
|
|
||||||
|
interface HorizontalFacing{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see Facing
|
||||||
|
*/
|
||||||
|
public function getFacing() : int;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*
|
||||||
|
* @see Facing
|
||||||
|
*/
|
||||||
|
public function setFacing(int $facing) : self;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user