mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Make more use of PoweredByRedstoneTrait
This commit is contained in:
@ -26,6 +26,7 @@ namespace pocketmine\block;
|
||||
use pocketmine\block\tile\Hopper as TileHopper;
|
||||
use pocketmine\block\utils\BlockDataSerializer;
|
||||
use pocketmine\block\utils\InvalidBlockStateException;
|
||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Facing;
|
||||
@ -34,11 +35,10 @@ use pocketmine\player\Player;
|
||||
use pocketmine\world\BlockTransaction;
|
||||
|
||||
class Hopper extends Transparent{
|
||||
use PoweredByRedstoneTrait;
|
||||
|
||||
/** @var int */
|
||||
private $facing = Facing::DOWN;
|
||||
/** @var bool */
|
||||
private $powered = false;
|
||||
|
||||
public function readStateFromData(int $id, int $stateMeta) : void{
|
||||
$facing = BlockDataSerializer::readFacing($stateMeta & 0x07);
|
||||
|
Reference in New Issue
Block a user