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_299055_, List<LootPool> p_298390_, List<LootItemFunction> p_298775_) -
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
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
-
isFrozen
private boolean isFrozen -
lootTableId
-
-
Constructor Details
-
LootTable
LootTable(LootContextParamSet p_287716_, Optional<ResourceLocation> p_299055_, List<LootPool> p_298390_, List<LootItemFunction> p_298775_)
-
-
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
-