Class AbilityBuilder
java.lang.Object
com.github.minecraftschurlimods.arsmagicalegacy.api.data.AbilityBuilder
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbilityBuilder(net.minecraft.resources.ResourceLocation id) -
Method Summary
Modifier and TypeMethodDescriptionbuild(Consumer<AbilityBuilder> consumer) Builds the ability.static AbilityBuildercreate(net.minecraft.resources.ResourceLocation id) net.minecraft.resources.ResourceLocationgetId()withAffinity(Affinity affinity) Sets the affinity for this ability.withAffinity(net.minecraft.resources.ResourceLocation affinity) Sets the affinity for this ability.withBounds(net.minecraft.advancements.critereon.MinMaxBounds.Doubles bounds) Sets the bounds for this ability.
-
Constructor Details
-
AbilityBuilder
protected AbilityBuilder(net.minecraft.resources.ResourceLocation id)
-
-
Method Details
-
create
- Parameters:
id- The id of the ability.- Returns:
- A builder for an ability.
-
getId
public net.minecraft.resources.ResourceLocation getId()- Returns:
- The id of the ability.
-
withAffinity
@Contract("_ -> this") public AbilityBuilder withAffinity(net.minecraft.resources.ResourceLocation affinity) Sets the affinity for this ability.- Parameters:
affinity- The id of the affinity to set.- Returns:
- This builder, for chaining.
-
withAffinity
Sets the affinity for this ability.- Parameters:
affinity- The affinity to set.- Returns:
- This builder, for chaining.
-
withBounds
Sets the bounds for this ability.- Parameters:
bounds- The bounds to set.- Returns:
- This builder, for chaining.
-
build
Builds the ability.- Parameters:
consumer- The consumer that will consume the builder.- Returns:
- This builder, for chaining.
-