Record Class ClientboundUpdateAdvancementsPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundUpdateAdvancementsPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundUpdateAdvancementsPacket(boolean shouldReset, List<ClientboundUpdateAdvancementsPacket.PositionedAdvancement> added, Set<Identifier> removed, Map<Identifier, AdvancementProgress> progress, boolean showAdvancements)
extends Record
implements Packet<ClientGamePacketListener>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ClientboundUpdateAdvancementsPacket.PositionedAdvancement> The field for theaddedrecord component.private final Map<Identifier, AdvancementProgress> The field for theprogressrecord component.private final Set<Identifier> The field for theremovedrecord component.private final booleanThe field for theshouldResetrecord component.private final booleanThe field for theshowAdvancementsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundUpdateAdvancementsPacket(boolean shouldReset, List<ClientboundUpdateAdvancementsPacket.PositionedAdvancement> added, Set<Identifier> removed, Map<Identifier, AdvancementProgress> progress, boolean showAdvancements) Creates an instance of aClientboundUpdateAdvancementsPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadded()Returns the value of theaddedrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) final inthashCode()Returns a hash code value for this object.progress()Returns the value of theprogressrecord component.removed()Returns the value of theremovedrecord component.booleanReturns the value of theshouldResetrecord component.booleanReturns the value of theshowAdvancementsrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
shouldReset
private final boolean shouldResetThe field for theshouldResetrecord component. -
added
The field for theaddedrecord component. -
removed
The field for theremovedrecord component. -
progress
The field for theprogressrecord component. -
showAdvancements
private final boolean showAdvancementsThe field for theshowAdvancementsrecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundUpdateAdvancementsPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundUpdateAdvancementsPacket
public ClientboundUpdateAdvancementsPacket(boolean shouldReset, List<ClientboundUpdateAdvancementsPacket.PositionedAdvancement> added, Set<Identifier> removed, Map<Identifier, AdvancementProgress> progress, boolean showAdvancements) Creates an instance of aClientboundUpdateAdvancementsPacketrecord class.- Parameters:
shouldReset- the value for theshouldResetrecord componentadded- the value for theaddedrecord componentremoved- the value for theremovedrecord componentprogress- the value for theprogressrecord componentshowAdvancements- the value for theshowAdvancementsrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
shouldReset
public boolean shouldReset()Returns the value of theshouldResetrecord component.- Returns:
- the value of the
shouldResetrecord component
-
added
Returns the value of theaddedrecord component.- Returns:
- the value of the
addedrecord component
-
removed
Returns the value of theremovedrecord component.- Returns:
- the value of the
removedrecord component
-
progress
Returns the value of theprogressrecord component.- Returns:
- the value of the
progressrecord component
-
showAdvancements
public boolean showAdvancements()Returns the value of theshowAdvancementsrecord component.- Returns:
- the value of the
showAdvancementsrecord component
-