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 Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionChannelData(ResourceLocation res, int version, boolean required) Creates an instance of aChannelDatarecord class. -
Method Summary
Modifier 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
-
res
The field for theresrecord component. -
version
private final int versionThe field for theversionrecord component. -
required
private final boolean requiredThe field for therequiredrecord component. -
CODEC
-
-
Constructor Details
-
ChannelData
Creates an instance of aChannelDatarecord class.- Parameters:
res- the value for theresrecord componentversion- the value for theversionrecord componentrequired- the value for therequiredrecord component
-
-
Method Details
-
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 '=='. -
res
Returns the value of theresrecord component.- Returns:
- the value of the
resrecord component
-
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-