Package net.minecraft.item.map
Class MapState
java.lang.Object
net.minecraft.world.PersistentState
net.minecraft.item.map.MapState
- Mappings:
Namespace Name named net/minecraft/item/map/MapStateintermediary net/minecraft/class_22official epj
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic final recordNested classes/interfaces inherited from class net.minecraft.world.PersistentState
PersistentState.Type<T extends PersistentState> -
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[]private int(package private) final Map<String, MapDecoration> final RegistryKey<World> private final Map<String, MapFrameMarker> final booleanprivate static final Loggerstatic final intstatic final intfinal byteprivate final booleanprivate static final intprivate static final intprivate final booleanprivate final List<MapState.PlayerUpdateTracker> private final Map<PlayerEntity, MapState.PlayerUpdateTracker> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMapState(int centerX, int centerZ, byte scale, boolean showDecorations, boolean unlimitedTracking, boolean locked, RegistryKey<World> dimension) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBanner(WorldAccess world, BlockPos pos) private voidaddDecoration(RegistryEntry<MapDecorationType> type, @Nullable WorldAccess world, String key, double x, double z, double rotation, @Nullable Text text) static voidaddDecorationsNbt(ItemStack stack, BlockPos pos, String id, RegistryEntry<MapDecorationType> decorationType) copy()booleandecorationCountNotLessThan(int decorationCount) static MapStatefromNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) getEqualPredicate(ItemStack stack) static PersistentState.Type<MapState> getPlayerMarkerPacket(MapIdComponent mapId, PlayerEntity player) getPlayerSyncData(PlayerEntity player) booleanprivate voidprivate voidmarkDirty(int x, int z) static 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 showDecorations, 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) private voidvoidremoveFrame(BlockPos pos, int id) voidreplaceDecorations(List<MapDecoration> decorations) voidsetColor(int x, int z, byte color) voidupdate(PlayerEntity player, ItemStack stack) writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) zoomOut()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 named LOGGERLnet/minecraft/item/map/MapState;LOGGER:Lorg/slf4j/Logger;intermediary field_25019Lnet/minecraft/class_22;field_25019:Lorg/slf4j/Logger;official iLepj;i:Lorg/slf4j/Logger;
-
SIZE
private static final int SIZE- See Also:
- Mappings:
Namespace Name Mixin selector named SIZELnet/minecraft/item/map/MapState;SIZE:Iintermediary field_31832Lnet/minecraft/class_22;field_31832:Iofficial jLepj;j:I
-
SIZE_HALF
private static final int SIZE_HALF- See Also:
- Mappings:
Namespace Name Mixin selector named SIZE_HALFLnet/minecraft/item/map/MapState;SIZE_HALF:Iintermediary field_31833Lnet/minecraft/class_22;field_31833:Iofficial kLepj;k:I
-
MAX_SCALE
public static final int MAX_SCALE- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_SCALELnet/minecraft/item/map/MapState;MAX_SCALE:Iintermediary field_31831Lnet/minecraft/class_22;field_31831:Iofficial aLepj;a:I
-
MAX_DECORATIONS
public static final int MAX_DECORATIONS- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_DECORATIONSLnet/minecraft/item/map/MapState;MAX_DECORATIONS:Iintermediary field_33991Lnet/minecraft/class_22;field_33991:Iofficial bLepj;b: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 named centerXLnet/minecraft/item/map/MapState;centerX:Iintermediary field_116Lnet/minecraft/class_22;field_116:Iofficial cLepj;c: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 named centerZLnet/minecraft/item/map/MapState;centerZ:Iintermediary field_115Lnet/minecraft/class_22;field_115:Iofficial dLepj;d:I
-
dimension
- Mappings:
Namespace Name Mixin selector named dimensionLnet/minecraft/item/map/MapState;dimension:Lnet/minecraft/registry/RegistryKey;intermediary field_118Lnet/minecraft/class_22;field_118:Lnet/minecraft/class_5321;official eLepj;e:Lald;
-
showDecorations
private final boolean showDecorations- Mappings:
Namespace Name Mixin selector named showDecorationsLnet/minecraft/item/map/MapState;showDecorations:Zintermediary field_114Lnet/minecraft/class_22;field_114:Zofficial lLepj;l:Z
-
unlimitedTracking
private final boolean unlimitedTracking- Mappings:
Namespace Name Mixin selector named unlimitedTrackingLnet/minecraft/item/map/MapState;unlimitedTracking:Zintermediary field_113Lnet/minecraft/class_22;field_113:Zofficial mLepj;m:Z
-
scale
public final byte scale- Mappings:
Namespace Name Mixin selector named scaleLnet/minecraft/item/map/MapState;scale:Bintermediary field_119Lnet/minecraft/class_22;field_119:Bofficial fLepj;f:B
-
colors
public byte[] colors- Mappings:
Namespace Name Mixin selector named colorsLnet/minecraft/item/map/MapState;colors:[Bintermediary field_122Lnet/minecraft/class_22;field_122:[Bofficial gLepj;g:[B
-
locked
public final boolean locked- Mappings:
Namespace Name Mixin selector named lockedLnet/minecraft/item/map/MapState;locked:Zintermediary field_17403Lnet/minecraft/class_22;field_17403:Zofficial hLepj;h:Z
-
updateTrackers
- Mappings:
Namespace Name Mixin selector named updateTrackersLnet/minecraft/item/map/MapState;updateTrackers:Ljava/util/List;intermediary field_112Lnet/minecraft/class_22;field_112:Ljava/util/List;official nLepj;n:Ljava/util/List;
-
updateTrackersByPlayer
- Mappings:
Namespace Name Mixin selector named updateTrackersByPlayerLnet/minecraft/item/map/MapState;updateTrackersByPlayer:Ljava/util/Map;intermediary field_120Lnet/minecraft/class_22;field_120:Ljava/util/Map;official oLepj;o:Ljava/util/Map;
-
banners
The banner markers to track in world.Empty for the client.
- Mappings:
Namespace Name Mixin selector named bannersLnet/minecraft/item/map/MapState;banners:Ljava/util/Map;intermediary field_123Lnet/minecraft/class_22;field_123:Ljava/util/Map;official pLepj;p:Ljava/util/Map;
-
decorations
- Mappings:
Namespace Name Mixin selector named decorationsLnet/minecraft/item/map/MapState;decorations:Ljava/util/Map;intermediary field_117Lnet/minecraft/class_22;field_117:Ljava/util/Map;official qLepj;q:Ljava/util/Map;
-
frames
- Mappings:
Namespace Name Mixin selector named framesLnet/minecraft/item/map/MapState;frames:Ljava/util/Map;intermediary field_121Lnet/minecraft/class_22;field_121:Ljava/util/Map;official rLepj;r:Ljava/util/Map;
-
decorationCount
private int decorationCount- Mappings:
Namespace Name Mixin selector named decorationCountLnet/minecraft/item/map/MapState;decorationCount:Iintermediary field_33992Lnet/minecraft/class_22;field_33992:Iofficial sLepj;s: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;)Vintermediary <init>Lnet/minecraft/class_22;<init>(IIBZZZLnet/minecraft/class_5321;)Vofficial <init>Lepj;<init>(IIBZZZLald;)V
-
-
Method Details
-
getPersistentStateType
- Mappings:
Namespace Name Mixin selector named getPersistentStateTypeLnet/minecraft/item/map/MapState;getPersistentStateType()Lnet/minecraft/world/PersistentState$Type;intermediary method_52611Lnet/minecraft/class_22;method_52611()Lnet/minecraft/class_18$class_8645;official aLepj;a()Lepb$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-coordinatecenterZ- the absolute center Z-coordinate- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/item/map/MapState;of(DDBZZLnet/minecraft/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;intermediary method_32363Lnet/minecraft/class_22;method_32363(DDBZZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;official aLepj;a(DDBZZLald;)Lepj;
-
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 named ofLnet/minecraft/item/map/MapState;of(BZLnet/minecraft/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;intermediary method_32362Lnet/minecraft/class_22;method_32362(BZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;official aLepj;a(BZLald;)Lepj;
-
fromNbt
- Mappings:
Namespace Name Mixin selector named fromNbtLnet/minecraft/item/map/MapState;fromNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/item/map/MapState;intermediary method_32371Lnet/minecraft/class_22;method_32371(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_22;official bLepj;b(Lur;Ljk$a;)Lepj;
-
writeNbt
- Specified by:
writeNbtin classPersistentState- Mappings:
Namespace Name Mixin selector named writeNbtLnet/minecraft/world/PersistentState;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_75Lnet/minecraft/class_18;method_75(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official aLepb;a(Lur;Ljk$a;)Lur;
-
copy
- Mappings:
Namespace Name Mixin selector named copyLnet/minecraft/item/map/MapState;copy()Lnet/minecraft/item/map/MapState;intermediary method_32361Lnet/minecraft/class_22;method_32361()Lnet/minecraft/class_22;official bLepj;b()Lepj;
-
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 decorations.
- Mappings:
Namespace Name Mixin selector named zoomOutLnet/minecraft/item/map/MapState;zoomOut()Lnet/minecraft/item/map/MapState;intermediary method_32364Lnet/minecraft/class_22;method_32364()Lnet/minecraft/class_22;official eLepj;e()Lepj;
-
getEqualPredicate
- Mappings:
Namespace Name Mixin selector named getEqualPredicateLnet/minecraft/item/map/MapState;getEqualPredicate(Lnet/minecraft/item/ItemStack;)Ljava/util/function/Predicate;intermediary method_55784Lnet/minecraft/class_22;method_55784(Lnet/minecraft/class_1799;)Ljava/util/function/Predicate;official aLepj;a(Lcuo;)Ljava/util/function/Predicate;
-
update
- Mappings:
Namespace Name Mixin selector named updateLnet/minecraft/item/map/MapState;update(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)Vintermediary method_102Lnet/minecraft/class_22;method_102(Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;)Vofficial aLepj;a(Lcmw;Lcuo;)V
-
removeDecoration
- Mappings:
Namespace Name Mixin selector named removeDecorationLnet/minecraft/item/map/MapState;removeDecoration(Ljava/lang/String;)Vintermediary method_32368Lnet/minecraft/class_22;method_32368(Ljava/lang/String;)Vofficial aLepj;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 addDecorationsNbtLnet/minecraft/item/map/MapState;addDecorationsNbt(Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/BlockPos;Ljava/lang/String;Lnet/minecraft/registry/entry/RegistryEntry;)Vintermediary method_110Lnet/minecraft/class_22;method_110(Lnet/minecraft/class_1799;Lnet/minecraft/class_2338;Ljava/lang/String;Lnet/minecraft/class_6880;)Vofficial aLepj;a(Lcuo;Liz;Ljava/lang/String;Lji;)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 addDecorationLnet/minecraft/item/map/MapState;addDecoration(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/world/WorldAccess;Ljava/lang/String;DDDLnet/minecraft/text/Text;)Vintermediary method_107Lnet/minecraft/class_22;method_107(Lnet/minecraft/class_6880;Lnet/minecraft/class_1936;Ljava/lang/String;DDDLnet/minecraft/class_2561;)Vofficial aLepj;a(Lji;Ldby;Ljava/lang/String;DDDLxo;)V
-
getPlayerMarkerPacket
@Nullable public @Nullable Packet<?> getPlayerMarkerPacket(MapIdComponent mapId, PlayerEntity player) - Mappings:
Namespace Name Mixin selector named getPlayerMarkerPacketLnet/minecraft/item/map/MapState;getPlayerMarkerPacket(Lnet/minecraft/component/type/MapIdComponent;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/network/packet/Packet;intermediary method_100Lnet/minecraft/class_22;method_100(Lnet/minecraft/class_9209;Lnet/minecraft/class_1657;)Lnet/minecraft/class_2596;official aLepj;a(Leph;Lcmw;)Lzv;
-
markDirty
private void markDirty(int x, int z) - Mappings:
Namespace Name Mixin selector named markDirtyLnet/minecraft/item/map/MapState;markDirty(II)Vintermediary method_103Lnet/minecraft/class_22;method_103(II)Vofficial aLepj;a(II)V
-
markDecorationsDirty
private void markDecorationsDirty()- Mappings:
Namespace Name Mixin selector named markDecorationsDirtyLnet/minecraft/item/map/MapState;markDecorationsDirty()Vintermediary method_32374Lnet/minecraft/class_22;method_32374()Vofficial iLepj;i()V
-
getPlayerSyncData
- Mappings:
Namespace Name Mixin selector named getPlayerSyncDataLnet/minecraft/item/map/MapState;getPlayerSyncData(Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/map/MapState$PlayerUpdateTracker;intermediary method_101Lnet/minecraft/class_22;method_101(Lnet/minecraft/class_1657;)Lnet/minecraft/class_22$class_23;official aLepj;a(Lcmw;)Lepj$a;
-
addBanner
- Mappings:
Namespace Name Mixin selector named addBannerLnet/minecraft/item/map/MapState;addBanner(Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;)Zintermediary method_108Lnet/minecraft/class_22;method_108(Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;)Zofficial aLepj;a(Ldby;Liz;)Z
-
removeBanner
- Mappings:
Namespace Name Mixin selector named removeBannerLnet/minecraft/item/map/MapState;removeBanner(Lnet/minecraft/world/BlockView;II)Vintermediary method_109Lnet/minecraft/class_22;method_109(Lnet/minecraft/class_1922;II)Vofficial aLepj;a(Ldbd;II)V
-
getBanners
- Mappings:
Namespace Name Mixin selector named getBannersLnet/minecraft/item/map/MapState;getBanners()Ljava/util/Collection;intermediary method_35503Lnet/minecraft/class_22;method_35503()Ljava/util/Collection;official fLepj;f()Ljava/util/Collection;
-
removeFrame
- Mappings:
Namespace Name Mixin selector named removeFrameLnet/minecraft/item/map/MapState;removeFrame(Lnet/minecraft/util/math/BlockPos;I)Vintermediary method_104Lnet/minecraft/class_22;method_104(Lnet/minecraft/class_2338;I)Vofficial aLepj;a(Liz;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 named putColorLnet/minecraft/item/map/MapState;putColor(IIB)Zintermediary method_32365Lnet/minecraft/class_22;method_32365(IIB)Zofficial aLepj;a(IIB)Z
-
setColor
public void setColor(int x, int z, byte color) - Mappings:
Namespace Name Mixin selector named setColorLnet/minecraft/item/map/MapState;setColor(IIB)Vintermediary method_32370Lnet/minecraft/class_22;method_32370(IIB)Vofficial bLepj;b(IIB)V
-
hasExplorationMapDecoration
public boolean hasExplorationMapDecoration()- Mappings:
Namespace Name Mixin selector named hasExplorationMapDecorationLnet/minecraft/item/map/MapState;hasExplorationMapDecoration()Zintermediary method_32372Lnet/minecraft/class_22;method_32372()Zofficial gLepj;g()Z
-
replaceDecorations
- Mappings:
Namespace Name Mixin selector named replaceDecorationsLnet/minecraft/item/map/MapState;replaceDecorations(Ljava/util/List;)Vintermediary method_32369Lnet/minecraft/class_22;method_32369(Ljava/util/List;)Vofficial aLepj;a(Ljava/util/List;)V
-
getDecorations
- Mappings:
Namespace Name Mixin selector named getDecorationsLnet/minecraft/item/map/MapState;getDecorations()Ljava/lang/Iterable;intermediary method_32373Lnet/minecraft/class_22;method_32373()Ljava/lang/Iterable;official hLepj;h()Ljava/lang/Iterable;
-
decorationCountNotLessThan
public boolean decorationCountNotLessThan(int decorationCount) - Mappings:
Namespace Name Mixin selector named decorationCountNotLessThanLnet/minecraft/item/map/MapState;decorationCountNotLessThan(I)Zintermediary method_37343Lnet/minecraft/class_22;method_37343(I)Zofficial aLepj;a(I)Z
-