Class BarModels.Builder
java.lang.Object
com.github.darksoulq.abyssallib.server.resource.util.BarModels.Builder
- Enclosing class:
BarModels
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(Namespace ns, String name, BarModels.Axis axis) Constructs a new Builder for a specific bar. -
Method Summary
Modifier and TypeMethodDescriptionanimatedFill(boolean animatedFill) Sets whether the fill textures should attempt to load animation metadata.Registers a conditional branch for specific metadata states.defaultBranch(String underlay, String fill, String overlay) Sets the default texture configuration for this bar.voidregister()Executes the registration of all generated models and item definitions.steps(int steps) Configures the number of progress increments.
-
Constructor Details
-
Builder
Constructs a new Builder for a specific bar.- Parameters:
ns- The namespace to use for registration.name- The unique name of the bar.axis- The orientation of the bar.
-
-
Method Details
-
steps
Configures the number of progress increments.- Parameters:
steps- The total steps (e.g., 8 for a half-block bar).- Returns:
- This builder instance.
-
animatedFill
Sets whether the fill textures should attempt to load animation metadata.- Parameters:
animatedFill- True to call ns.mcmeta for fill textures.- Returns:
- This builder instance.
-
defaultBranch
Sets the default texture configuration for this bar.- Parameters:
underlay- The texture path for the background layer.fill- The base texture path for the fill segments.overlay- The texture path for the foreground/border layer.- Returns:
- This builder instance.
-
branch
public BarModels.Builder branch(List<String> conditions, String underlay, String fill, String overlay) Registers a conditional branch for specific metadata states.- Parameters:
conditions- The list of Custom Model Data strings required.underlay- The background texture for this branch.fill- The fill base path for this branch.overlay- The foreground texture for this branch.- Returns:
- This builder instance.
-
register
public void register()Executes the registration of all generated models and item definitions.
-