Skip to content

Lodestone 5.46.0 ​

class · pocketmine\block\Lodestone · source

Extends Opaque

Lodestone. Using a compass on it turns one compass into a lodestone compass pointing at it; using a lodestone compass on it re-links that compass. Breaking it unlinks every compass pointing at it.

Methods ​

getOrCreateTrackingHandle() ​

php
public function getOrCreateTrackingHandle() : ?int

Returns the tracking handle of this lodestone, registering it in the position tracking database if needed.

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

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