Lodestone 5.46.0
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() : ?intReturns 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 = []) : boolonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool