Record Class CheckExtensibleEnums
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.configuration.CheckExtensibleEnums
- All Implemented Interfaces:
ConfigurationTask
@Internal
public record CheckExtensibleEnums(ServerConfigurationPacketListener listener)
extends Record
implements ConfigurationTask
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
private static enum
Nested classes/interfaces inherited from interface net.minecraft.server.network.ConfigurationTask
ConfigurationTask.Type
-
Field Summary
Modifier and TypeFieldDescriptionprivate static Map
<String, CheckExtensibleEnums.EnumEntry> private final ServerConfigurationPacketListener
The field for thelistener
record component.private static final org.slf4j.Logger
private static final org.objectweb.asm.Type
static final ConfigurationTask.Type
-
Constructor Summary
ConstructorDescriptionCreates an instance of aCheckExtensibleEnums
record class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static Class
<?> classForName
(String name) final boolean
Indicates whether some other object is "equal to" this one.private static Map
<String, CheckExtensibleEnums.EnumEntry> private static net.neoforged.fml.common.asm.enumextension.ExtensionInfo
getEnumExtensionInfo
(Class<? extends Enum<?>> enumClass) static void
handleClientboundPayload
(ExtensibleEnumDataPayload payload, IPayloadContext context) static void
handleServerboundPayload
(ExtensibleEnumAcknowledgePayload payload, IPayloadContext context) static boolean
final int
hashCode()
Returns a hash code value for this object.listener()
Returns the value of thelistener
record component.void
final String
toString()
Returns a string representation of this record class.type()
-
Field Details
-
listener
The field for thelistener
record component. -
TYPE
-
LOGGER
private static final org.slf4j.Logger LOGGER -
NETWORKED_ENUM
private static final org.objectweb.asm.Type NETWORKED_ENUM -
NETWORKED_EXTENSIBLE_ENUM_CLASSES
-
enumEntries
-
-
Constructor Details
-
CheckExtensibleEnums
Creates an instance of aCheckExtensibleEnums
record class.- Parameters:
listener
- the value for thelistener
record component
-
-
Method Details
-
start
- Specified by:
start
in interfaceConfigurationTask
-
handleClientboundPayload
public static void handleClientboundPayload(ExtensibleEnumDataPayload payload, IPayloadContext context) -
handleServerboundPayload
public static void handleServerboundPayload(ExtensibleEnumAcknowledgePayload payload, IPayloadContext context) -
handleVanillaServerConnection
-
getEnumEntries
-
getEnumExtensionInfo
-
collectNetworkedEnumClasses
-
classForName
-
type
- Specified by:
type
in interfaceConfigurationTask
-
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)
. -
listener
Returns the value of thelistener
record component.- Returns:
- the value of the
listener
record component
-