Class MapState

java.lang.Object
net.minecraft.world.PersistentState
net.minecraft.item.map.MapState

public class MapState extends PersistentState
Mappings:
Namespace Name
named net/minecraft/item/map/MapState
intermediary net/minecraft/class_22
official evq
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/item/map/MapState;LOGGER:Lorg/slf4j/Logger;
      intermediary field_25019 Lnet/minecraft/class_22;field_25019:Lorg/slf4j/Logger;
      official i Levq;i:Lorg/slf4j/Logger;
    • SIZE

      private static final int SIZE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SIZE Lnet/minecraft/item/map/MapState;SIZE:I
      intermediary field_31832 Lnet/minecraft/class_22;field_31832:I
      official j Levq;j:I
    • SIZE_HALF

      private static final int SIZE_HALF
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SIZE_HALF Lnet/minecraft/item/map/MapState;SIZE_HALF:I
      intermediary field_31833 Lnet/minecraft/class_22;field_31833:I
      official k Levq;k:I
    • MAX_SCALE

      public static final int MAX_SCALE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_SCALE Lnet/minecraft/item/map/MapState;MAX_SCALE:I
      intermediary field_31831 Lnet/minecraft/class_22;field_31831:I
      official a Levq;a:I
    • MAX_DECORATIONS

      public static final int MAX_DECORATIONS
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_DECORATIONS Lnet/minecraft/item/map/MapState;MAX_DECORATIONS:I
      intermediary field_33991 Lnet/minecraft/class_22;field_33991:I
      official b Levq;b:I
    • FRAME_PREFIX

      private static final String FRAME_PREFIX
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named FRAME_PREFIX Lnet/minecraft/item/map/MapState;FRAME_PREFIX:Ljava/lang/String;
      intermediary field_52316 Lnet/minecraft/class_22;field_52316:Ljava/lang/String;
      official l Levq;l:Ljava/lang/String;
    • centerX

      public final int centerX
      The scaled center coordinate of the map state on the X axis.

      Always 0 for the client.

      Mappings:
      Namespace Name Mixin selector
      named centerX Lnet/minecraft/item/map/MapState;centerX:I
      intermediary field_116 Lnet/minecraft/class_22;field_116:I
      official c Levq;c:I
    • centerZ

      public final int centerZ
      The scaled center coordinate of the map state on the Z axis.

      Always 0 for the client.

      Mappings:
      Namespace Name Mixin selector
      named centerZ Lnet/minecraft/item/map/MapState;centerZ:I
      intermediary field_115 Lnet/minecraft/class_22;field_115:I
      official d Levq;d:I
    • dimension

      public final RegistryKey<World> dimension
      Mappings:
      Namespace Name Mixin selector
      named dimension Lnet/minecraft/item/map/MapState;dimension:Lnet/minecraft/registry/RegistryKey;
      intermediary field_118 Lnet/minecraft/class_22;field_118:Lnet/minecraft/class_5321;
      official e Levq;e:Laly;
    • showDecorations

      private final boolean showDecorations
      Mappings:
      Namespace Name Mixin selector
      named showDecorations Lnet/minecraft/item/map/MapState;showDecorations:Z
      intermediary field_114 Lnet/minecraft/class_22;field_114:Z
      official m Levq;m:Z
    • unlimitedTracking

      private final boolean unlimitedTracking
      Mappings:
      Namespace Name Mixin selector
      named unlimitedTracking Lnet/minecraft/item/map/MapState;unlimitedTracking:Z
      intermediary field_113 Lnet/minecraft/class_22;field_113:Z
      official n Levq;n:Z
    • scale

      public final byte scale
      Mappings:
      Namespace Name Mixin selector
      named scale Lnet/minecraft/item/map/MapState;scale:B
      intermediary field_119 Lnet/minecraft/class_22;field_119:B
      official f Levq;f:B
    • colors

      public byte[] colors
      Mappings:
      Namespace Name Mixin selector
      named colors Lnet/minecraft/item/map/MapState;colors:[B
      intermediary field_122 Lnet/minecraft/class_22;field_122:[B
      official g Levq;g:[B
    • locked

      public final boolean locked
      Mappings:
      Namespace Name Mixin selector
      named locked Lnet/minecraft/item/map/MapState;locked:Z
      intermediary field_17403 Lnet/minecraft/class_22;field_17403:Z
      official h Levq;h:Z
    • updateTrackers

      private final List<MapState.PlayerUpdateTracker> updateTrackers
      Mappings:
      Namespace Name Mixin selector
      named updateTrackers Lnet/minecraft/item/map/MapState;updateTrackers:Ljava/util/List;
      intermediary field_112 Lnet/minecraft/class_22;field_112:Ljava/util/List;
      official o Levq;o:Ljava/util/List;
    • updateTrackersByPlayer

      private final Map<PlayerEntity,MapState.PlayerUpdateTracker> updateTrackersByPlayer
      Mappings:
      Namespace Name Mixin selector
      named updateTrackersByPlayer Lnet/minecraft/item/map/MapState;updateTrackersByPlayer:Ljava/util/Map;
      intermediary field_120 Lnet/minecraft/class_22;field_120:Ljava/util/Map;
      official p Levq;p:Ljava/util/Map;
    • banners

      private final Map<String,MapBannerMarker> banners
      The banner markers to track in world.

      Empty for the client.

      Mappings:
      Namespace Name Mixin selector
      named banners Lnet/minecraft/item/map/MapState;banners:Ljava/util/Map;
      intermediary field_123 Lnet/minecraft/class_22;field_123:Ljava/util/Map;
      official q Levq;q:Ljava/util/Map;
    • decorations

      final Map<String,MapDecoration> decorations
      Mappings:
      Namespace Name Mixin selector
      named decorations Lnet/minecraft/item/map/MapState;decorations:Ljava/util/Map;
      intermediary field_117 Lnet/minecraft/class_22;field_117:Ljava/util/Map;
      official r Levq;r:Ljava/util/Map;
    • frames

      private final Map<String,MapFrameMarker> frames
      Mappings:
      Namespace Name Mixin selector
      named frames Lnet/minecraft/item/map/MapState;frames:Ljava/util/Map;
      intermediary field_121 Lnet/minecraft/class_22;field_121:Ljava/util/Map;
      official s Levq;s:Ljava/util/Map;
    • decorationCount

      private int decorationCount
      Mappings:
      Namespace Name Mixin selector
      named decorationCount Lnet/minecraft/item/map/MapState;decorationCount:I
      intermediary field_33992 Lnet/minecraft/class_22;field_33992:I
      official t Levq;t:I
  • Constructor Details

    • MapState

      private MapState(int centerX, int centerZ, byte scale, boolean showDecorations, boolean unlimitedTracking, boolean locked, RegistryKey<World> dimension)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/map/MapState;<init>(IIBZZZLnet/minecraft/registry/RegistryKey;)V
      intermediary <init> Lnet/minecraft/class_22;<init>(IIBZZZLnet/minecraft/class_5321;)V
      official <init> Levq;<init>(IIBZZZLaly;)V
  • Method Details

    • getPersistentStateType

      public static PersistentState.Type<MapState> getPersistentStateType()
      Mappings:
      Namespace Name Mixin selector
      named getPersistentStateType Lnet/minecraft/item/map/MapState;getPersistentStateType()Lnet/minecraft/world/PersistentState$Type;
      intermediary method_52611 Lnet/minecraft/class_22;method_52611()Lnet/minecraft/class_18$class_8645;
      official a Levq;a()Levi$a;
    • of

      public static MapState of(double centerX, double centerZ, byte scale, boolean showDecorations, boolean unlimitedTracking, RegistryKey<World> dimension)
      Creates a new map state instance.
      Parameters:
      centerX - the absolute center X-coordinate
      centerZ - the absolute center Z-coordinate
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/item/map/MapState;of(DDBZZLnet/minecraft/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;
      intermediary method_32363 Lnet/minecraft/class_22;method_32363(DDBZZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;
      official a Levq;a(DDBZZLaly;)Levq;
    • of

      public static MapState of(byte scale, boolean locked, RegistryKey<World> dimension)
      Creates a new map state instance for the client.

      The client is not aware of the coordinates of the map state so its center coordinates will always be (0, 0).

      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/item/map/MapState;of(BZLnet/minecraft/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;
      intermediary method_32362 Lnet/minecraft/class_22;method_32362(BZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;
      official a Levq;a(BZLaly;)Levq;
    • fromNbt

      public static MapState fromNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries)
      Mappings:
      Namespace Name Mixin selector
      named fromNbt Lnet/minecraft/item/map/MapState;fromNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/item/map/MapState;
      intermediary method_32371 Lnet/minecraft/class_22;method_32371(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_22;
      official b Levq;b(Lux;Ljs$a;)Levq;
    • writeNbt

      public NbtCompound writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries)
      Specified by:
      writeNbt in class PersistentState
      Mappings:
      Namespace Name Mixin selector
      named writeNbt Lnet/minecraft/world/PersistentState;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_75 Lnet/minecraft/class_18;method_75(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      official a Levi;a(Lux;Ljs$a;)Lux;
    • copy

      public MapState copy()
      Mappings:
      Namespace Name Mixin selector
      named copy Lnet/minecraft/item/map/MapState;copy()Lnet/minecraft/item/map/MapState;
      intermediary method_32361 Lnet/minecraft/class_22;method_32361()Lnet/minecraft/class_22;
      official b Levq;b()Levq;
    • zoomOut

      public MapState zoomOut()
      Creates a new map state which is a zoomed out version of the current one.

      The scale of the new map state is currentScale + zoomOutScale and clamped between 0 and 4.

      The colors are not copied, neither are the decorations.

      Mappings:
      Namespace Name Mixin selector
      named zoomOut Lnet/minecraft/item/map/MapState;zoomOut()Lnet/minecraft/item/map/MapState;
      intermediary method_32364 Lnet/minecraft/class_22;method_32364()Lnet/minecraft/class_22;
      official e Levq;e()Levq;
    • getEqualPredicate

      private static Predicate<ItemStack> getEqualPredicate(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named getEqualPredicate Lnet/minecraft/item/map/MapState;getEqualPredicate(Lnet/minecraft/item/ItemStack;)Ljava/util/function/Predicate;
      intermediary method_55784 Lnet/minecraft/class_22;method_55784(Lnet/minecraft/class_1799;)Ljava/util/function/Predicate;
      official a Levq;a(Lcxo;)Ljava/util/function/Predicate;
    • update

      public void update(PlayerEntity player, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named update Lnet/minecraft/item/map/MapState;update(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V
      intermediary method_102 Lnet/minecraft/class_22;method_102(Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;)V
      official a Levq;a(Lcpw;Lcxo;)V
    • hasMapInvisibilityEquipment

      private static boolean hasMapInvisibilityEquipment(PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named hasMapInvisibilityEquipment Lnet/minecraft/item/map/MapState;hasMapInvisibilityEquipment(Lnet/minecraft/entity/player/PlayerEntity;)Z
      intermediary method_64505 Lnet/minecraft/class_22;method_64505(Lnet/minecraft/class_1657;)Z
      official b Levq;b(Lcpw;)Z
    • removeDecoration

      private void removeDecoration(String id)
      Mappings:
      Namespace Name Mixin selector
      named removeDecoration Lnet/minecraft/item/map/MapState;removeDecoration(Ljava/lang/String;)V
      intermediary method_32368 Lnet/minecraft/class_22;method_32368(Ljava/lang/String;)V
      official a Levq;a(Ljava/lang/String;)V
    • addDecorationsNbt

      public static void addDecorationsNbt(ItemStack stack, BlockPos pos, String id, RegistryEntry<MapDecorationType> decorationType)
      Mappings:
      Namespace Name Mixin selector
      named addDecorationsNbt Lnet/minecraft/item/map/MapState;addDecorationsNbt(Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/BlockPos;Ljava/lang/String;Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary method_110 Lnet/minecraft/class_22;method_110(Lnet/minecraft/class_1799;Lnet/minecraft/class_2338;Ljava/lang/String;Lnet/minecraft/class_6880;)V
      official a Levq;a(Lcxo;Ljh;Ljava/lang/String;Ljq;)V
    • addDecoration

      private void addDecoration(RegistryEntry<MapDecorationType> type, @Nullable @Nullable WorldAccess world, String key, double x, double z, double rotation, @Nullable @Nullable Text text)
      Mappings:
      Namespace Name Mixin selector
      named addDecoration Lnet/minecraft/item/map/MapState;addDecoration(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/world/WorldAccess;Ljava/lang/String;DDDLnet/minecraft/text/Text;)V
      intermediary method_107 Lnet/minecraft/class_22;method_107(Lnet/minecraft/class_6880;Lnet/minecraft/class_1936;Ljava/lang/String;DDDLnet/minecraft/class_2561;)V
      official a Levq;a(Ljq;Ldhi;Ljava/lang/String;DDDLxv;)V
    • getMarker

      @Nullable private @Nullable MapState.Marker getMarker(RegistryEntry<MapDecorationType> type, @Nullable @Nullable WorldAccess world, double rotation, float dx, float dz)
      Mappings:
      Namespace Name Mixin selector
      named getMarker Lnet/minecraft/item/map/MapState;getMarker(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/world/WorldAccess;DFF)Lnet/minecraft/item/map/MapState$Marker;
      intermediary method_61870 Lnet/minecraft/class_22;method_61870(Lnet/minecraft/class_6880;Lnet/minecraft/class_1936;DFF)Lnet/minecraft/class_22$class_9907;
      official a Levq;a(Ljq;Ldhi;DFF)Levq$b;
    • getPlayerMarkerAndRotation

      @Nullable private @Nullable com.mojang.datafixers.util.Pair<RegistryEntry<MapDecorationType>,Byte> getPlayerMarkerAndRotation(RegistryEntry<MapDecorationType> type, @Nullable @Nullable WorldAccess world, double rotation, float dx, float dz)
      Mappings:
      Namespace Name Mixin selector
      named getPlayerMarkerAndRotation Lnet/minecraft/item/map/MapState;getPlayerMarkerAndRotation(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/world/WorldAccess;DFF)Lcom/mojang/datafixers/util/Pair;
      intermediary method_61872 Lnet/minecraft/class_22;method_61872(Lnet/minecraft/class_6880;Lnet/minecraft/class_1936;DFF)Lcom/mojang/datafixers/util/Pair;
      official b Levq;b(Ljq;Ldhi;DFF)Lcom/mojang/datafixers/util/Pair;
    • getPlayerMarkerRotation

      private byte getPlayerMarkerRotation(@Nullable @Nullable WorldAccess world, double rotation)
      Mappings:
      Namespace Name Mixin selector
      named getPlayerMarkerRotation Lnet/minecraft/item/map/MapState;getPlayerMarkerRotation(Lnet/minecraft/world/WorldAccess;D)B
      intermediary method_61869 Lnet/minecraft/class_22;method_61869(Lnet/minecraft/class_1936;D)B
      official a Levq;a(Ldhi;D)B
    • isInBounds

      private static boolean isInBounds(float dx, float dz)
      Mappings:
      Namespace Name Mixin selector
      named isInBounds Lnet/minecraft/item/map/MapState;isInBounds(FF)Z
      intermediary method_61868 Lnet/minecraft/class_22;method_61868(FF)Z
      official a Levq;a(FF)Z
    • getPlayerMarker

      @Nullable private @Nullable RegistryEntry<MapDecorationType> getPlayerMarker(float dx, float dz)
      Mappings:
      Namespace Name Mixin selector
      named getPlayerMarker Lnet/minecraft/item/map/MapState;getPlayerMarker(FF)Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_61871 Lnet/minecraft/class_22;method_61871(FF)Lnet/minecraft/class_6880;
      official b Levq;b(FF)Ljq;
    • offsetToMarkerPosition

      private static byte offsetToMarkerPosition(float d)
      Mappings:
      Namespace Name Mixin selector
      named offsetToMarkerPosition Lnet/minecraft/item/map/MapState;offsetToMarkerPosition(F)B
      intermediary method_61867 Lnet/minecraft/class_22;method_61867(F)B
      official a Levq;a(F)B
    • getPlayerMarkerPacket

      @Nullable public @Nullable Packet<?> getPlayerMarkerPacket(MapIdComponent mapId, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named getPlayerMarkerPacket Lnet/minecraft/item/map/MapState;getPlayerMarkerPacket(Lnet/minecraft/component/type/MapIdComponent;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/network/packet/Packet;
      intermediary method_100 Lnet/minecraft/class_22;method_100(Lnet/minecraft/class_9209;Lnet/minecraft/class_1657;)Lnet/minecraft/class_2596;
      official a Levq;a(Levo;Lcpw;)Laac;
    • markDirty

      private void markDirty(int x, int z)
      Mappings:
      Namespace Name Mixin selector
      named markDirty Lnet/minecraft/item/map/MapState;markDirty(II)V
      intermediary method_103 Lnet/minecraft/class_22;method_103(II)V
      official a Levq;a(II)V
    • markDecorationsDirty

      private void markDecorationsDirty()
      Mappings:
      Namespace Name Mixin selector
      named markDecorationsDirty Lnet/minecraft/item/map/MapState;markDecorationsDirty()V
      intermediary method_32374 Lnet/minecraft/class_22;method_32374()V
      official i Levq;i()V
    • getPlayerSyncData

      public MapState.PlayerUpdateTracker getPlayerSyncData(PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named getPlayerSyncData Lnet/minecraft/item/map/MapState;getPlayerSyncData(Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/map/MapState$PlayerUpdateTracker;
      intermediary method_101 Lnet/minecraft/class_22;method_101(Lnet/minecraft/class_1657;)Lnet/minecraft/class_22$class_23;
      official a Levq;a(Lcpw;)Levq$a;
    • addBanner

      public boolean addBanner(WorldAccess world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named addBanner Lnet/minecraft/item/map/MapState;addBanner(Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;)Z
      intermediary method_108 Lnet/minecraft/class_22;method_108(Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;)Z
      official a Levq;a(Ldhi;Ljh;)Z
    • removeBanner

      public void removeBanner(BlockView world, int x, int z)
      Mappings:
      Namespace Name Mixin selector
      named removeBanner Lnet/minecraft/item/map/MapState;removeBanner(Lnet/minecraft/world/BlockView;II)V
      intermediary method_109 Lnet/minecraft/class_22;method_109(Lnet/minecraft/class_1922;II)V
      official a Levq;a(Ldgm;II)V
    • getBanners

      public Collection<MapBannerMarker> getBanners()
      Mappings:
      Namespace Name Mixin selector
      named getBanners Lnet/minecraft/item/map/MapState;getBanners()Ljava/util/Collection;
      intermediary method_35503 Lnet/minecraft/class_22;method_35503()Ljava/util/Collection;
      official f Levq;f()Ljava/util/Collection;
    • removeFrame

      public void removeFrame(BlockPos pos, int id)
      Mappings:
      Namespace Name Mixin selector
      named removeFrame Lnet/minecraft/item/map/MapState;removeFrame(Lnet/minecraft/util/math/BlockPos;I)V
      intermediary method_104 Lnet/minecraft/class_22;method_104(Lnet/minecraft/class_2338;I)V
      official a Levq;a(Ljh;I)V
    • putColor

      public boolean putColor(int x, int z, byte color)
      Sets the color at the specified coordinates if the current color is different.
      Returns:
      true if the color has been updated, else false
      Mappings:
      Namespace Name Mixin selector
      named putColor Lnet/minecraft/item/map/MapState;putColor(IIB)Z
      intermediary method_32365 Lnet/minecraft/class_22;method_32365(IIB)Z
      official a Levq;a(IIB)Z
    • setColor

      public void setColor(int x, int z, byte color)
      Mappings:
      Namespace Name Mixin selector
      named setColor Lnet/minecraft/item/map/MapState;setColor(IIB)V
      intermediary method_32370 Lnet/minecraft/class_22;method_32370(IIB)V
      official b Levq;b(IIB)V
    • hasExplorationMapDecoration

      public boolean hasExplorationMapDecoration()
      Mappings:
      Namespace Name Mixin selector
      named hasExplorationMapDecoration Lnet/minecraft/item/map/MapState;hasExplorationMapDecoration()Z
      intermediary method_32372 Lnet/minecraft/class_22;method_32372()Z
      official g Levq;g()Z
    • replaceDecorations

      public void replaceDecorations(List<MapDecoration> decorations)
      Mappings:
      Namespace Name Mixin selector
      named replaceDecorations Lnet/minecraft/item/map/MapState;replaceDecorations(Ljava/util/List;)V
      intermediary method_32369 Lnet/minecraft/class_22;method_32369(Ljava/util/List;)V
      official a Levq;a(Ljava/util/List;)V
    • getDecorations

      public Iterable<MapDecoration> getDecorations()
      Mappings:
      Namespace Name Mixin selector
      named getDecorations Lnet/minecraft/item/map/MapState;getDecorations()Ljava/lang/Iterable;
      intermediary method_32373 Lnet/minecraft/class_22;method_32373()Ljava/lang/Iterable;
      official h Levq;h()Ljava/lang/Iterable;
    • decorationCountNotLessThan

      public boolean decorationCountNotLessThan(int decorationCount)
      Mappings:
      Namespace Name Mixin selector
      named decorationCountNotLessThan Lnet/minecraft/item/map/MapState;decorationCountNotLessThan(I)Z
      intermediary method_37343 Lnet/minecraft/class_22;method_37343(I)Z
      official a Levq;a(I)Z
    • getFrameDecorationKey

      private static String getFrameDecorationKey(int id)
      Mappings:
      Namespace Name Mixin selector
      named getFrameDecorationKey Lnet/minecraft/item/map/MapState;getFrameDecorationKey(I)Ljava/lang/String;
      intermediary method_61169 Lnet/minecraft/class_22;method_61169(I)Ljava/lang/String;
      official b Levq;b(I)Ljava/lang/String;