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 class
LootTable.Builder
static class
LootTable.Serializer
-
Field Summary
Fields Modifier and Type Field Description private BiFunction<ItemStack,LootContext,ItemStack>
combinedFunction
static LootTable
EMPTY
private LootFunction[]
functions
static LootContextType
GENERIC
private static Logger
LOGGER
private LootPool[]
pools
private LootContextType
type
-
Constructor Summary
Constructors Modifier Constructor Description private
LootTable(LootContextType type, LootPool[] pools, LootFunction[] functions)
-
Method Summary
Modifier and Type Method Description static LootTable.Builder
builder()
List<ItemStack>
generateLoot(LootContext context)
void
generateLoot(LootContext context, Consumer<ItemStack> lootConsumer)
void
generateUnprocessedLoot(LootContext context, Consumer<ItemStack> lootConsumer)
private List<Integer>
getFreeSlots(Inventory inventory, Random random)
LootContextType
getType()
static Consumer<ItemStack>
processStacks(Consumer<ItemStack> lootConsumer)
private void
shuffle(List<ItemStack> drops, int freeSlots, Random random)
void
supplyInventory(Inventory inventory, LootContext context)
void
validate(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
-