Package net.minecraftforge.network
Record Class ServerStatusPing.ChannelData
java.lang.Object
java.lang.Record
net.minecraftforge.network.ServerStatusPing.ChannelData
- Enclosing class:
- ServerStatusPing
public static record ServerStatusPing.ChannelData(ResourceLocation res, int version, boolean required)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ServerStatusPing.ChannelData>private final booleanThe field for therequiredrecord component.private final ResourceLocationThe field for theresrecord component.private final intThe field for theversionrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionChannelData(ResourceLocation res, int version, boolean required) Creates an instance of aChannelDatarecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanrequired()Returns the value of therequiredrecord component.res()Returns the value of theresrecord component.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
- 
Field Details- 
resThe field for theresrecord component.
- 
versionprivate final int versionThe field for theversionrecord component.
- 
requiredprivate final boolean requiredThe field for therequiredrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
ChannelDataCreates an instance of aChannelDatarecord class.- Parameters:
- res- the value for the- resrecord component
- version- the value for the- versionrecord component
- required- the value for the- requiredrecord component
 
 
- 
- 
Method Details- 
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
resReturns the value of theresrecord component.- Returns:
- the value of the resrecord component
 
- 
versionpublic int version()Returns the value of theversionrecord component.- Returns:
- the value of the versionrecord component
 
- 
requiredpublic boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the requiredrecord component
 
 
-