public class AlternativeLootCondition extends Object implements LootCondition
Modifier and Type | Class and Description |
---|---|
static class |
AlternativeLootCondition.Builder |
static class |
AlternativeLootCondition.Serializer |
Modifier and Type | Field and Description |
---|---|
private Predicate<LootContext> |
predicate |
private LootCondition[] |
terms |
Modifier | Constructor and Description |
---|---|
private |
AlternativeLootCondition(LootCondition[] terms) |
Modifier and Type | Method and Description |
---|---|
static AlternativeLootCondition.Builder |
builder(LootCondition.Builder[] terms) |
LootConditionType |
getType() |
boolean |
test(LootContext lootContext) |
void |
validate(LootTableReporter reporter) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRequiredParameters
private final LootCondition[] terms
private final Predicate<LootContext> predicate
private AlternativeLootCondition(LootCondition[] terms)
public LootConditionType getType()
getType
in interface LootCondition
public final boolean test(LootContext lootContext)
test
in interface Predicate<LootContext>
public void validate(LootTableReporter reporter)
validate
in interface LootContextAware
public static AlternativeLootCondition.Builder builder(LootCondition.Builder[] terms)