Class LootTable
java.lang.Object
net.minecraft.world.level.storage.loot.LootTable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BiFunction<ItemStack,
LootContext, ItemStack> static final LootContextParamSet
static final LootTable
(package private) final LootItemFunction[]
private boolean
(package private) static final org.slf4j.Logger
private ResourceLocation
(package private) final LootContextParamSet
-
Constructor Summary
ConstructorDescriptionLootTable
(LootContextParamSet p_79114_, LootPool[] p_79115_, LootItemFunction[] p_79116_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
createStackSplitter
(Consumer<ItemStack> p_79143_) void
fill
(Container p_79124_, LootContext p_79125_) void
freeze()
getAvailableSlots
(Container p_230920_, RandomSource p_230921_) it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack>
getRandomItems
(LootContext p_230923_) void
getRandomItems
(LootContext p_79149_, Consumer<ItemStack> p_79150_) Deprecated.void
getRandomItemsRaw
(LootContext p_79132_, Consumer<ItemStack> p_79133_) boolean
isFrozen()
static LootTable.Builder
removePool
(String name) void
private void
shuffleAndSplitItems
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> p_230925_, int p_230926_, RandomSource p_230927_) void
validate
(ValidationContext p_79137_)
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
EMPTY
-
DEFAULT_PARAM_SET
-
paramSet
-
pools
-
functions
-
compositeFunction
-
isFrozen
private boolean isFrozen -
lootTableId
-
-
Constructor Details
-
LootTable
LootTable(LootContextParamSet p_79114_, LootPool[] p_79115_, LootItemFunction[] p_79116_)
-
-
Method Details
-
createStackSplitter
-
getRandomItemsRaw
-
getRandomItems
Deprecated. -
getRandomItems
public it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> getRandomItems(LootContext p_230923_) -
getParamSet
-
validate
-
fill
-
shuffleAndSplitItems
private void shuffleAndSplitItems(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> p_230925_, int p_230926_, RandomSource p_230927_) -
getAvailableSlots
-
lootTable
-
freeze
public void freeze() -
isFrozen
public boolean isFrozen() -
checkFrozen
private void checkFrozen() -
setLootTableId
-
getLootTableId
-
getPool
-
removePool
-
addPool
-