Record Class ClientboundMapItemDataPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundMapItemDataPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundMapItemDataPacket(MapId mapId, byte scale, boolean locked, Optional<List<MapDecoration>> decorations, Optional<MapItemSavedData.MapPatch> colorPatch)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<MapItemSavedData.MapPatch> The field for thecolorPatchrecord component.private final Optional<List<MapDecoration>> The field for thedecorationsrecord component.private final booleanThe field for thelockedrecord component.private final MapIdThe field for themapIdrecord component.private final byteThe field for thescalerecord component.static final StreamCodec<RegistryFriendlyByteBuf, ClientboundMapItemDataPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundMapItemDataPacket(MapId p_324389_, byte p_323701_, boolean p_323593_, Collection<MapDecoration> p_324520_, MapItemSavedData.MapPatch p_324306_) ClientboundMapItemDataPacket(MapId mapId, byte scale, boolean locked, Optional<List<MapDecoration>> decorations, Optional<MapItemSavedData.MapPatch> colorPatch) Creates an instance of aClientboundMapItemDataPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToMap(MapItemSavedData p_132438_) Returns the value of thecolorPatchrecord component.Returns the value of thedecorationsrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_132444_) final inthashCode()Returns a hash code value for this object.booleanlocked()Returns the value of thelockedrecord component.mapId()Returns the value of themapIdrecord component.bytescale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
mapId
The field for themapIdrecord component. -
scale
private final byte scaleThe field for thescalerecord component. -
locked
private final boolean lockedThe field for thelockedrecord component. -
decorations
The field for thedecorationsrecord component. -
colorPatch
The field for thecolorPatchrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundMapItemDataPacket
public ClientboundMapItemDataPacket(MapId p_324389_, byte p_323701_, boolean p_323593_, @Nullable Collection<MapDecoration> p_324520_, @Nullable MapItemSavedData.MapPatch p_324306_) -
ClientboundMapItemDataPacket
public ClientboundMapItemDataPacket(MapId mapId, byte scale, boolean locked, Optional<List<MapDecoration>> decorations, Optional<MapItemSavedData.MapPatch> colorPatch) Creates an instance of aClientboundMapItemDataPacketrecord class.- Parameters:
mapId- the value for themapIdrecord componentscale- the value for thescalerecord componentlocked- the value for thelockedrecord componentdecorations- the value for thedecorationsrecord componentcolorPatch- the value for thecolorPatchrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
applyToMap
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
mapId
Returns the value of themapIdrecord component.- Returns:
- the value of the
mapIdrecord component
-
scale
public byte scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
locked
public boolean locked()Returns the value of thelockedrecord component.- Returns:
- the value of the
lockedrecord component
-
decorations
Returns the value of thedecorationsrecord component.- Returns:
- the value of the
decorationsrecord component
-
colorPatch
Returns the value of thecolorPatchrecord component.- Returns:
- the value of the
colorPatchrecord component
-