Class ColonyBorderMapping

java.lang.Object
com.minecolonies.core.compatibility.journeymap.v6.ColonyBorderMapping

public class ColonyBorderMapping extends Object
Utility class to manage colony border mapping.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Report the colony that the current player is in, if any.
    static void
    load(@NotNull Journeymap jmap, @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
    Loads cached colony data, if any.
    static void
    unload(@NotNull Journeymap jmap, @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
    Stops tracking data for a dimension and clears any related overlays.
    static void
    updateChunk(@NotNull Journeymap jmap, @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, @NotNull net.minecraft.world.level.chunk.LevelChunk chunk)
    Flags the colony border overlay for update, if needed for a single just-loaded chunk.
    static void
    updateChunksAroundPlayer(@NotNull Journeymap jmap, @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
    Flags the colony border overlay for update, if needed for all chunks near the player.
    static void
    updatePending(@NotNull Journeymap jmap, @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
    Check if any colony border overlays need to be updated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getCurrentColony

      public static String getCurrentColony()
      Report the colony that the current player is in, if any.
      Returns:
      The colony name, or an empty string.
    • load

      public static void load(@NotNull @NotNull Journeymap jmap, @NotNull @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
      Loads cached colony data, if any. Also starts tracking data for a dimension.
    • unload

      public static void unload(@NotNull @NotNull Journeymap jmap, @NotNull @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
      Stops tracking data for a dimension and clears any related overlays.
    • updateChunksAroundPlayer

      public static void updateChunksAroundPlayer(@NotNull @NotNull Journeymap jmap, @NotNull @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
      Flags the colony border overlay for update, if needed for all chunks near the player.
      Parameters:
      jmap - The JourneyMap API
      dimension - The dimension of the world. Nothing happens unless this is the client world.
    • updateChunk

      public static void updateChunk(@NotNull @NotNull Journeymap jmap, @NotNull @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, @NotNull @NotNull net.minecraft.world.level.chunk.LevelChunk chunk)
      Flags the colony border overlay for update, if needed for a single just-loaded chunk.
      Parameters:
      jmap - The JourneyMap API
      dimension - The dimension of the world. Nothing happens unless this is the client world.
      chunk - The chunk that was just loaded.
    • updatePending

      public static void updatePending(@NotNull @NotNull Journeymap jmap, @NotNull @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
      Check if any colony border overlays need to be updated.
      Parameters:
      jmap - The Journeymap API
      dimension - The dimension to check