Package net.minecraft.loot.entry
Class LeafEntry
java.lang.Object
net.minecraft.loot.entry.LootPoolEntry
net.minecraft.loot.entry.LeafEntry
- All Implemented Interfaces:
EntryCombiner
- Direct Known Subclasses:
DynamicEntry
,EmptyEntry
,ItemEntry
,LootTableEntry
,TagEntry
public abstract class LeafEntry extends LootPoolEntry
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
LeafEntry.BasicBuilder
static class
LeafEntry.Builder<T extends LeafEntry.Builder<T>>
class
LeafEntry.Choice
static interface
LeafEntry.Factory
static class
LeafEntry.Serializer<T extends LeafEntry>
-
Field Summary
Fields Modifier and Type Field Description private LootChoice
choice
private BiFunction<ItemStack,LootContext,ItemStack>
compiledFunctions
protected LootFunction[]
functions
protected int
quality
protected int
weight
Fields inherited from class net.minecraft.loot.entry.LootPoolEntry
conditions
Fields inherited from interface net.minecraft.loot.entry.EntryCombiner
ALWAYS_FALSE, ALWAYS_TRUE
-
Constructor Summary
Constructors Modifier Constructor Description protected
LeafEntry(int weight, int quality, LootCondition[] conditions, LootFunction[] functions)
-
Method Summary
Modifier and Type Method Description static LeafEntry.Builder<?>
builder(LeafEntry.Factory factory)
boolean
expand(LootContext context, Consumer<LootChoice> choiceConsumer)
protected abstract void
generateLoot(Consumer<ItemStack> lootConsumer, LootContext context)
void
validate(LootTableReporter reporter)
Methods inherited from class net.minecraft.loot.entry.LootPoolEntry
getType, test
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.loot.entry.EntryCombiner
and, or
-
Field Details
-
weight
protected final int weight -
quality
protected final int quality -
functions
-
compiledFunctions
-
choice
-
-
Constructor Details
-
LeafEntry
-
-
Method Details
-
validate
- Overrides:
validate
in classLootPoolEntry
-
generateLoot
-
expand
-
builder
-