Class MapItemSavedData

java.lang.Object
net.minecraft.world.level.saveddata.SavedData
net.minecraft.world.level.saveddata.maps.MapItemSavedData

public class MapItemSavedData extends SavedData
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • MAP_SIZE

      private static final int MAP_SIZE
      See Also:
    • HALF_MAP_SIZE

      private static final int HALF_MAP_SIZE
      See Also:
    • MAX_SCALE

      public static final int MAX_SCALE
      See Also:
    • TRACKED_DECORATION_LIMIT

      public static final int TRACKED_DECORATION_LIMIT
      See Also:
    • centerX

      public final int centerX
    • centerZ

      public final int centerZ
    • dimension

      public final ResourceKey<Level> dimension
    • trackingPosition

      private final boolean trackingPosition
    • unlimitedTracking

      private final boolean unlimitedTracking
    • scale

      public final byte scale
    • colors

      public byte[] colors
    • locked

      public final boolean locked
    • carriedBy

      private final List<MapItemSavedData.HoldingPlayer> carriedBy
    • carriedByPlayers

      private final Map<Player,MapItemSavedData.HoldingPlayer> carriedByPlayers
    • bannerMarkers

      private final Map<String,MapBanner> bannerMarkers
    • decorations

      final Map<String,MapDecoration> decorations
    • frameMarkers

      private final Map<String,MapFrame> frameMarkers
    • trackedDecorationCount

      private int trackedDecorationCount
  • Constructor Details

    • MapItemSavedData

      private MapItemSavedData(int p_164768_, int p_164769_, byte p_164770_, boolean p_164771_, boolean p_164772_, boolean p_164773_, ResourceKey<Level> p_164774_)
  • Method Details

    • factory

      public static SavedData.Factory<MapItemSavedData> factory()
    • createFresh

      public static MapItemSavedData createFresh(double p_164781_, double p_164782_, byte p_164783_, boolean p_164784_, boolean p_164785_, ResourceKey<Level> p_164786_)
    • createForClient

      public static MapItemSavedData createForClient(byte p_164777_, boolean p_164778_, ResourceKey<Level> p_164779_)
    • load

      public static MapItemSavedData load(CompoundTag p_164808_)
    • save

      public CompoundTag save(CompoundTag p_77956_)
      Specified by:
      save in class SavedData
    • locked

      public MapItemSavedData locked()
    • scaled

      public MapItemSavedData scaled(int p_164788_)
    • tickCarriedBy

      public void tickCarriedBy(Player p_77919_, ItemStack p_77920_)
    • removeDecoration

      private void removeDecoration(String p_164800_)
    • addTargetDecoration

      public static void addTargetDecoration(ItemStack p_77926_, BlockPos p_77927_, String p_77928_, MapDecoration.Type p_77929_)
    • addDecoration

      private void addDecoration(MapDecoration.Type p_77938_, @Nullable LevelAccessor p_77939_, String p_77940_, double p_77941_, double p_77942_, double p_77943_, @Nullable Component p_77944_)
    • getUpdatePacket

      @Nullable public Packet<?> getUpdatePacket(int p_164797_, Player p_164798_)
    • setColorsDirty

      private void setColorsDirty(int p_164790_, int p_164791_)
    • setDecorationsDirty

      private void setDecorationsDirty()
    • getHoldingPlayer

      public MapItemSavedData.HoldingPlayer getHoldingPlayer(Player p_77917_)
    • toggleBanner

      public boolean toggleBanner(LevelAccessor p_77935_, BlockPos p_77936_)
    • checkBanners

      public void checkBanners(BlockGetter p_77931_, int p_77932_, int p_77933_)
    • getBanners

      public Collection<MapBanner> getBanners()
    • removedFromFrame

      public void removedFromFrame(BlockPos p_77948_, int p_77949_)
    • updateColor

      public boolean updateColor(int p_164793_, int p_164794_, byte p_164795_)
    • setColor

      public void setColor(int p_164804_, int p_164805_, byte p_164806_)
    • isExplorationMap

      public boolean isExplorationMap()
    • addClientSideDecorations

      public void addClientSideDecorations(List<MapDecoration> p_164802_)
    • getDecorations

      public Iterable<MapDecoration> getDecorations()
    • isTrackedCountOverLimit

      public boolean isTrackedCountOverLimit(int p_181313_)