Class BlockRef
java.lang.Object
nl.pim16aap2.lightkeeper.framework.BlockRef
LIVE address of a block in a world: it stores where, never what.
Every read re-queries the server; use state() for a frozen BlockStateSnapshot when
multiple properties must be read consistently.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the block currently matches a spec (partial matching: only the spec's named properties are compared).material()Gets the block's current material.pos()Gets this reference's position.state()Gets a frozen snapshot of the block's full current state.
-
Method Details
-
pos
Gets this reference's position.- Returns:
- The block position.
-
worldName
- Returns:
- This block address's world name, without querying the server.
-
material
Gets the block's current material.- Returns:
- The canonical namespaced material key.
-
state
Gets a frozen snapshot of the block's full current state.- Returns:
- The state snapshot.
-
is
Checks whether the block currently matches a spec (partial matching: only the spec's named properties are compared).- Parameters:
expected- The expected spec.- Returns:
truewhen the live block matches.
-