Class AddPerWorldPatternToScrollFunc

java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
at.petrak.hexcasting.common.loot.AddPerWorldPatternToScrollFunc
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 AddPerWorldPatternToScrollFunc extends net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
Slap a random per-world pattern on the scroll.

The function itself is only used on Fabric but the behavior doStatic(net.minecraft.world.item.ItemStack, net.minecraft.util.RandomSource, net.minecraft.server.level.ServerLevel) is used on both sides

  • 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
    Constructor
    Description
    AddPerWorldPatternToScrollFunc(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] lootItemConditions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.ItemStack
    doStatic(net.minecraft.world.item.ItemStack stack, net.minecraft.util.RandomSource rand, net.minecraft.server.level.ServerLevel overworld)
    This doesn't actually have any params so extract behaviour out for the benefit of forge
    net.minecraft.world.level.storage.loot.functions.LootItemFunctionType
     
    protected net.minecraft.world.item.ItemStack
    run(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext ctx)
     

    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

    • AddPerWorldPatternToScrollFunc

      public AddPerWorldPatternToScrollFunc(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] lootItemConditions)
  • Method Details

    • doStatic

      public static net.minecraft.world.item.ItemStack doStatic(net.minecraft.world.item.ItemStack stack, net.minecraft.util.RandomSource rand, net.minecraft.server.level.ServerLevel overworld)
      This doesn't actually have any params so extract behaviour out for the benefit of forge
    • run

      protected net.minecraft.world.item.ItemStack run(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext ctx)
      Specified by:
      run in class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
    • getType

      public net.minecraft.world.level.storage.loot.functions.LootItemFunctionType getType()