Class MapItemSavedData
java.lang.Object
net.minecraft.world.level.saveddata.SavedData
net.minecraft.world.level.saveddata.maps.MapItemSavedData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic final recordNested classes/interfaces inherited from class net.minecraft.world.level.saveddata.SavedData
SavedData.Factory<T extends SavedData> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<MapItemSavedData.HoldingPlayer> private final Map<Player, MapItemSavedData.HoldingPlayer> final intfinal intbyte[](package private) final Map<String, MapDecoration> final ResourceKey<Level> private static final Stringprivate static final intfinal booleanprivate static final org.slf4j.Loggerprivate static final intstatic final intfinal bytestatic final intprivate intprivate final booleanprivate final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMapItemSavedData(int pX, int pZ, byte pScale, boolean pTrackingPosition, boolean pUnlimitedTracking, boolean pLocked, ResourceKey<Level> pDimension) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientSideDecorations(List<MapDecoration> pDecorations) voidaddDecoration(Holder<MapDecorationType> pDecorationType, LevelAccessor pLevel, String pId, double pX, double pZ, double pYRot, Component pDisplayName) static voidaddTargetDecoration(ItemStack pStack, BlockPos pPos, String pType, Holder<MapDecorationType> pMapDecorationType) voidcheckBanners(BlockGetter pReader, int pX, int pZ) static MapItemSavedDatacreateForClient(byte pScale, boolean pLocked, ResourceKey<Level> pDimension) static MapItemSavedDatacreateFresh(double pX, double pZ, byte pScale, boolean pTrackingPosition, boolean pUnlimitedTracking, ResourceKey<Level> pDimension) static SavedData.Factory<MapItemSavedData> factory()private static StringgetFrameKey(int pEntityId) getHoldingPlayer(Player pPlayer) Packet<?> getUpdatePacket(MapId pMapId, Player pPlayer) booleanbooleanisTrackedCountOverLimit(int pTrackedCount) static MapItemSavedDataload(CompoundTag p_164808_, HolderLookup.Provider p_324560_) locked()mapMatcher(ItemStack pStack) voidremoveDecoration(String pIdentifier) voidremovedFromFrame(BlockPos pPos, int pEntityId) save(CompoundTag pTag, HolderLookup.Provider pRegistries) scaled()voidsetColor(int pX, int pZ, byte pColor) private voidsetColorsDirty(int pX, int pZ) private voidvoidtickCarriedBy(Player pPlayer, ItemStack pMapStack) Adds the player passed to the list of visible players and checks to see which players are visiblebooleantoggleBanner(LevelAccessor pAccessor, BlockPos pPos) booleanupdateColor(int pX, int pZ, byte pColor)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAP_SIZE
private static final int MAP_SIZE- See Also:
-
HALF_MAP_SIZE
private static final int HALF_MAP_SIZE- See Also:
-
MAX_SCALE
public static final int MAX_SCALE- See Also:
-
TRACKED_DECORATION_LIMIT
public static final int TRACKED_DECORATION_LIMIT- See Also:
-
FRAME_PREFIX
- See Also:
-
centerX
public final int centerX -
centerZ
public final int centerZ -
dimension
-
trackingPosition
private final boolean trackingPosition -
unlimitedTracking
private final boolean unlimitedTracking -
scale
public final byte scale -
colors
public byte[] colors -
locked
public final boolean locked -
carriedBy
-
carriedByPlayers
-
bannerMarkers
-
decorations
-
frameMarkers
-
trackedDecorationCount
private int trackedDecorationCount
-
-
Constructor Details
-
MapItemSavedData
private MapItemSavedData(int pX, int pZ, byte pScale, boolean pTrackingPosition, boolean pUnlimitedTracking, boolean pLocked, ResourceKey<Level> pDimension)
-
-
Method Details
-
factory
-
createFresh
public static MapItemSavedData createFresh(double pX, double pZ, byte pScale, boolean pTrackingPosition, boolean pUnlimitedTracking, ResourceKey<Level> pDimension) -
createForClient
public static MapItemSavedData createForClient(byte pScale, boolean pLocked, ResourceKey<Level> pDimension) -
load
-
save
-
locked
-
scaled
-
mapMatcher
-
tickCarriedBy
Adds the player passed to the list of visible players and checks to see which players are visible -
removeDecoration
-
addTargetDecoration
public static void addTargetDecoration(ItemStack pStack, BlockPos pPos, String pType, Holder<MapDecorationType> pMapDecorationType) -
addDecoration
public void addDecoration(Holder<MapDecorationType> pDecorationType, @Nullable LevelAccessor pLevel, String pId, double pX, double pZ, double pYRot, @Nullable Component pDisplayName) -
getUpdatePacket
-
setColorsDirty
private void setColorsDirty(int pX, int pZ) -
setDecorationsDirty
private void setDecorationsDirty() -
getHoldingPlayer
-
toggleBanner
-
checkBanners
-
getBanners
-
removedFromFrame
-
updateColor
public boolean updateColor(int pX, int pZ, byte pColor) -
setColor
public void setColor(int pX, int pZ, byte pColor) -
isExplorationMap
public boolean isExplorationMap() -
addClientSideDecorations
-
getDecorations
-
isTrackedCountOverLimit
public boolean isTrackedCountOverLimit(int pTrackedCount) -
getFrameKey
-