public abstract class ConditionalLootFunction extends Object implements LootFunction
Modifier and Type | Class and Description |
---|---|
static class |
ConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>> |
(package private) static class |
ConditionalLootFunction.Joiner |
static class |
ConditionalLootFunction.Serializer<T extends ConditionalLootFunction> |
Modifier and Type | Field and Description |
---|---|
protected LootCondition[] |
conditions |
private Predicate<LootContext> |
predicate |
Modifier | Constructor and Description |
---|---|
protected |
ConditionalLootFunction(LootCondition[] conditions) |
Modifier and Type | Method and Description |
---|---|
ItemStack |
apply(ItemStack itemStack,
LootContext lootContext) |
protected static ConditionalLootFunction.Builder<?> |
builder(Function<LootCondition[],LootFunction> joiner) |
protected abstract ItemStack |
process(ItemStack stack,
LootContext context) |
void |
validate(LootTableReporter reporter) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, getType
getRequiredParameters
andThen
protected final LootCondition[] conditions
private final Predicate<LootContext> predicate
protected ConditionalLootFunction(LootCondition[] conditions)
public final ItemStack apply(ItemStack itemStack, LootContext lootContext)
apply
in interface BiFunction<ItemStack,LootContext,ItemStack>
protected abstract ItemStack process(ItemStack stack, LootContext context)
public void validate(LootTableReporter reporter)
validate
in interface LootContextAware
protected static ConditionalLootFunction.Builder<?> builder(Function<LootCondition[],LootFunction> joiner)