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
Modifier and TypeFieldDescriptionprivate final Optional
<MapItemSavedData.MapPatch> The field for thecolorPatch
record component.private final Optional
<List<MapDecoration>> The field for thedecorations
record component.private final boolean
The field for thelocked
record component.private final MapId
The field for themapId
record component.private final byte
The field for thescale
record component.static final StreamCodec
<RegistryFriendlyByteBuf, ClientboundMapItemDataPacket> -
Constructor Summary
ConstructorDescriptionClientboundMapItemDataPacket
(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 aClientboundMapItemDataPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyToMap
(MapItemSavedData p_132438_) Returns the value of thecolorPatch
record component.Returns the value of thedecorations
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_132444_) final int
hashCode()
Returns a hash code value for this object.boolean
locked()
Returns the value of thelocked
record component.mapId()
Returns the value of themapId
record component.byte
scale()
Returns the value of thescale
record component.final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
mapId
The field for themapId
record component. -
scale
private final byte scaleThe field for thescale
record component. -
locked
private final boolean lockedThe field for thelocked
record component. -
decorations
The field for thedecorations
record component. -
colorPatch
The field for thecolorPatch
record 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 aClientboundMapItemDataPacket
record class.- Parameters:
mapId
- the value for themapId
record componentscale
- the value for thescale
record componentlocked
- the value for thelocked
record componentdecorations
- the value for thedecorations
record componentcolorPatch
- the value for thecolorPatch
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in 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 themapId
record component.- Returns:
- the value of the
mapId
record component
-
scale
public byte scale()Returns the value of thescale
record component.- Returns:
- the value of the
scale
record component
-
locked
public boolean locked()Returns the value of thelocked
record component.- Returns:
- the value of the
locked
record component
-
decorations
Returns the value of thedecorations
record component.- Returns:
- the value of the
decorations
record component
-
colorPatch
Returns the value of thecolorPatch
record component.- Returns:
- the value of the
colorPatch
record component
-