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
(package private) final ResourceLocation
-
Constructor Summary
ConstructorDescriptionLootTable
(LootContextParamSet p_287716_, ResourceLocation p_287737_, LootPool[] p_287700_, LootItemFunction[] p_287663_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
createStackSplitter
(ServerLevel p_287765_, Consumer<ItemStack> p_251308_) void
fill
(Container p_287662_, LootParams p_287743_, long p_287585_) void
freeze()
getAvailableSlots
(Container p_230920_, RandomSource p_230921_) @Nullable LootPool
private it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack>
getRandomItems
(LootContext p_230923_) void
getRandomItems
(LootContext p_79149_, Consumer<ItemStack> p_79150_) it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack>
getRandomItems
(LootParams p_287616_) it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack>
getRandomItems
(LootParams p_287574_, long p_287773_) void
getRandomItems
(LootParams p_287748_, long p_287729_, Consumer<ItemStack> p_287583_) void
getRandomItems
(LootParams p_287704_, Consumer<ItemStack> p_287617_) void
getRandomItemsRaw
(LootContext p_79132_, Consumer<ItemStack> p_79133_) Deprecated.void
getRandomItemsRaw
(LootParams p_287669_, Consumer<ItemStack> p_287781_) Deprecated.boolean
isFrozen()
static LootTable.Builder
@Nullable LootPool
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
-
randomSequence
-
pools
-
functions
-
compositeFunction
-
isFrozen
private boolean isFrozen -
lootTableId
-
-
Constructor Details
-
LootTable
LootTable(LootContextParamSet p_287716_, @Nullable ResourceLocation p_287737_, LootPool[] p_287700_, LootItemFunction[] p_287663_)
-
-
Method Details
-
createStackSplitter
public static Consumer<ItemStack> createStackSplitter(ServerLevel p_287765_, Consumer<ItemStack> p_251308_) -
getRandomItemsRaw
Deprecated. -
getRandomItemsRaw
Deprecated. -
getRandomItems
-
getRandomItems
-
getRandomItems
-
getRandomItems
public it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> getRandomItems(LootParams p_287574_, long p_287773_) -
getRandomItems
public it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> getRandomItems(LootParams p_287616_) -
getRandomItems
private 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
-