类 MapState
- java.lang.Object
-
- net.minecraft.world.PersistentState
-
- net.minecraft.item.map.MapState
-
public class MapState extends PersistentState
- Mappings:
Namespace Name official dgsintermediary net/minecraft/class_22named net/minecraft/item/map/MapState
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 classMapState.PlayerUpdateTrackerstatic classMapState.UpdateData
-
字段概要
字段 修饰符和类型 字段 说明 private Map<String,MapBannerMarker>bannersThe banner markers to track in world.byte[]colorsRegistryKey<World>dimensionprivate static Loggerfield_25019static intfield_31831private static intfield_31832private static intfield_31833private Map<String,MapFrameMarker>framesprivate Map<String,MapIcon>iconsbooleanlockedbytescaleprivate booleanshowIconsprivate booleanunlimitedTrackingprivate List<MapState.PlayerUpdateTracker>updateTrackersprivate Map<PlayerEntity,MapState.PlayerUpdateTracker>updateTrackersByPlayerintxCenterThe scaled center coordinate of the map state on the X axis.intzCenterThe scaled center coordinate of the map state on the Z axis.
-
构造器概要
构造器 限定符 构造器 说明 privateMapState(int xCenter, int zCenter, byte scale, boolean showIcons, boolean unlimitedTracking, boolean locked, RegistryKey<World> dimension)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddBanner(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)MapStatecopy()static MapStatefromNbt(CompoundTag nbt)Collection<MapBannerMarker>getBanners()Iterable<MapIcon>getIcons()@Nullable Packet<?>getPlayerMarkerPacket(int id, PlayerEntity player)MapState.PlayerUpdateTrackergetPlayerSyncData(PlayerEntity player)booleanhasMonumentIcon()private voidmarkDirty(int x, int z)private voidmarkIconsDirty()static MapStateof(byte scale, boolean showIcons, RegistryKey<World> dimension)Creates a new map state instance for the client.static MapStateof(double xCenter, double zCenter, 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)CompoundTagwriteNbt(CompoundTag nbt)MapStatezoomOut(int zoomOutScale)Creates a new map state which is a zoomed out version of the current one.-
从类继承的方法 net.minecraft.world.PersistentState
isDirty, markDirty, save, setDirty
-
-
-
-
字段详细资料
-
field_25019
private static final Logger field_25019
- Mappings:
Namespace Name Mixin selector official hLdgs;h:Lorg/apache/logging/log4j/Logger;intermediary field_25019Lnet/minecraft/class_22;field_25019:Lorg/apache/logging/log4j/Logger;named field_25019Lnet/minecraft/item/map/MapState;field_25019:Lorg/apache/logging/log4j/Logger;
-
field_31832
private static final int field_31832
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official iLdgs;i:Iintermediary field_31832Lnet/minecraft/class_22;field_31832:Inamed field_31832Lnet/minecraft/item/map/MapState;field_31832:I
-
field_31833
private static final int field_31833
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official jLdgs;j:Iintermediary field_31833Lnet/minecraft/class_22;field_31833:Inamed field_31833Lnet/minecraft/item/map/MapState;field_31833:I
-
field_31831
public static final int field_31831
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official aLdgs;a:Iintermediary field_31831Lnet/minecraft/class_22;field_31831:Inamed field_31831Lnet/minecraft/item/map/MapState;field_31831:I
-
xCenter
public final int xCenter
The scaled center coordinate of the map state on the X axis.Always
0for the client.- Mappings:
Namespace Name Mixin selector official bLdgs;b:Iintermediary field_116Lnet/minecraft/class_22;field_116:Inamed xCenterLnet/minecraft/item/map/MapState;xCenter:I
-
zCenter
public final int zCenter
The scaled center coordinate of the map state on the Z axis.Always
0for the client.- Mappings:
Namespace Name Mixin selector official cLdgs;c:Iintermediary field_115Lnet/minecraft/class_22;field_115:Inamed zCenterLnet/minecraft/item/map/MapState;zCenter:I
-
dimension
public final RegistryKey<World> dimension
- Mappings:
Namespace Name Mixin selector official dLdgs;d:Lwo;intermediary field_118Lnet/minecraft/class_22;field_118:Lnet/minecraft/class_5321;named dimensionLnet/minecraft/item/map/MapState;dimension:Lnet/minecraft/util/registry/RegistryKey;
-
showIcons
private final boolean showIcons
- Mappings:
Namespace Name Mixin selector official kLdgs;k:Zintermediary field_114Lnet/minecraft/class_22;field_114:Znamed showIconsLnet/minecraft/item/map/MapState;showIcons:Z
-
unlimitedTracking
private final boolean unlimitedTracking
- Mappings:
Namespace Name Mixin selector official lLdgs;l:Zintermediary field_113Lnet/minecraft/class_22;field_113:Znamed unlimitedTrackingLnet/minecraft/item/map/MapState;unlimitedTracking:Z
-
scale
public final byte scale
- Mappings:
Namespace Name Mixin selector official eLdgs;e:Bintermediary field_119Lnet/minecraft/class_22;field_119:Bnamed scaleLnet/minecraft/item/map/MapState;scale:B
-
colors
public byte[] colors
- Mappings:
Namespace Name Mixin selector official fLdgs;f:[Bintermediary field_122Lnet/minecraft/class_22;field_122:[Bnamed colorsLnet/minecraft/item/map/MapState;colors:[B
-
locked
public final boolean locked
- Mappings:
Namespace Name Mixin selector official gLdgs;g:Zintermediary field_17403Lnet/minecraft/class_22;field_17403:Znamed lockedLnet/minecraft/item/map/MapState;locked:Z
-
updateTrackers
private final List<MapState.PlayerUpdateTracker> updateTrackers
- Mappings:
Namespace Name Mixin selector official mLdgs;m:Ljava/util/List;intermediary field_112Lnet/minecraft/class_22;field_112:Ljava/util/List;named updateTrackersLnet/minecraft/item/map/MapState;updateTrackers:Ljava/util/List;
-
updateTrackersByPlayer
private final Map<PlayerEntity,MapState.PlayerUpdateTracker> updateTrackersByPlayer
- Mappings:
Namespace Name Mixin selector official nLdgs;n:Ljava/util/Map;intermediary field_120Lnet/minecraft/class_22;field_120:Ljava/util/Map;named updateTrackersByPlayerLnet/minecraft/item/map/MapState;updateTrackersByPlayer: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 official oLdgs;o:Ljava/util/Map;intermediary field_123Lnet/minecraft/class_22;field_123:Ljava/util/Map;named bannersLnet/minecraft/item/map/MapState;banners:Ljava/util/Map;
-
icons
private final Map<String,MapIcon> icons
- Mappings:
Namespace Name Mixin selector official pLdgs;p:Ljava/util/Map;intermediary field_117Lnet/minecraft/class_22;field_117:Ljava/util/Map;named iconsLnet/minecraft/item/map/MapState;icons:Ljava/util/Map;
-
frames
private final Map<String,MapFrameMarker> frames
- Mappings:
Namespace Name Mixin selector official qLdgs;q:Ljava/util/Map;intermediary field_121Lnet/minecraft/class_22;field_121:Ljava/util/Map;named framesLnet/minecraft/item/map/MapState;frames:Ljava/util/Map;
-
-
构造器详细资料
-
MapState
private MapState(int xCenter, int zCenter, byte scale, boolean showIcons, boolean unlimitedTracking, boolean locked, RegistryKey<World> dimension)- Mappings:
Namespace Name Mixin selector official <init>Ldgs;<init>(IIBZZZLwo;)Vintermediary <init>Lnet/minecraft/class_22;<init>(IIBZZZLnet/minecraft/class_5321;)Vnamed <init>Lnet/minecraft/item/map/MapState;<init>(IIBZZZLnet/minecraft/util/registry/RegistryKey;)V
-
-
方法详细资料
-
of
public static MapState of(double xCenter, double zCenter, byte scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension)
Creates a new map state instance.- 参数:
xCenter- the absolute center X-coordinatezCenter- the absolute center Z-coordinate- Mappings:
Namespace Name Mixin selector official aLdgs;a(DDBZZLwo;)Ldgs;intermediary method_32363Lnet/minecraft/class_22;method_32363(DDBZZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;named ofLnet/minecraft/item/map/MapState;of(DDBZZLnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;
-
of
public static MapState of(byte scale, boolean showIcons, 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 official aLdgs;a(BZLwo;)Ldgs;intermediary method_32362Lnet/minecraft/class_22;method_32362(BZLnet/minecraft/class_5321;)Lnet/minecraft/class_22;named ofLnet/minecraft/item/map/MapState;of(BZLnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/item/map/MapState;
-
fromNbt
public static MapState fromNbt(CompoundTag nbt)
- Mappings:
Namespace Name Mixin selector official bLdgs;b(Lmv;)Ldgs;intermediary method_32371Lnet/minecraft/class_22;method_32371(Lnet/minecraft/class_2487;)Lnet/minecraft/class_22;named fromNbtLnet/minecraft/item/map/MapState;fromNbt(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/item/map/MapState;
-
writeNbt
public CompoundTag writeNbt(CompoundTag nbt)
- 指定者:
writeNbt在类中PersistentState- Mappings:
Namespace Name Mixin selector official aLdgn;a(Lmv;)Lmv;intermediary method_75Lnet/minecraft/class_18;method_75(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;named writeNbtLnet/minecraft/world/PersistentState;writeNbt(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/nbt/CompoundTag;
-
copy
public MapState copy()
- Mappings:
Namespace Name Mixin selector official aLdgs;a()Ldgs;intermediary method_32361Lnet/minecraft/class_22;method_32361()Lnet/minecraft/class_22;named copyLnet/minecraft/item/map/MapState;copy()Lnet/minecraft/item/map/MapState;
-
zoomOut
public MapState zoomOut(int zoomOutScale)
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.
- 参数:
zoomOutScale- the amount to add to the scale of the map- Mappings:
Namespace Name Mixin selector official aLdgs;a(I)Ldgs;intermediary method_32364Lnet/minecraft/class_22;method_32364(I)Lnet/minecraft/class_22;named zoomOutLnet/minecraft/item/map/MapState;zoomOut(I)Lnet/minecraft/item/map/MapState;
-
update
public void update(PlayerEntity player, ItemStack stack)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Lbjf;Lbpr;)Vintermediary method_102Lnet/minecraft/class_22;method_102(Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;)Vnamed updateLnet/minecraft/item/map/MapState;update(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V
-
removeIcon
private void removeIcon(String id)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Ljava/lang/String;)Vintermediary method_32368Lnet/minecraft/class_22;method_32368(Ljava/lang/String;)Vnamed removeIconLnet/minecraft/item/map/MapState;removeIcon(Ljava/lang/String;)V
-
addDecorationsNbt
public static void addDecorationsNbt(ItemStack stack, BlockPos pos, String id, MapIcon.Type type)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Lbpr;Lgb;Ljava/lang/String;Ldgp$a;)Vintermediary method_110Lnet/minecraft/class_22;method_110(Lnet/minecraft/class_1799;Lnet/minecraft/class_2338;Ljava/lang/String;Lnet/minecraft/class_20$class_21;)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 official aLdgs;a(Ldgp$a;Lbvs;Ljava/lang/String;DDDLon;)Vintermediary method_107Lnet/minecraft/class_22;method_107(Lnet/minecraft/class_20$class_21;Lnet/minecraft/class_1936;Ljava/lang/String;DDDLnet/minecraft/class_2561;)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
@Nullable public @Nullable Packet<?> getPlayerMarkerPacket(int id, PlayerEntity player)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(ILbjf;)Lpf;intermediary method_100Lnet/minecraft/class_22;method_100(ILnet/minecraft/class_1657;)Lnet/minecraft/class_2596;named getPlayerMarkerPacketLnet/minecraft/item/map/MapState;getPlayerMarkerPacket(ILnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/network/Packet;
-
markDirty
private void markDirty(int x, int z)- Mappings:
Namespace Name Mixin selector official aLdgs;a(II)Vintermediary method_103Lnet/minecraft/class_22;method_103(II)Vnamed markDirtyLnet/minecraft/item/map/MapState;markDirty(II)V
-
markIconsDirty
private void markIconsDirty()
- Mappings:
Namespace Name Mixin selector official gLdgs;g()Vintermediary method_32374Lnet/minecraft/class_22;method_32374()Vnamed markIconsDirtyLnet/minecraft/item/map/MapState;markIconsDirty()V
-
getPlayerSyncData
public MapState.PlayerUpdateTracker getPlayerSyncData(PlayerEntity player)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Lbjf;)Ldgs$a;intermediary method_101Lnet/minecraft/class_22;method_101(Lnet/minecraft/class_1657;)Lnet/minecraft/class_22$class_23;named getPlayerSyncDataLnet/minecraft/item/map/MapState;getPlayerSyncData(Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/map/MapState$PlayerUpdateTracker;
-
addBanner
public void addBanner(WorldAccess world, BlockPos pos)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Lbvs;Lgb;)Vintermediary method_108Lnet/minecraft/class_22;method_108(Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;)Vnamed addBannerLnet/minecraft/item/map/MapState;addBanner(Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;)V
-
removeBanner
public void removeBanner(BlockView world, int x, int z)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Lbuv;II)Vintermediary method_109Lnet/minecraft/class_22;method_109(Lnet/minecraft/class_1922;II)Vnamed removeBannerLnet/minecraft/item/map/MapState;removeBanner(Lnet/minecraft/world/BlockView;II)V
-
getBanners
public Collection<MapBannerMarker> getBanners()
- Mappings:
Namespace Name Mixin selector official dLdgs;d()Ljava/util/Collection;intermediary method_35503Lnet/minecraft/class_22;method_35503()Ljava/util/Collection;named getBannersLnet/minecraft/item/map/MapState;getBanners()Ljava/util/Collection;
-
removeFrame
public void removeFrame(BlockPos pos, int id)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Lgb;I)Vintermediary method_104Lnet/minecraft/class_22;method_104(Lnet/minecraft/class_2338;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.- 返回:
trueif the color has been updated, elsefalse- Mappings:
Namespace Name Mixin selector official aLdgs;a(IIB)Zintermediary method_32365Lnet/minecraft/class_22;method_32365(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 official bLdgs;b(IIB)Vintermediary method_32370Lnet/minecraft/class_22;method_32370(IIB)Vnamed setColorLnet/minecraft/item/map/MapState;setColor(IIB)V
-
hasMonumentIcon
public boolean hasMonumentIcon()
- Mappings:
Namespace Name Mixin selector official eLdgs;e()Zintermediary method_32372Lnet/minecraft/class_22;method_32372()Znamed hasMonumentIconLnet/minecraft/item/map/MapState;hasMonumentIcon()Z
-
replaceIcons
public void replaceIcons(List<MapIcon> icons)
- Mappings:
Namespace Name Mixin selector official aLdgs;a(Ljava/util/List;)Vintermediary method_32369Lnet/minecraft/class_22;method_32369(Ljava/util/List;)Vnamed replaceIconsLnet/minecraft/item/map/MapState;replaceIcons(Ljava/util/List;)V
-
-