Class LootPoolEntryDescriptions
java.lang.Object
net.darkhax.bookshelf.common.api.loot.LootPoolEntryDescriptions
Provides a system for describing what items can be dropped by a loot table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LootPoolEntryDescriberstatic final LootPoolEntryDescriberstatic final LootPoolEntryDescriberstatic final LootPoolEntryDescriberstatic final LootPoolEntryDescriberstatic final LootPoolEntryDescriberstatic final LootPoolEntryDescriber -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidgetPotentialItems(@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.static voidgetPotentialItems(@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.static voidgetPotentialItems(@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.static voidgetPotentialItems(@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.static List<net.minecraft.world.item.ItemStack> getUniqueItems(@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.
-
Field Details
-
EMPTY
-
ITEM
-
LOOT_TABLE
-
DYNAMIC
-
TAG
-
COMPOSITE
-
ITEM_STACK
-
-
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.
-