Package net.minecraft.loot
Class LootTable
java.lang.Object
net.minecraft.loot.LootTable
public class LootTable extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLootTable.Builderstatic classLootTable.Serializer -
Field Summary
Fields Modifier and Type Field Description private BiFunction<ItemStack,LootContext,ItemStack>combinedFunctionstatic LootTableEMPTYprivate LootFunction[]functionsstatic LootContextTypeGENERICprivate static LoggerLOGGERprivate LootPool[]poolsprivate LootContextTypetype -
Constructor Summary
Constructors Modifier Constructor Description privateLootTable(LootContextType type, LootPool[] pools, LootFunction[] functions) -
Method Summary
Modifier and Type Method Description static LootTable.Builderbuilder()List<ItemStack>generateLoot(LootContext context)voidgenerateLoot(LootContext context, Consumer<ItemStack> lootConsumer)voidgenerateUnprocessedLoot(LootContext context, Consumer<ItemStack> lootConsumer)private List<Integer>getFreeSlots(Inventory inventory, Random random)LootContextTypegetType()static Consumer<ItemStack>processStacks(Consumer<ItemStack> lootConsumer)private voidshuffle(List<ItemStack> drops, int freeSlots, Random random)voidsupplyInventory(Inventory inventory, LootContext context)voidvalidate(LootTableReporter reporter)
-
Field Details
-
LOGGER
-
EMPTY
-
GENERIC
-
type
-
pools
-
functions
-
combinedFunction
-
-
Constructor Details
-
LootTable
-
-
Method Details
-
processStacks
-
generateUnprocessedLoot
-
generateLoot
-
generateLoot
-
getType
-
validate
-
supplyInventory
-
shuffle
-
getFreeSlots
-
builder
-