Class RandomSpellFunction

java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
com.binaris.wizardry.content.loot.RandomSpellFunction
All Implemented Interfaces:
BiFunction<net.minecraft.world.item.ItemStack,net.minecraft.world.level.storage.loot.LootContext,net.minecraft.world.item.ItemStack>, net.minecraft.world.level.storage.loot.functions.LootItemFunction, net.minecraft.world.level.storage.loot.LootContextUser

public class RandomSpellFunction extends net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

    net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<T extends net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<T>>
  • Field Summary

    Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

    predicates
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    RandomSpellFunction(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditions, @Nullable List<Spell> spells, boolean ignoreWeighting, float undiscoveredBias, @Nullable List<SpellTier> tiers, @Nullable List<Element> elements)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull net.minecraft.world.level.storage.loot.functions.LootItemFunctionType
     
    protected @NotNull net.minecraft.world.item.ItemStack
    run(net.minecraft.world.item.ItemStack stack, @NotNull net.minecraft.world.level.storage.loot.LootContext lootContext)
     
    static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?>
    setRandomSpell(List<Spell> spells, boolean ignoreWeighting, float undiscoveredBias, List<SpellTier> tiers, List<Element> elements)
     

    Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

    apply, simpleBuilder, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.BiFunction

    andThen

    Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser

    getReferencedContextParams
  • Constructor Details

    • RandomSpellFunction

      protected RandomSpellFunction(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditions, @Nullable @Nullable List<Spell> spells, boolean ignoreWeighting, float undiscoveredBias, @Nullable @Nullable List<SpellTier> tiers, @Nullable @Nullable List<Element> elements)
  • Method Details

    • setRandomSpell

      public static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> setRandomSpell(List<Spell> spells, boolean ignoreWeighting, float undiscoveredBias, List<SpellTier> tiers, List<Element> elements)
    • getType

      @NotNull public @NotNull net.minecraft.world.level.storage.loot.functions.LootItemFunctionType getType()
    • run

      @NotNull protected @NotNull net.minecraft.world.item.ItemStack run(net.minecraft.world.item.ItemStack stack, @NotNull @NotNull net.minecraft.world.level.storage.loot.LootContext lootContext)
      Specified by:
      run in class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction