public abstract class LeafEntry extends LootPoolEntry
| Modifier and Type | Class and 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> |
| Modifier and Type | Field and Description |
|---|---|
private LootChoice |
choice |
private BiFunction<ItemStack,LootContext,ItemStack> |
compiledFunctions |
protected LootFunction[] |
functions |
protected int |
quality |
protected int |
weight |
conditionsALWAYS_FALSE, ALWAYS_TRUE| Modifier | Constructor and Description |
|---|---|
protected |
LeafEntry(int weight,
int quality,
LootCondition[] conditions,
LootFunction[] functions) |
| Modifier and Type | Method and 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) |
getType, testclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, orprotected final int weight
protected final int quality
protected final LootFunction[] functions
private final BiFunction<ItemStack,LootContext,ItemStack> compiledFunctions
private final LootChoice choice
protected LeafEntry(int weight,
int quality,
LootCondition[] conditions,
LootFunction[] functions)
public void validate(LootTableReporter reporter)
validate in class LootPoolEntryprotected abstract void generateLoot(Consumer<ItemStack> lootConsumer, LootContext context)
public boolean expand(LootContext context, Consumer<LootChoice> choiceConsumer)
public static LeafEntry.Builder<?> builder(LeafEntry.Factory factory)