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 class
MapState.PlayerUpdateTracker
-
Field Summary
Fields Modifier and Type Field Description private Map<String,MapBannerMarker>
banners
byte[]
colors
RegistryKey<World>
dimension
private static Logger
field_25019
private Map<String,MapFrameMarker>
frames
Map<String,MapIcon>
icons
boolean
locked
byte
scale
boolean
showIcons
boolean
unlimitedTracking
List<MapState.PlayerUpdateTracker>
updateTrackers
private Map<PlayerEntity,MapState.PlayerUpdateTracker>
updateTrackersByPlayer
int
xCenter
int
zCenter
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
addBanner(WorldAccess world, BlockPos pos)
static void
addDecorationsTag(ItemStack stack, BlockPos pos, String id, MapIcon.Type type)
private void
addIcon(MapIcon.Type type, WorldAccess world, String key, double x, double z, double rotation, Text text)
void
calculateCenter(double x, double z, int scale)
void
copyFrom(MapState state)
void
fromTag(CompoundTag tag)
Packet<?>
getPlayerMarkerPacket(ItemStack map, BlockView world, PlayerEntity pos)
MapState.PlayerUpdateTracker
getPlayerSyncData(PlayerEntity player)
void
init(int x, int z, int scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension)
void
markDirty(int x, int z)
void
removeBanner(BlockView world, int x, int z)
void
removeFrame(BlockPos pos, int id)
CompoundTag
toTag(CompoundTag tag)
void
update(PlayerEntity player, ItemStack stack)
-
Field Details
-
field_25019
-
xCenter
public int xCenter -
zCenter
public int zCenter -
dimension
-
showIcons
public boolean showIcons -
unlimitedTracking
public boolean unlimitedTracking -
scale
public byte scale -
colors
public byte[] colors -
locked
public boolean locked -
updateTrackers
-
updateTrackersByPlayer
-
banners
-
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:
fromTag
in classPersistentState
-
toTag
- Specified by:
toTag
in classPersistentState
-
copyFrom
-
update
-
addDecorationsTag
-
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
-