Package net.minecraft.item.map
Class MapState
java.lang.Object
net.minecraft.world.PersistentState
net.minecraft.item.map.MapState
public class MapState extends PersistentState
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMapState.PlayerUpdateTracker -
Field Summary
Fields Modifier and Type Field Description private Map<String,MapBannerMarker>bannersThe banner markers to track in world.intcenterXThe scaled center coordinate of the map state on the X axis.intcenterZThe scaled center coordinate of the map state on the Z axis.byte[]colorsRegistryKey<World>dimensionprivate static Loggerfield_25019private Map<String,MapFrameMarker>framesMap<String,MapIcon>iconsbooleanlockedbytescalebooleanshowIconsbooleanunlimitedTrackingList<MapState.PlayerUpdateTracker>updateTrackersprivate Map<PlayerEntity,MapState.PlayerUpdateTracker>updateTrackersByPlayer -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidaddBanner(WorldAccess world, BlockPos pos)static voidaddDecorationsNbt(ItemStack stack, BlockPos pos, String id, MapIcon.Type type)private voidaddIcon(MapIcon.Type type, WorldAccess world, String key, double x, double z, double rotation, Text text)voidcalculateCenter(double x, double z, int scale)voidcopyFrom(MapState state)voidfromTag(NbtCompound tag)Packet<?>getPlayerMarkerPacket(ItemStack map, BlockView world, PlayerEntity pos)MapState.PlayerUpdateTrackergetPlayerSyncData(PlayerEntity player)voidinit(int x, int z, int scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension)voidmarkDirty(int x, int z)voidremoveBanner(BlockView world, int x, int z)voidremoveFrame(BlockPos pos, int id)voidupdate(PlayerEntity player, ItemStack stack)NbtCompoundwriteNbt(NbtCompound nbt)
-
Field Details
-
field_25019
-
centerX
public int centerXThe scaled center coordinate of the map state on the X axis.Always
0for the client. -
centerZ
public int centerZThe scaled center coordinate of the map state on the Z axis.Always
0for the client. -
dimension
-
showIcons
public boolean showIcons -
unlimitedTracking
public boolean unlimitedTracking -
scale
public byte scale -
colors
public byte[] colors -
locked
public boolean locked -
updateTrackers
-
updateTrackersByPlayer
-
banners
The banner markers to track in world.Empty for the client.
-
icons
-
frames
-
-
Constructor Details
-
MapState
-
-
Method Details
-
init
public void init(int x, int z, int scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension) -
calculateCenter
public void calculateCenter(double x, double z, int scale) -
fromTag
- Specified by:
fromTagin classPersistentState
-
writeNbt
- Specified by:
writeNbtin classPersistentState
-
copyFrom
-
update
-
addDecorationsNbt
-
addIcon
private void addIcon(MapIcon.Type type, @Nullable WorldAccess world, String key, double x, double z, double rotation, @Nullable Text text) -
getPlayerMarkerPacket
-
markDirty
public void markDirty(int x, int z) -
getPlayerSyncData
-
addBanner
-
removeBanner
-
removeFrame
-