Make more use of PoweredByRedstoneTrait

This commit is contained in:
Dylan K. Taylor
2021-02-06 18:43:33 +00:00
parent 48ef8771cd
commit 5be03c3196
4 changed files with 8 additions and 30 deletions

View File

@ -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[]
*/