Interface IExtensibleEnum
- All Known Implementing Classes:
BiomeSpecialEffects.GrassColorModifier
,DamageEffects
,DamageScaling
,DeathMessageType
,FireworkExplosion.Shape
,GlyphProviderType
,Gui.HeartType
,HumanoidModel.ArmPose
,ItemDisplayContext
,ItemUseAnimation
,MobCategory
,Raid.RaiderType
,Rarity
,RecipeBookType
public interface IExtensibleEnum
To be implemented on vanilla enums that should be enhanced with ASM to be
extensible. If this is implemented on a class, the class must define a static
method called
The method contents will be replaced with ASM at runtime to return information about the extension of the enum
getExtensionInfo()
which takes zero args and returns an ExtensionInfo
.
By default, the method must return ExtensionInfo.nonExtended(Class)
with the enum's class as the parameter.
public static ExtensionInfo getExtensionInfo() {
return ExtensionInfo.nonExtended(TheEnum.class);
}
Enum constants added to enums implementing this interface can be retrieved later via TheEnum.valueOf(String)
or from the associated EnumProxy
field if the parameters were supplied through it