public class RandomChanceWithLootingLootCondition extends Object implements LootCondition
Modifier and Type | Class and Description |
---|---|
static class |
RandomChanceWithLootingLootCondition.Serializer |
LootCondition.Builder
Modifier and Type | Field and Description |
---|---|
private float |
chance |
private float |
lootingMultiplier |
Modifier | Constructor and Description |
---|---|
private |
RandomChanceWithLootingLootCondition(float chance,
float lootingMultiplier) |
Modifier and Type | Method and Description |
---|---|
static LootCondition.Builder |
builder(float chance,
float lootingMultiplier) |
Set<LootContextParameter<?>> |
getRequiredParameters() |
LootConditionType |
getType() |
boolean |
test(LootContext lootContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validate
private final float chance
private final float lootingMultiplier
private RandomChanceWithLootingLootCondition(float chance, float lootingMultiplier)
public LootConditionType getType()
getType
in interface LootCondition
public Set<LootContextParameter<?>> getRequiredParameters()
getRequiredParameters
in interface LootContextAware
public boolean test(LootContext lootContext)
test
in interface Predicate<LootContext>
public static LootCondition.Builder builder(float chance, float lootingMultiplier)