Record Class RegistryDataMapNegotiation
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.configuration.RegistryDataMapNegotiation
- All Implemented Interfaces:
ConfigurationTask, ICustomConfigurationTask
@Internal
public record RegistryDataMapNegotiation(ServerConfigurationPacketListener listener)
extends Record
implements ICustomConfigurationTask
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConfigurationTask
ConfigurationTask.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Identifierprivate final ServerConfigurationPacketListenerThe field for thelistenerrecord component.static final ConfigurationTask.Type -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aRegistryDataMapNegotiationrecord 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.listener()Returns the value of thelistenerrecord component.voidrun(Consumer<CustomPacketPayload> sender) Invoked when it is time for this configuration to run.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface ConfigurationTask
tickMethods inherited from interface ICustomConfigurationTask
start
-
Field Details
-
listener
The field for thelistenerrecord component. -
ID
-
TYPE
-
-
Constructor Details
-
RegistryDataMapNegotiation
Creates an instance of aRegistryDataMapNegotiationrecord class.- Parameters:
listener- the value for thelistenerrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceConfigurationTask
-
run
Description copied from interface:ICustomConfigurationTaskInvoked when it is time for this configuration to run.- Specified by:
runin interfaceICustomConfigurationTask- Parameters:
sender- A consumer that accepts aCustomPacketPayloadto send to the client.
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
listener
Returns the value of thelistenerrecord component.- Returns:
- the value of the
listenerrecord component
-