Enum Class packSource
- All Implemented Interfaces:
Serializable,Comparable<packSource>,Constable
NeoForge Only. Controls whether the datapack is enabled or disabled by default. Resource packs are always disabled by default unless you set alwaysActive to true.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPacks built into the mod, usually you should use this, unless you want it to be toggled by players via the pack selection screen, then seeFEATURE.Used for packs that don't fall into any of the other cases.Use this if you want the pack to be toggled by players via the pack selection screen.Used for resources packs given by a server to the client.Used for data packs added to the datapack directory and world resource packs. -
Method Summary
Modifier and TypeMethodDescriptionstatic packSourceReturns the enum constant of this class with the specified name.static packSource[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BUILT_IN
Packs built into the mod, usually you should use this, unless you want it to be toggled by players via the pack selection screen, then seeFEATURE. -
WORLD
Used for data packs added to the datapack directory and world resource packs. ("if you have a file in a world called resources.zip it will auto apply that as a resource pack", informed this by thatgravyboat) Not recommended. -
SERVER
Used for resources packs given by a server to the client. Not recommended. -
DEFAULT
Used for packs that don't fall into any of the other cases. Not recommended. -
FEATURE
Use this if you want the pack to be toggled by players via the pack selection screen.
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException- if the argument is null
-