Package net.minecraft.item.map
Class MapState
java.lang.Object
net.minecraft.world.PersistentState
net.minecraft.item.map.MapState
- Mappings:
Namespace Name intermediary net/minecraft/class_22official dylnamed net/minecraft/item/map/MapState
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,MapBannerMarker> The banner markers to track in world.final intThe scaled center coordinate of the map state on the X axis.final intThe scaled center coordinate of the map state on the Z axis.byte[]final RegistryKey<World>private static final intprivate static final intprivate final Map<String,MapFrameMarker> private intfinal booleanprivate static final Loggerstatic final intstatic final intfinal byteprivate final booleanprivate final booleanprivate final List<MapState.PlayerUpdateTracker>private final Map<PlayerEntity,MapState.PlayerUpdateTracker> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMapState(int centerX, int centerZ, byte scale, boolean showIcons, boolean unlimitedTracking, boolean locked, RegistryKey<World> dimension) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBanner(WorldAccess world, BlockPos pos) static voidaddDecorationsNbt(ItemStack stack, BlockPos pos, String id, MapIcon.Type type) private voidaddIcon(MapIcon.Type type, @Nullable WorldAccess world, String key, double x, double z, double rotation, @Nullable Text text) copy()static MapStatefromNbt(NbtCompound nbt) getIcons()getPlayerMarkerPacket(int id, PlayerEntity player) getPlayerSyncData(PlayerEntity player) booleanbooleaniconCountNotLessThan(int iconCount) private voidmarkDirty(int x, int z) private voidstatic MapStateof(byte scale, boolean locked, RegistryKey<World> dimension) Creates a new map state instance for the client.static MapStateof(double centerX, double centerZ, byte scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension) Creates a new map state instance.booleanputColor(int x, int z, byte color) Sets the color at the specified coordinates if the current color is different.voidremoveBanner(BlockView world, int x, int z) voidremoveFrame(BlockPos pos, int id) private voidremoveIcon(String id) voidreplaceIcons(List<MapIcon> icons) voidsetColor(int x, int z, byte color) voidupdate(PlayerEntity player, ItemStack stack) writeNbt(NbtCompound nbt) zoomOut(int zoomOutScale) Creates a new map state which is a zoomed out version of the current one.Methods inherited from class net.minecraft.world.PersistentState
isDirty, markDirty, save, setDirty
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector intermediary field_25019Lnet/minecraft/class_22;field_25019:Lorg/slf4j/Logger;official iLdyl;i:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/item/map/MapState;LOGGER:Lorg/slf4j/Logger;
-
field_31832
private static final int field_31832- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31832Lnet/minecraft/class_22;field_31832:Iofficial jLdyl;j:Inamed field_31832Lnet/minecraft/item/map/MapState;field_31832:I
-
field_31833
private static final int field_31833- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31833Lnet/minecraft/class_22;field_31833:Iofficial kLdyl;k:Inamed field_31833Lnet/minecraft/item/map/MapState;field_31833:I
-
MAX_SCALE
public static final int MAX_SCALE- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31831Lnet/minecraft/class_22;field_31831:Iofficial aLdyl;a:Inamed MAX_SCALELnet/minecraft/item/map/MapState;MAX_SCALE:I
-
MAX_ICONS
public static final int MAX_ICONS- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_33991Lnet/minecraft/class_22;field_33991:Iofficial bLdyl;b:Inamed MAX_ICONSLnet/minecraft/item/map/MapState;MAX_ICONS:I
-
centerX
public final int centerXThe scaled center coordinate of the map state on the X axis.Always
0for the client.- Mappings:
Namespace Name Mixin selector intermediary field_116Lnet/minecraft/class_22;field_116:Iofficial cLdyl;c:Inamed centerXLnet/minecraft/item/map/MapState;centerX:I
-
centerZ
public final int centerZThe scaled center coordinate of the map state on the Z axis.Always
0for the client.- Mappings:
Namespace Name Mixin selector intermediary field_115Lnet/minecraft/class_22;field_115:Iofficial dLdyl;d:Inamed centerZLnet/minecraft/item/map/MapState;centerZ:I
-
dimension
- Mappings:
Namespace Name Mixin selector intermediary field_118Lnet/minecraft/class_22;field_118:Lnet/minecraft/class_5321;official eLdyl;e:Lacp;named dimensionLnet/minecraft/item/map/MapState;dimension:Lnet/minecraft/registry/RegistryKey;
-
showIcons
private final boolean showIcons- Mappings:
Namespace Name Mixin selector intermediary field_114Lnet/minecraft/class_22;field_114:Zofficial lLdyl;l:Znamed showIconsLnet/minecraft/item/map/MapState;showIcons:Z
-
unlimitedTracking
private final boolean unlimitedTracking- Mappings:
Namespace Name Mixin selector intermediary field_113Lnet/minecraft/class_22;field_113:Zofficial mLdyl;m:Znamed unlimitedTrackingLnet/minecraft/item/map/MapState;unlimitedTracking:Z
-
scale
public final byte scale- Mappings:
Namespace Name Mixin selector intermediary field_119Lnet/minecraft/class_22;field_119:Bofficial fLdyl;f:Bnamed scaleLnet/minecraft/item/map/MapState;scale:B
-
colors
public byte[] colors- Mappings:
Namespace Name Mixin selector intermediary field_122Lnet/minecraft/class_22;field_122:[Bofficial gLdyl;g:[Bnamed colorsLnet/minecraft/item/map/MapState;colors:[B
-
locked
public final boolean locked- Mappings:
Namespace Name Mixin selector intermediary field_17403Lnet/minecraft/class_22;field_17403:Zofficial hLdyl;h:Znamed lockedLnet/minecraft/item/map/MapState;locked:Z
-
updateTrackers
- Mappings:
Namespace Name Mixin selector intermediary field_112Lnet/minecraft/class_22;field_112:Ljava/util/List;official nLdyl;n:Ljava/util/List;named updateTrackersLnet/minecraft/item/map/MapState;updateTrackers:Ljava/util/List;
-
updateTrackersByPlayer
- Mappings:
Namespace Name Mixin selector intermediary field_120Lnet/minecraft/class_22;field_120:Ljava/util/Map;official oLdyl;o:Ljava/util/Map;named updateTrackersByPlayerLnet/minecraft/item/map/MapState;updateTrackersByPlayer:Ljava/util/Map;
-
banners
The banner markers to track in world.Empty for the client.
- Mappings:
Namespace Name Mixin selector intermediary field_123Lnet/minecraft/class_22;field_123:Ljava/util/Map;official pLdyl;p:Ljava/util/Map;named bannersLnet/minecraft/item/map/MapState;banners:Ljava/util/Map;
-
icons
- Mappings:
Namespace Name Mixin selector intermediary field_117Lnet/minecraft/class_22;field_117:Ljava/util/Map;official qLdyl;q:Ljava/util/Map;named iconsLnet/minecraft/item/map/MapState;icons:Ljava/util/Map;
-
frames
- Mappings:
Namespace Name Mixin selector intermediary field_121Lnet/minecraft/class_22;field_121:Ljava/util/Map;official rLdyl;r:Ljava/util/Map;named framesLnet/minecraft/item/map/MapState;frames:Ljava/util/Map;
-
iconCount
private int iconCount- Mappings:
Namespace Name Mixin selector intermediary field_33992Lnet/minecraft/class_22;field_33992:Iofficial sLdyl;s:Inamed iconCountLnet/minecraft/item/map/MapState;iconCount:I
-
-
Constructor Details
-
MapState
private MapState(int centerX, int centerZ, byte scale, boolean showIcons, boolean unlimitedTracking, boolean locked, RegistryKey<World> dimension) - Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_22;<init>(IIBZZZLnet/minecraft/class_5321;)Vofficial <init>Ldyl;<init>(IIBZZZLacp;)Vnamed <init>Lnet/minecraft/item/map/MapState;<init>(IIBZZZLnet/minecraft/registry/RegistryKey;)V
-
-
Method Details
-
of
public static MapState of(double centerX, double centerZ, byte scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension) Creates a new map state instance.- Parameters:
centerX- the absolute center X-coordinatecenterZ- the absolute center Z-coordinate- Mappings:
Namespace Name Mixin selector intermediary method_32363Lnet/minecraft/class_22;method_32363(DDBZZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;official aLdyl;a(DDBZZLacp;)Ldyl;named ofLnet/minecraft/item/map/MapState;of(DDBZZLnet/minecraft/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;
-
of
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 intermediary method_32362Lnet/minecraft/class_22;method_32362(BZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;official aLdyl;a(BZLacp;)Ldyl;named ofLnet/minecraft/item/map/MapState;of(BZLnet/minecraft/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;
-
fromNbt
- Mappings:
Namespace Name Mixin selector intermediary method_32371Lnet/minecraft/class_22;method_32371(Lnet/minecraft/class_2487;)Lnet/minecraft/class_22;official bLdyl;b(Lqr;)Ldyl;named fromNbtLnet/minecraft/item/map/MapState;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/item/map/MapState;
-
writeNbt
- Specified by:
writeNbtin classPersistentState- Mappings:
Namespace Name Mixin selector intermediary method_75Lnet/minecraft/class_18;method_75(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;official aLdyg;a(Lqr;)Lqr;named writeNbtLnet/minecraft/world/PersistentState;writeNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/nbt/NbtCompound;
-
copy
- Mappings:
Namespace Name Mixin selector intermediary method_32361Lnet/minecraft/class_22;method_32361()Lnet/minecraft/class_22;official aLdyl;a()Ldyl;named copyLnet/minecraft/item/map/MapState;copy()Lnet/minecraft/item/map/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 + zoomOutScaleand clamped between0and4.The colors are not copied, neither are the icons.
- Parameters:
zoomOutScale- the amount to add to the scale of the map- Mappings:
Namespace Name Mixin selector intermediary method_32364Lnet/minecraft/class_22;method_32364(I)Lnet/minecraft/class_22;official aLdyl;a(I)Ldyl;named zoomOutLnet/minecraft/item/map/MapState;zoomOut(I)Lnet/minecraft/item/map/MapState;
-
update
- Mappings:
Namespace Name Mixin selector intermediary method_102Lnet/minecraft/class_22;method_102(Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;)Vofficial aLdyl;a(Lbym;Lcfx;)Vnamed updateLnet/minecraft/item/map/MapState;update(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V
-
removeIcon
- Mappings:
Namespace Name Mixin selector intermediary method_32368Lnet/minecraft/class_22;method_32368(Ljava/lang/String;)Vofficial aLdyl;a(Ljava/lang/String;)Vnamed removeIconLnet/minecraft/item/map/MapState;removeIcon(Ljava/lang/String;)V
-
addDecorationsNbt
- Mappings:
Namespace Name Mixin selector intermediary method_110Lnet/minecraft/class_22;method_110(Lnet/minecraft/class_1799;Lnet/minecraft/class_2338;Ljava/lang/String;Lnet/minecraft/class_20$class_21;)Vofficial aLdyl;a(Lcfx;Lgu;Ljava/lang/String;Ldyi$a;)Vnamed addDecorationsNbtLnet/minecraft/item/map/MapState;addDecorationsNbt(Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/BlockPos;Ljava/lang/String;Lnet/minecraft/item/map/MapIcon$Type;)V
-
addIcon
private void addIcon(MapIcon.Type type, @Nullable @Nullable WorldAccess world, String key, double x, double z, double rotation, @Nullable @Nullable Text text) - Mappings:
Namespace Name Mixin selector intermediary method_107Lnet/minecraft/class_22;method_107(Lnet/minecraft/class_20$class_21;Lnet/minecraft/class_1936;Ljava/lang/String;DDDLnet/minecraft/class_2561;)Vofficial aLdyl;a(Ldyi$a;Lcml;Ljava/lang/String;DDDLsw;)Vnamed addIconLnet/minecraft/item/map/MapState;addIcon(Lnet/minecraft/item/map/MapIcon$Type;Lnet/minecraft/world/WorldAccess;Ljava/lang/String;DDDLnet/minecraft/text/Text;)V
-
getPlayerMarkerPacket
- Mappings:
Namespace Name Mixin selector intermediary method_100Lnet/minecraft/class_22;method_100(ILnet/minecraft/class_1657;)Lnet/minecraft/class_2596;official aLdyl;a(ILbym;)Luo;named getPlayerMarkerPacketLnet/minecraft/item/map/MapState;getPlayerMarkerPacket(ILnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/network/packet/Packet;
-
markDirty
private void markDirty(int x, int z) - Mappings:
Namespace Name Mixin selector intermediary method_103Lnet/minecraft/class_22;method_103(II)Vofficial aLdyl;a(II)Vnamed markDirtyLnet/minecraft/item/map/MapState;markDirty(II)V
-
markIconsDirty
private void markIconsDirty()- Mappings:
Namespace Name Mixin selector intermediary method_32374Lnet/minecraft/class_22;method_32374()Vofficial gLdyl;g()Vnamed markIconsDirtyLnet/minecraft/item/map/MapState;markIconsDirty()V
-
getPlayerSyncData
- Mappings:
Namespace Name Mixin selector intermediary method_101Lnet/minecraft/class_22;method_101(Lnet/minecraft/class_1657;)Lnet/minecraft/class_22$class_23;official aLdyl;a(Lbym;)Ldyl$a;named getPlayerSyncDataLnet/minecraft/item/map/MapState;getPlayerSyncData(Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/map/MapState$PlayerUpdateTracker;
-
addBanner
- Mappings:
Namespace Name Mixin selector intermediary method_108Lnet/minecraft/class_22;method_108(Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;)Zofficial aLdyl;a(Lcml;Lgu;)Znamed addBannerLnet/minecraft/item/map/MapState;addBanner(Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;)Z
-
removeBanner
- Mappings:
Namespace Name Mixin selector intermediary method_109Lnet/minecraft/class_22;method_109(Lnet/minecraft/class_1922;II)Vofficial aLdyl;a(Lclq;II)Vnamed removeBannerLnet/minecraft/item/map/MapState;removeBanner(Lnet/minecraft/world/BlockView;II)V
-
getBanners
- Mappings:
Namespace Name Mixin selector intermediary method_35503Lnet/minecraft/class_22;method_35503()Ljava/util/Collection;official dLdyl;d()Ljava/util/Collection;named getBannersLnet/minecraft/item/map/MapState;getBanners()Ljava/util/Collection;
-
removeFrame
- Mappings:
Namespace Name Mixin selector intermediary method_104Lnet/minecraft/class_22;method_104(Lnet/minecraft/class_2338;I)Vofficial aLdyl;a(Lgu;I)Vnamed removeFrameLnet/minecraft/item/map/MapState;removeFrame(Lnet/minecraft/util/math/BlockPos;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:
trueif the color has been updated, elsefalse- Mappings:
Namespace Name Mixin selector intermediary method_32365Lnet/minecraft/class_22;method_32365(IIB)Zofficial aLdyl;a(IIB)Znamed putColorLnet/minecraft/item/map/MapState;putColor(IIB)Z
-
setColor
public void setColor(int x, int z, byte color) - Mappings:
Namespace Name Mixin selector intermediary method_32370Lnet/minecraft/class_22;method_32370(IIB)Vofficial bLdyl;b(IIB)Vnamed setColorLnet/minecraft/item/map/MapState;setColor(IIB)V
-
hasMonumentIcon
public boolean hasMonumentIcon()- Mappings:
Namespace Name Mixin selector intermediary method_32372Lnet/minecraft/class_22;method_32372()Zofficial eLdyl;e()Znamed hasMonumentIconLnet/minecraft/item/map/MapState;hasMonumentIcon()Z
-
replaceIcons
- Mappings:
Namespace Name Mixin selector intermediary method_32369Lnet/minecraft/class_22;method_32369(Ljava/util/List;)Vofficial aLdyl;a(Ljava/util/List;)Vnamed replaceIconsLnet/minecraft/item/map/MapState;replaceIcons(Ljava/util/List;)V
-
getIcons
- Mappings:
Namespace Name Mixin selector intermediary method_32373Lnet/minecraft/class_22;method_32373()Ljava/lang/Iterable;official fLdyl;f()Ljava/lang/Iterable;named getIconsLnet/minecraft/item/map/MapState;getIcons()Ljava/lang/Iterable;
-
iconCountNotLessThan
public boolean iconCountNotLessThan(int iconCount) - Mappings:
Namespace Name Mixin selector intermediary method_37343Lnet/minecraft/class_22;method_37343(I)Zofficial bLdyl;b(I)Znamed iconCountNotLessThanLnet/minecraft/item/map/MapState;iconCountNotLessThan(I)Z
-