Beehive 5.46.0
Extends Opaque
Implements HorizontalFacing
Beehive (and, through BeeNest, the bee nest). Full hives (honey level 5) give 3 honeycombs when sheared and a honey bottle when a glass bottle is used on them, resetting the honey level.
Bees enter the hive (Beehive::addBee()) to spend 2 minutes inside (30 seconds without nectar) and leave by the front; each bee coming back with nectar raises the honey level by one. Breaking the hive releases its bees, angry at the player unless the tool has Silk Touch. Harvesting honey doesn't anger bees yet.
Constants
BEE_UPDATE_INTERVAL
php
public const BEE_UPDATE_INTERVAL = 20MAX_HONEY_LEVEL
php
public const MAX_HONEY_LEVEL = 5TICKS_WITHOUT_NECTAR
php
public const TICKS_WITHOUT_NECTAR = 600TICKS_WITH_NECTAR
php
public const TICKS_WITH_NECTAR = 2400Methods
addBee()
php
public function addBee(\pocketmine\entity\animal\Bee $bee) : boolTakes the bee into the hive (it's removed from the world). Returns false if the hive is full.
describeBlockOnlyState() protected
php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : voidgetFlameEncouragement()
php
public function getFlameEncouragement() : intgetFlammability()
php
public function getFlammability() : intgetHoneyLevel()
php
public function getHoneyLevel() : intonBreak()
php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonScheduledUpdate()
php
public function onScheduledUpdate() : voidplace()
php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : boolsetHoneyLevel()
php
public function setHoneyLevel(int $honeyLevel) : self