Class SkillBuilder
java.lang.Object
com.github.minecraftschurlimods.arsmagicalegacy.api.data.SkillBuilder
Builder for skills. Used in SkillProviders for data generation.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSkillBuilder(net.minecraft.resources.ResourceLocation id) -
Method Summary
Modifier and TypeMethodDescriptionaddCost(SkillPoint point) Adds a learning cost to this skill.addCost(SkillPoint point, int amt) Adds a learning cost to this skill.addCost(net.minecraft.resources.ResourceLocation point) Adds a learning cost to this skill.addCost(net.minecraft.resources.ResourceLocation point, int amt) Adds a learning cost to this skill.addParent(SkillBuilder parent) Adds a parent skill that must be learned first.Adds a parent skill that must be learned first.addParent(net.minecraft.resources.ResourceLocation parent) Adds a parent skill that must be learned first.build(Consumer<SkillBuilder> consumer) Builds the skill.static SkillBuildercreate(net.minecraft.resources.ResourceLocation id, OcculusTab occulusTab) static SkillBuildercreate(net.minecraft.resources.ResourceLocation id, net.minecraft.resources.ResourceLocation occulusTab) net.minecraft.resources.ResourceLocationgetId()hidden()Sets that this skill should be hidden.setHidden(boolean hidden) Sets if this skill should be hidden or not.protected SkillBuildersetOcculusTab(OcculusTab occulusTab) Sets the occulus tab this skill belongs to.protected SkillBuildersetOcculusTab(net.minecraft.resources.ResourceLocation occulusTab) Sets the occulus tab this skill belongs to.setPosition(int x, int y) Sets the position this skill should be displayed at in the defined occulus tab.
-
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
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
Adds a learning cost to this skill.- Parameters:
point- The skill point the skill should cost.- Returns:
- This builder, for chaining.
-
addCost
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
Adds a parent skill that must be learned first.- Parameters:
parent- The parent skill to add.- Returns:
- This builder, for chaining.
-
addParent
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
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
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.
-
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
Sets the occulus tab this skill belongs to.- Parameters:
occulusTab- The occulus tab to set.- Returns:
- This builder, for chaining.
-
build
Builds the skill.- Parameters:
consumer- The consumer that will consume the builder.- Returns:
- This builder, for chaining.
-