Record Class SimpleChannel.LoginPacketEntry
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.simple.SimpleChannel.LoginPacketEntry
- Enclosing class:
- SimpleChannel
private static record SimpleChannel.LoginPacketEntry(MessageFunctions.LoginPacketGenerator<?> generator, boolean needsResponse)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MessageFunctions.LoginPacketGenerator<?>The field for thegeneratorrecord component.private final booleanThe field for theneedsResponserecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLoginPacketEntry(MessageFunctions.LoginPacketGenerator<?> generator, boolean needsResponse) Creates an instance of aLoginPacketEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeneratorrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theneedsResponserecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
generator
The field for thegeneratorrecord component. -
needsResponse
private final boolean needsResponseThe field for theneedsResponserecord component.
-
-
Constructor Details
-
LoginPacketEntry
Creates an instance of aLoginPacketEntryrecord class.- Parameters:
generator- the value for thegeneratorrecord componentneedsResponse- the value for theneedsResponserecord 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 '=='. -
generator
Returns the value of thegeneratorrecord component.- Returns:
- the value of the
generatorrecord component
-
needsResponse
public boolean needsResponse()Returns the value of theneedsResponserecord component.- Returns:
- the value of the
needsResponserecord component
-