Package dev.twilite.game.common
Class GameVals
java.lang.Object
dev.twilite.game.common.GameVals
Helpers for resolving cache gameval names to their generated Java constant names.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA resolved gameval constant name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<GameVals.Constant> constant(dev.twilite.cache.gameval.GameValType type, int id) Returns the generated Java constant forid.constantName(dev.twilite.cache.gameval.GameValType type, int id) Returns the generated Java constant name forid.static Optional<GameVals.Constant> interfaceComponent(int id) Returns the generated Java constant for an interface component uid.static Optional<GameVals.Constant> interfaceComponent(int group, int component) Returns the generated Java constant for an interface component.interfaceComponentName(int id) Returns the generated Java constant name for an interface component uid.interfaceComponentQualifiedName(int id) Returns the generated Java class and constant name for an interface component uid.static booleanloaded(dev.twilite.cache.gameval.GameValType type) Returns whether the constant index fortypehas been loaded.name(dev.twilite.cache.gameval.GameValType type, int id) Returns the raw gameval name forid.qualifiedName(dev.twilite.cache.gameval.GameValType type, int id) Returns the generated Java class and constant name forid.static voidwarmup(dev.twilite.cache.gameval.GameValType type) Starts loading the constant index fortypeif it has not already been loaded.
-
Constructor Details
-
GameVals
public GameVals()
-
-
Method Details
-
name
Returns the raw gameval name forid. -
constantName
Returns the generated Java constant name forid. -
qualifiedName
Returns the generated Java class and constant name forid. -
constant
public static Optional<GameVals.Constant> constant(dev.twilite.cache.gameval.GameValType type, int id) Returns the generated Java constant forid. -
loaded
public static boolean loaded(dev.twilite.cache.gameval.GameValType type) Returns whether the constant index fortypehas been loaded. -
warmup
public static void warmup(dev.twilite.cache.gameval.GameValType type) Starts loading the constant index fortypeif it has not already been loaded. -
interfaceComponent
Returns the generated Java constant for an interface component uid. -
interfaceComponent
Returns the generated Java constant for an interface component. -
interfaceComponentName
Returns the generated Java constant name for an interface component uid. -
interfaceComponentQualifiedName
Returns the generated Java class and constant name for an interface component uid.
-