Enum Class RegistrationFailedException.Reason
java.lang.Object
java.lang.Enum<RegistrationFailedException.Reason>
net.neoforged.neoforge.network.registration.RegistrationFailedException.Reason
- All Implemented Interfaces:
- Serializable,- Comparable<RegistrationFailedException.Reason>,- Constable,- RegistrationFailedException.ReasonFormatter
- Enclosing class:
- RegistrationFailedException
public static enum RegistrationFailedException.Reason
extends Enum<RegistrationFailedException.Reason>
implements RegistrationFailedException.ReasonFormatter
Defines possible reasons for a payload registration to fail.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionThe payload id is already registered.The payload id is registered in the wrong namespace.The registrar is invalid.Some other unknown reason, an exception was thrown downstream.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final RegistrationFailedException.ReasonFormatterThe internal formatter used to format the reason.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivate
- 
Method SummaryModifier and TypeMethodDescriptionformat(ResourceLocation id, String namespace) Creates a nice error message for the given parameters.Returns the enum constant of this class with the specified name.static RegistrationFailedException.Reason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
DUPLICATE_IDThe payload id is already registered.
- 
INVALID_NAMESPACEThe payload id is registered in the wrong namespace.
- 
INVALID_REGISTRARThe registrar is invalid.
- 
UNKNOWNSome other unknown reason, an exception was thrown downstream.
 
- 
- 
Field Details- 
formatterThe internal formatter used to format the reason.
 
- 
- 
Constructor Details- 
Reason
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
formatCreates a nice error message for the given parameters.- Specified by:
- formatin interface- RegistrationFailedException.ReasonFormatter
- Parameters:
- id- The id of the payload that was being registered.
- namespace- The namespace the payload was being registered in.
- Returns:
- A nice error message for the given parameters.
 
 
-