Class PlacedMetaSupport
java.lang.Object
dev.rono.igniscore.api.util.PlacedMetaSupport
Process-wide ephemeral metadata keyed by placed block location.
Unlike persistent NBT,
values here live only in memory and are cleared when the block is removed. Use for placement
yaw, waypoint labels, tripwire pairs, or other short-lived state that does not need to survive
restarts.
Keys are derived from world id or name plus floored block coordinates via
Locations.toBlock(IgnisLocation).
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear(IgnisLocation location) Removes all ephemeral metadata for the block atlocation.static StringgetString(IgnisLocation location) Returns the string metadata atlocation, ornullwhen unset.static voidlinkTripwire(IgnisLocation first, IgnisLocation second) Links two tripwire charge locations as paired triggers.static floatplacementYaw(IgnisLocation location, float defaultYaw) Returns the recorded placement yaw, ordefaultYawwhen none was stored.static voidrecordPlacementYaw(IgnisLocation location, float yaw) Records the yaw used when a custom block was placed atlocation.static voidsetString(IgnisLocation location, String value) Stores a string label or tag for the block atlocation.static IgnisLocationtripwirePartner(IgnisLocation location) Returns the paired tripwire location, ornullwhen none is linked.
-
Method Details
-
recordPlacementYaw
Records the yaw used when a custom block was placed atlocation.- Parameters:
location- placed block positionyaw- placement yaw in degrees
-
placementYaw
Returns the recorded placement yaw, ordefaultYawwhen none was stored.- Parameters:
location- block position to querydefaultYaw- value used when no placement yaw was recorded- Returns:
- stored yaw or the default
-
setString
Stores a string label or tag for the block atlocation.- Parameters:
location- block positionvalue- metadata string (for example a waypoint name)
-
getString
Returns the string metadata atlocation, ornullwhen unset.- Parameters:
location- block position to query- Returns:
- stored string or
null
-
linkTripwire
Links two tripwire charge locations as paired triggers. -
tripwirePartner
Returns the paired tripwire location, ornullwhen none is linked. -
clear
Removes all ephemeral metadata for the block atlocation.- Parameters:
location- block position to clear
-