Class LootPoolEntryDescriptions

java.lang.Object
net.darkhax.bookshelf.common.api.loot.LootPoolEntryDescriptions

public class LootPoolEntryDescriptions extends Object
Provides a system for describing what items can be dropped by a loot table.
  • Field Details

  • Constructor Details

    • LootPoolEntryDescriptions

      public LootPoolEntryDescriptions()
  • Method Details

    • getUniqueItems

      public static List<net.minecraft.world.item.ItemStack> getUniqueItems(@NotNull @NotNull net.minecraft.core.RegistryAccess registries, net.minecraft.world.level.storage.loot.LootTable table)
      Generates a list of unique items that can generate from a loot table.
      Parameters:
      registries - The current registries.
      table - The loot table to examine.
      Returns:
      A list containing the entries.
    • getPotentialItems

      public static void getPotentialItems(@NotNull @NotNull net.minecraft.core.RegistryAccess registries, com.mojang.datafixers.util.Either<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>,net.minecraft.world.level.storage.loot.LootTable> table, Consumer<net.minecraft.world.item.ItemStack> consumer)
      Gets potential drops for a loot table.
      Parameters:
      registries - The current registries.
      table - The loot table to examine.
      consumer - Collects entries in your desired format.
    • getPotentialItems

      public static void getPotentialItems(@NotNull @NotNull net.minecraft.core.RegistryAccess registries, net.minecraft.world.level.storage.loot.LootTable table, Consumer<net.minecraft.world.item.ItemStack> consumer)
      Gets potential drops for a loot table.
      Parameters:
      registries - The current registries.
      table - The loot table to examine.
      consumer - Collects entries in your desired format.
    • getPotentialItems

      public static void getPotentialItems(@NotNull @NotNull net.minecraft.core.RegistryAccess registries, List<net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer> entries, Consumer<net.minecraft.world.item.ItemStack> collector)
      Gets potential drops for a list of loot pool entries.
      Parameters:
      registries - The current registries.
      entries - A list of entries to examine.
      collector - Collects entries in your desired format.
    • getPotentialItems

      public static void getPotentialItems(@NotNull @NotNull net.minecraft.core.RegistryAccess registries, net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entry, Consumer<net.minecraft.world.item.ItemStack> collector)
      Gets potential drops from a loot pool entry.
      Parameters:
      registries - The current registries.
      entry - The pool entry to examine.
      collector - Collects entries in your desired format.