Skip to content

LodestoneTrackerHelper ​

com.jsmacrosce.jsmacros.client.api.helper.inventory.LodestoneTrackerHelper

Since2.3.0

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 ​

getTargetDimension(): String#
Returns: the target's dimension ID, such as "minecraft:the_nether", or null if it has no target

getTargetPos ​

getTargetPos(): BlockPosHelper#
Returns: the target's block position, or null if it has no target

isTracked ​

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