LodestoneTrackerHelper
com.jsmacrosce.jsmacros.client.api.helper.inventory.LodestoneTrackerHelper
Reads the stored lodestone target and whether Minecraft checks that it is still valid.
js
const tracker = Player.getPlayer()?.getMainHand().getComponents().getLodestoneTracker();
if (tracker != null) {
const pos = tracker.getTargetPos();
if (pos !== null) Chat.log(`${tracker.getTargetDimension()}: ${pos.getX()}, ${pos.getY()}, ${pos.getZ()}`);
}Methods
getTargetDimension
getTargetPos
getTargetPos(): BlockPosHelper#Returns: the target's block position, or
null if it has no targetisTracked
isTracked(): boolean#Reports whether Minecraft is configured to check the target in its dimension and clear it if it is no longer a valid lodestone. The flag can remain set after the target is cleared.
Returns: whether target validation is enabled