java.lang.Object
com.github.minecraftschurlimods.arsmagicalegacy.api.data.SkillBuilder

public class SkillBuilder extends Object
Builder for skills. Used in SkillProviders for data generation.
  • Constructor Details

    • SkillBuilder

      protected SkillBuilder(net.minecraft.resources.ResourceLocation id)
  • Method Details

    • create

      @Contract("_, _ -> new") public static SkillBuilder create(net.minecraft.resources.ResourceLocation id, net.minecraft.resources.ResourceLocation occulusTab)
      Parameters:
      id - The id for the skill.
      occulusTab - The id of the occulus tab for the skill.
      Returns:
      A new builder for the skill.
    • create

      @Contract("_, _ -> new") public static SkillBuilder create(net.minecraft.resources.ResourceLocation id, OcculusTab occulusTab)
      Parameters:
      id - The id for the skill.
      occulusTab - The occulus tab for the skill.
      Returns:
      A new builder for the skill.
    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Returns:
      The id of the skill.
    • addCost

      @Contract("_, _ -> this") public SkillBuilder addCost(net.minecraft.resources.ResourceLocation point, int amt)
      Adds a learning cost to this skill.
      Parameters:
      point - The id of the skill point the skill should cost.
      amt - The amount of skill points the skill should cost.
      Returns:
      This builder, for chaining.
    • addCost

      @Contract("_, _ -> this") public SkillBuilder addCost(SkillPoint point, int amt)
      Adds a learning cost to this skill.
      Parameters:
      point - The skill point the skill should cost.
      amt - The amount of skill points the skill should cost.
      Returns:
      This builder, for chaining.
    • addCost

      @Contract("_ -> this") public SkillBuilder addCost(net.minecraft.resources.ResourceLocation point)
      Adds a learning cost to this skill.
      Parameters:
      point - The skill point the skill should cost.
      Returns:
      This builder, for chaining.
    • addCost

      @Contract("_ -> this") public SkillBuilder addCost(SkillPoint point)
      Adds a learning cost to this skill.
      Parameters:
      point - The skill point the skill should cost.
      Returns:
      This builder, for chaining.
    • addParent

      @Contract("_ -> this") public SkillBuilder addParent(net.minecraft.resources.ResourceLocation parent)
      Adds a parent skill that must be learned first.
      Parameters:
      parent - The id of the parent skill to add.
      Returns:
      This builder, for chaining.
    • addParent

      @Contract("_ -> this") public SkillBuilder addParent(Skill parent)
      Adds a parent skill that must be learned first.
      Parameters:
      parent - The parent skill to add.
      Returns:
      This builder, for chaining.
    • addParent

      @Contract("_ -> this") public SkillBuilder addParent(SkillBuilder parent)
      Adds a parent skill that must be learned first.
      Parameters:
      parent - A builder for the parent skill to add.
      Returns:
      This builder, for chaining.
    • setPosition

      @Contract("_, _ -> this") public SkillBuilder setPosition(int x, int y)
      Sets the position this skill should be displayed at in the defined occulus tab.
      Parameters:
      x - The X coordinate.
      y - The Y coordinate.
      Returns:
      This builder, for chaining.
    • setHidden

      @Contract("_ -> this") public SkillBuilder setHidden(boolean hidden)
      Sets if this skill should be hidden or not. Default behavior is false.
      Parameters:
      hidden - The hidden state to set.
      Returns:
      This builder, for chaining.
    • hidden

      @Contract("-> this") public SkillBuilder hidden()
      Sets that this skill should be hidden.
      Returns:
      This builder, for chaining.
    • setOcculusTab

      @Contract("_ -> this") protected SkillBuilder setOcculusTab(net.minecraft.resources.ResourceLocation occulusTab)
      Sets the occulus tab this skill belongs to.
      Parameters:
      occulusTab - The id of the occulus tab to set.
      Returns:
      This builder, for chaining.
    • setOcculusTab

      @Contract("_ -> this") protected SkillBuilder setOcculusTab(OcculusTab occulusTab)
      Sets the occulus tab this skill belongs to.
      Parameters:
      occulusTab - The occulus tab to set.
      Returns:
      This builder, for chaining.
    • build

      @Contract("_ -> this") public SkillBuilder build(Consumer<SkillBuilder> consumer)
      Builds the skill.
      Parameters:
      consumer - The consumer that will consume the builder.
      Returns:
      This builder, for chaining.