Class MapItemSavedData
java.lang.Object
net.minecraft.world.level.saveddata.SavedData
net.minecraft.world.level.saveddata.maps.MapItemSavedData
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static final record
Nested classes/interfaces inherited from class net.minecraft.world.level.saveddata.SavedData
SavedData.Factory<T extends SavedData>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List
<MapItemSavedData.HoldingPlayer> private final Map
<Player, MapItemSavedData.HoldingPlayer> final int
final int
byte[]
(package private) final Map
<String, MapDecoration> final ResourceKey
<Level> private static final int
final boolean
private static final org.slf4j.Logger
private static final int
static final int
final byte
static final int
private int
private final boolean
private final boolean
-
Constructor Summary
ModifierConstructorDescriptionprivate
MapItemSavedData
(int p_164768_, int p_164769_, byte p_164770_, boolean p_164771_, boolean p_164772_, boolean p_164773_, ResourceKey<Level> p_164774_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClientSideDecorations
(List<MapDecoration> p_164802_) private void
addDecoration
(Holder<MapDecorationType> p_333390_, LevelAccessor p_77939_, String p_77940_, double p_77941_, double p_77942_, double p_77943_, Component p_77944_) static void
addTargetDecoration
(ItemStack p_77926_, BlockPos p_77927_, String p_77928_, Holder<MapDecorationType> p_335418_) void
checkBanners
(BlockGetter p_77931_, int p_77932_, int p_77933_) static MapItemSavedData
createForClient
(byte p_164777_, boolean p_164778_, ResourceKey<Level> p_164779_) static MapItemSavedData
createFresh
(double p_164781_, double p_164782_, byte p_164783_, boolean p_164784_, boolean p_164785_, ResourceKey<Level> p_164786_) static SavedData.Factory
<MapItemSavedData> factory()
getHoldingPlayer
(Player p_77917_) Packet
<?> getUpdatePacket
(MapId p_328547_, Player p_164798_) boolean
boolean
isTrackedCountOverLimit
(int p_181313_) static MapItemSavedData
load
(CompoundTag p_164808_, HolderLookup.Provider p_332149_) locked()
mapMatcher
(ItemStack p_331084_) private void
removeDecoration
(String p_164800_) void
removedFromFrame
(BlockPos p_77948_, int p_77949_) save
(CompoundTag p_77956_, HolderLookup.Provider p_327825_) scaled()
void
setColor
(int p_164804_, int p_164805_, byte p_164806_) private void
setColorsDirty
(int p_164790_, int p_164791_) private void
void
tickCarriedBy
(Player p_77919_, ItemStack p_77920_) boolean
toggleBanner
(LevelAccessor p_77935_, BlockPos p_77936_) boolean
updateColor
(int p_164793_, int p_164794_, byte p_164795_)
-
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:
-
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 p_164768_, int p_164769_, byte p_164770_, boolean p_164771_, boolean p_164772_, boolean p_164773_, ResourceKey<Level> p_164774_)
-
-
Method Details
-
factory
-
createFresh
public static MapItemSavedData createFresh(double p_164781_, double p_164782_, byte p_164783_, boolean p_164784_, boolean p_164785_, ResourceKey<Level> p_164786_) -
createForClient
public static MapItemSavedData createForClient(byte p_164777_, boolean p_164778_, ResourceKey<Level> p_164779_) -
load
-
save
-
locked
-
scaled
-
mapMatcher
-
tickCarriedBy
-
removeDecoration
-
addTargetDecoration
public static void addTargetDecoration(ItemStack p_77926_, BlockPos p_77927_, String p_77928_, Holder<MapDecorationType> p_335418_) -
addDecoration
private void addDecoration(Holder<MapDecorationType> p_333390_, @Nullable LevelAccessor p_77939_, String p_77940_, double p_77941_, double p_77942_, double p_77943_, @Nullable Component p_77944_) -
getUpdatePacket
-
setColorsDirty
private void setColorsDirty(int p_164790_, int p_164791_) -
setDecorationsDirty
private void setDecorationsDirty() -
getHoldingPlayer
-
toggleBanner
-
checkBanners
-
getBanners
-
removedFromFrame
-
updateColor
public boolean updateColor(int p_164793_, int p_164794_, byte p_164795_) -
setColor
public void setColor(int p_164804_, int p_164805_, byte p_164806_) -
isExplorationMap
public boolean isExplorationMap() -
addClientSideDecorations
-
getDecorations
-
isTrackedCountOverLimit
public boolean isTrackedCountOverLimit(int p_181313_)
-