Package codechicken.lib.config
Record Class ConfigSyncManager.ConfigSyncConfigurationTask
java.lang.Object
java.lang.Record
codechicken.lib.config.ConfigSyncManager.ConfigSyncConfigurationTask
- All Implemented Interfaces:
net.minecraft.server.network.ConfigurationTask,net.neoforged.neoforge.network.configuration.ICustomConfigurationTask
- Enclosing class:
ConfigSyncManager
@Internal
public static record ConfigSyncManager.ConfigSyncConfigurationTask(net.minecraft.server.network.ConfigurationTask.Type type, StreamNetworkChannel.ConfigurationContext ctx)
extends Record
implements net.neoforged.neoforge.network.configuration.ICustomConfigurationTask
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.network.ConfigurationTask
net.minecraft.server.network.ConfigurationTask.Type -
Constructor Summary
ConstructorsConstructorDescriptionConfigSyncConfigurationTask(net.minecraft.server.network.ConfigurationTask.Type type, StreamNetworkChannel.ConfigurationContext ctx) Creates an instance of aConfigSyncConfigurationTaskrecord class. -
Method Summary
Modifier and TypeMethodDescriptionctx()Returns the value of thectxrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidfinal StringtoString()Returns a string representation of this record class.net.minecraft.server.network.ConfigurationTask.Typetype()Returns the value of thetyperecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.server.network.ConfigurationTask
tickMethods inherited from interface net.neoforged.neoforge.network.configuration.ICustomConfigurationTask
start
-
Constructor Details
-
ConfigSyncConfigurationTask
public ConfigSyncConfigurationTask(net.minecraft.server.network.ConfigurationTask.Type type, StreamNetworkChannel.ConfigurationContext ctx) Creates an instance of aConfigSyncConfigurationTaskrecord class.- Parameters:
type- the value for thetyperecord componentctx- the value for thectxrecord component
-
-
Method Details
-
run
- Specified by:
runin interfacenet.neoforged.neoforge.network.configuration.ICustomConfigurationTask
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
public net.minecraft.server.network.ConfigurationTask.Type type()Returns the value of thetyperecord component.- Specified by:
typein interfacenet.minecraft.server.network.ConfigurationTask- Returns:
- the value of the
typerecord component
-
ctx
Returns the value of thectxrecord component.- Returns:
- the value of the
ctxrecord component
-