Class LootTable
java.lang.Object
net.minecraft.world.level.storage.loot.LootTable
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BiFunction
<ItemStack, LootContext, ItemStack> static final LootContextParamSet
static final com.mojang.serialization.Codec
<LootTable> static final LootTable
private final List
<LootItemFunction> private boolean
private static final org.slf4j.Logger
private ResourceLocation
private final LootContextParamSet
static final long
private final Optional
<ResourceLocation> -
Constructor Summary
ConstructorDescriptionLootTable
(LootContextParamSet p_287716_, Optional<ResourceLocation> p_298628_, List<LootPool> p_298771_, List<LootItemFunction> p_301234_) -
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_) 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_) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> getRandomItems
(LootParams p_345012_, RandomSource p_344559_) 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
private static final org.slf4j.Logger LOGGER -
EMPTY
-
DEFAULT_PARAM_SET
-
RANDOMIZE_SEED
public static final long RANDOMIZE_SEED- See Also:
-
DIRECT_CODEC
-
CODEC
-
paramSet
-
randomSequence
-
pools
-
functions
-
compositeFunction
-
lootTableId
-
isFrozen
private boolean isFrozen
-
-
Constructor Details
-
LootTable
LootTable(LootContextParamSet p_287716_, Optional<ResourceLocation> p_298628_, List<LootPool> p_298771_, List<LootItemFunction> p_301234_)
-
-
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_345012_, RandomSource p_344559_) -
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
-
setLootTableId
-
getLootTableId
-
removePool
-
addPool
-
freeze
public void freeze() -
isFrozen
public boolean isFrozen() -
checkFrozen
private void checkFrozen()
-