Class BarModels.Builder

java.lang.Object
com.github.darksoulq.abyssallib.server.resource.util.BarModels.Builder
Enclosing class:
BarModels

public static class BarModels.Builder extends Object
A fluent builder class used to configure and register bar models into a Namespace.
  • Constructor Details

    • Builder

      public Builder(Namespace ns, String name, BarModels.Axis axis)
      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

      public BarModels.Builder steps(int 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

      public BarModels.Builder animatedFill(boolean 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

      public BarModels.Builder defaultBranch(String underlay, String fill, String overlay)
      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.