Class LootItemStack
java.lang.Object
net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
net.darkhax.bookshelf.common.impl.data.loot.entries.LootItemStack
- All Implemented Interfaces:
net.minecraft.world.level.storage.loot.Validatable
public class LootItemStack
extends net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
A LootPool entry type that produces copies of predefined ItemStack.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer.Builder<T>, net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer.EntryBase, net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer.EntryConstructor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.level.storage.loot.entries.ComposableEntryContainerstatic final net.minecraft.world.level.storage.loot.entries.ComposableEntryContainerstatic final com.mojang.serialization.MapCodec<LootItemStack> Fields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
DEFAULT_QUALITY, DEFAULT_WEIGHT, functions, quality, weightFields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
conditions -
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.world.level.storage.loot.entries.ComposableEntryContainerand(net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer arg0) @NotNull com.mojang.serialization.MapCodec<? extends net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer> codec()protected voidcreateItemStack(Consumer<net.minecraft.world.item.ItemStack> consumer, @NotNull net.minecraft.world.level.storage.loot.LootContext context) net.minecraft.world.item.ItemStackTemplatestatic LootItemStackof(net.minecraft.world.item.ItemStackTemplate template, int weight) static LootItemStackof(net.minecraft.world.item.ItemStackTemplate template, int weight, int quality) default net.minecraft.world.level.storage.loot.entries.ComposableEntryContaineror(net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer arg0) Methods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
expand, simpleBuilder, singletonFields, validateMethods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
canRun, commonFields
-
Field Details
-
MAP_CODEC
-
ALWAYS_FALSE
static final net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer ALWAYS_FALSE -
ALWAYS_TRUE
static final net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer ALWAYS_TRUE
-
-
Method Details
-
getTemplate
public net.minecraft.world.item.ItemStackTemplate getTemplate() -
codec
@NotNull public @NotNull com.mojang.serialization.MapCodec<? extends net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer> codec()- Specified by:
codecin classnet.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
-
createItemStack
protected void createItemStack(Consumer<net.minecraft.world.item.ItemStack> consumer, @NotNull @NotNull net.minecraft.world.level.storage.loot.LootContext context) - Specified by:
createItemStackin classnet.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
-
of
public static LootItemStack of(net.minecraft.world.item.ItemStackTemplate template, int weight, int quality) -
of
-
and
default net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer and(net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer arg0) -
or
default net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer or(net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer arg0)
-