Record Class ClientboundStatusResponsePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.status.ClientboundStatusResponsePacket
- All Implemented Interfaces:
- Packet<ClientStatusPacketListener>
public record ClientboundStatusResponsePacket(ServerStatus status, @Nullable String cachedStatus)
extends Record
implements Packet<ClientStatusPacketListener>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final @Nullable StringThe field for thecachedStatusrecord component.private final ServerStatusThe field for thestatusrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionClientboundStatusResponsePacket(FriendlyByteBuf p_179834_) ClientboundStatusResponsePacket(ServerStatus status, @Nullable String cachedStatus) Creates an instance of aClientboundStatusResponsePacketrecord class.
- 
Method SummaryModifier and TypeMethodDescription@Nullable StringReturns the value of thecachedStatusrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientStatusPacketListener p_134896_) final inthashCode()Returns a hash code value for this object.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_134899_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable, nextProtocol
- 
Field Details- 
statusThe field for thestatusrecord component.
- 
cachedStatusThe field for thecachedStatusrecord component.
 
- 
- 
Constructor Details- 
ClientboundStatusResponsePacket
- 
ClientboundStatusResponsePacket
- 
ClientboundStatusResponsePacketpublic ClientboundStatusResponsePacket(ServerStatus status, @Nullable @Nullable String cachedStatus) Creates an instance of aClientboundStatusResponsePacketrecord class.- Parameters:
- status- the value for the- statusrecord component
- cachedStatus- the value for the- cachedStatusrecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- Packet<ClientStatusPacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ClientStatusPacketListener>
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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. All components in this record class are compared withObjects::equals(Object,Object).
- 
statusReturns the value of thestatusrecord component.- Returns:
- the value of the statusrecord component
 
- 
cachedStatusReturns the value of thecachedStatusrecord component.- Returns:
- the value of the cachedStatusrecord component
 
 
-