public abstract class LeafEntry extends LootEntry
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 |
conditions
ALWAYS_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) |
void |
check(LootTableReporter lootTableReporter) |
protected abstract void |
drop(Consumer<ItemStack> itemDropper,
LootContext context) |
boolean |
expand(LootContext lootContext,
Consumer<LootChoice> consumer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, or
protected 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 check(LootTableReporter lootTableReporter)
protected abstract void drop(Consumer<ItemStack> itemDropper, LootContext context)
public boolean expand(LootContext lootContext, Consumer<LootChoice> consumer)
public static LeafEntry.Builder<?> builder(LeafEntry.Factory factory)