Class SpellPartDataProvider.SpellPartDataBuilder
java.lang.Object
com.github.minecraftschurlimods.arsmagicalegacy.api.data.SpellPartDataProvider.SpellPartDataBuilder
- Enclosing class:
- SpellPartDataProvider
-
Constructor Summary
ConstructorsConstructorDescriptionSpellPartDataBuilder(net.minecraft.resources.ResourceLocation id, float manaCost) Creates a new spell part builder entry.SpellPartDataBuilder(net.minecraft.resources.ResourceLocation id, float manaCost, float burnout) Creates a new spell part builder entry. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()Builds the spell part data object.withAffinity(Affinity affinity, float shift) Adds an affinity.withAffinity(Supplier<Affinity> affinity, float shift) Adds an affinity.withAffinity(net.minecraft.resources.ResourceLocation affinity, float shift) Adds an affinity.withIngredient(ISpellIngredient ingredient) Adds a spell ingredient.withReagent(int amount, net.minecraft.world.item.crafting.Ingredient ingredient) Adds a spell reagent.withReagent(ItemFilter filter) Adds a spell reagent.withReagent(net.minecraft.world.item.crafting.Ingredient ingredient) Adds a spell reagent.withReagent(net.minecraft.world.item.ItemStack stack) Adds a spell reagent.
-
Constructor Details
-
SpellPartDataBuilder
public SpellPartDataBuilder(net.minecraft.resources.ResourceLocation id, float manaCost, float burnout) Creates a new spell part builder entry.- Parameters:
id- The spell part id.manaCost- The spell part mana cost.burnout- The spell part burnout.
-
SpellPartDataBuilder
public SpellPartDataBuilder(net.minecraft.resources.ResourceLocation id, float manaCost) Creates a new spell part builder entry.- Parameters:
id- The spell part id.manaCost- The spell part mana cost.
-
-
Method Details
-
withReagent
public SpellPartDataProvider.SpellPartDataBuilder withReagent(net.minecraft.world.item.crafting.Ingredient ingredient) Adds a spell reagent.- Parameters:
ingredient- The spell reagent to add.- Returns:
- This builder, for chaining.
-
withReagent
public SpellPartDataProvider.SpellPartDataBuilder withReagent(int amount, net.minecraft.world.item.crafting.Ingredient ingredient) Adds a spell reagent.- Parameters:
ingredient- The spell reagent to add.- Returns:
- This builder, for chaining.
-
withReagent
public SpellPartDataProvider.SpellPartDataBuilder withReagent(net.minecraft.world.item.ItemStack stack) Adds a spell reagent.- Parameters:
stack- The spell reagent to add.- Returns:
- This builder, for chaining.
-
withReagent
Adds a spell reagent.- Parameters:
filter- The spell reagent to add.- Returns:
- This builder, for chaining.
-
withIngredient
Adds a spell ingredient.- Parameters:
ingredient- The spell ingredient to add.- Returns:
- This builder, for chaining.
-
withAffinity
public SpellPartDataProvider.SpellPartDataBuilder withAffinity(Supplier<Affinity> affinity, float shift) Adds an affinity.- Parameters:
affinity- The affinity to add.- Returns:
- This builder, for chaining.
-
withAffinity
Adds an affinity.- Parameters:
affinity- The affinity to add.- Returns:
- This builder, for chaining.
-
withAffinity
public SpellPartDataProvider.SpellPartDataBuilder withAffinity(net.minecraft.resources.ResourceLocation affinity, float shift) Adds an affinity.- Parameters:
affinity- The affinity to add.- Returns:
- This builder, for chaining.
-
build
public void build()Builds the spell part data object.
-