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
Modifier and TypeFieldDescriptionprivate final MessageFunctions.LoginPacketGenerator<?>
The field for thegenerator
record component.private final boolean
The field for theneedsResponse
record component. -
Constructor Summary
ModifierConstructorDescriptionprivate
LoginPacketEntry
(MessageFunctions.LoginPacketGenerator<?> generator, boolean needsResponse) Creates an instance of aLoginPacketEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegenerator
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theneedsResponse
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
generator
The field for thegenerator
record component. -
needsResponse
private final boolean needsResponseThe field for theneedsResponse
record component.
-
-
Constructor Details
-
LoginPacketEntry
Creates an instance of aLoginPacketEntry
record class.- Parameters:
generator
- the value for thegenerator
record componentneedsResponse
- the value for theneedsResponse
record 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 thegenerator
record component.- Returns:
- the value of the
generator
record component
-
needsResponse
public boolean needsResponse()Returns the value of theneedsResponse
record component.- Returns:
- the value of the
needsResponse
record component
-