Class PlacedMetaSupport

java.lang.Object
dev.rono.igniscore.api.util.PlacedMetaSupport

public final class PlacedMetaSupport extends Object
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 Details

    • recordPlacementYaw

      public static void recordPlacementYaw(IgnisLocation location, float yaw)
      Records the yaw used when a custom block was placed at location.
      Parameters:
      location - placed block position
      yaw - placement yaw in degrees
    • placementYaw

      public static float placementYaw(IgnisLocation location, float defaultYaw)
      Returns the recorded placement yaw, or defaultYaw when none was stored.
      Parameters:
      location - block position to query
      defaultYaw - value used when no placement yaw was recorded
      Returns:
      stored yaw or the default
    • setString

      public static void setString(IgnisLocation location, String value)
      Stores a string label or tag for the block at location.
      Parameters:
      location - block position
      value - metadata string (for example a waypoint name)
    • getString

      public static String getString(IgnisLocation location)
      Returns the string metadata at location, or null when unset.
      Parameters:
      location - block position to query
      Returns:
      stored string or null
    • linkTripwire

      public static void linkTripwire(IgnisLocation first, IgnisLocation second)
      Links two tripwire charge locations as paired triggers.
    • tripwirePartner

      public static IgnisLocation tripwirePartner(IgnisLocation location)
      Returns the paired tripwire location, or null when none is linked.
    • clear

      public static void clear(IgnisLocation location)
      Removes all ephemeral metadata for the block at location.
      Parameters:
      location - block position to clear