Class LootItem
java.lang.Object
net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
net.minecraft.world.level.storage.loot.entries.LootItem
- All Implemented Interfaces:
ComposableEntryContainer
A loot pool entry that always generates a given item.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
LootPoolSingletonContainer.Builder<T extends LootPoolSingletonContainer.Builder<T>>, LootPoolSingletonContainer.DummyBuilder, LootPoolSingletonContainer.EntryBase, LootPoolSingletonContainer.EntryConstructor -
Field Summary
FieldsFields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
compositeFunction, DEFAULT_QUALITY, DEFAULT_WEIGHT, functions, quality, weightFields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
conditionsFields inherited from interface net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer
ALWAYS_FALSE, ALWAYS_TRUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLootItem(Holder<Item> pItem, int pWeight, int pQuality, List<LootItemCondition> pConditions, List<LootItemFunction> pFunctions) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateItemStack(Consumer<ItemStack> p_79590_, LootContext p_79591_) Generate the loot stacks of this entry.getType()static LootPoolSingletonContainer.Builder<?> lootTableItem(ItemLike pItem) 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, commonFieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer
and, or
-
Field Details
-
CODEC
-
item
-
-
Constructor Details
-
LootItem
private LootItem(Holder<Item> pItem, int pWeight, int pQuality, List<LootItemCondition> pConditions, List<LootItemFunction> pFunctions)
-
-
Method Details
-
getType
- Specified by:
getTypein classLootPoolEntryContainer
-
createItemStack
Description copied from class:LootPoolSingletonContainerGenerate the loot stacks of this entry. Contrary to the method name this method does not always generate one stack, it can also generate zero or multiple stacks.- Specified by:
createItemStackin classLootPoolSingletonContainer
-
lootTableItem
-