mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 06:09:57 +00:00
Fixed BB and right-click action for daylight sensor
This commit is contained in:
parent
a77e05f875
commit
a195e940db
@ -23,6 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\item\Item;
|
||||||
|
use pocketmine\math\AxisAlignedBB;
|
||||||
|
use pocketmine\Player;
|
||||||
|
|
||||||
class DaylightSensor extends Transparent{
|
class DaylightSensor extends Transparent{
|
||||||
|
|
||||||
protected $itemId = self::DAYLIGHT_SENSOR;
|
protected $itemId = self::DAYLIGHT_SENSOR;
|
||||||
@ -77,5 +81,15 @@ class DaylightSensor extends Transparent{
|
|||||||
return BlockToolType::TYPE_AXE;
|
return BlockToolType::TYPE_AXE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
||||||
|
return new AxisAlignedBB(0, 0, 0, 1, 0.5, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onActivate(Item $item, Player $player = null) : bool{
|
||||||
|
$this->inverted = !$this->inverted;
|
||||||
|
$this->level->setBlock($this, $this);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user