mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Make more use of PoweredByRedstoneTrait
This commit is contained in:
@ -27,6 +27,7 @@ use pocketmine\block\tile\Comparator;
|
||||
use pocketmine\block\utils\AnalogRedstoneSignalEmitterTrait;
|
||||
use pocketmine\block\utils\BlockDataSerializer;
|
||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Facing;
|
||||
@ -38,14 +39,13 @@ use function assert;
|
||||
class RedstoneComparator extends Flowable{
|
||||
use HorizontalFacingTrait;
|
||||
use AnalogRedstoneSignalEmitterTrait;
|
||||
use PoweredByRedstoneTrait;
|
||||
|
||||
/** @var BlockIdentifierFlattened */
|
||||
protected $idInfo;
|
||||
|
||||
/** @var bool */
|
||||
protected $isSubtractMode = false;
|
||||
/** @var bool */
|
||||
protected $powered = false;
|
||||
|
||||
public function __construct(BlockIdentifierFlattened $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){
|
||||
parent::__construct($idInfo, $name, $breakInfo ?? BlockBreakInfo::instant());
|
||||
@ -96,16 +96,6 @@ class RedstoneComparator extends Flowable{
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isPowered() : bool{
|
||||
return $this->powered;
|
||||
}
|
||||
|
||||
/** @return $this */
|
||||
public function setPowered(bool $powered) : self{
|
||||
$this->powered = $powered;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return AxisAlignedBB[]
|
||||
*/
|
||||
|
Reference in New Issue
Block a user