Skip to content

Beehive 5.46.0 ​

class · pocketmine\block\Beehive · source

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 = 20

MAX_HONEY_LEVEL ​

php
public const MAX_HONEY_LEVEL = 5

TICKS_WITHOUT_NECTAR ​

php
public const TICKS_WITHOUT_NECTAR = 600

TICKS_WITH_NECTAR ​

php
public const TICKS_WITH_NECTAR = 2400

Methods ​

addBee() ​

php
public function addBee(\pocketmine\entity\animal\Bee $bee) : bool

Takes 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) : void

getFlameEncouragement() ​

php
public function getFlameEncouragement() : int

getFlammability() ​

php
public function getFlammability() : int

getHoneyLevel() ​

php
public function getHoneyLevel() : int

onBreak() ​

php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onInteract() ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onScheduledUpdate() ​

php
public function onScheduledUpdate() : void

place() ​

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) : bool

setHoneyLevel() ​

php
public function setHoneyLevel(int $honeyLevel) : self

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.