Package net.minecraft.loot.condition
Class RandomChanceLootCondition
java.lang.Object
net.minecraft.loot.condition.RandomChanceLootCondition
- All Implemented Interfaces:
Predicate<LootContext>,LootCondition,LootContextAware
public class RandomChanceLootCondition extends Object implements LootCondition
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRandomChanceLootCondition.SerializerNested classes/interfaces inherited from interface net.minecraft.loot.condition.LootCondition
LootCondition.Builder -
Field Summary
Fields Modifier and Type Field Description private floatchance -
Constructor Summary
Constructors Modifier Constructor Description privateRandomChanceLootCondition(float chance) -
Method Summary
Modifier and Type Method Description static LootCondition.Builderbuilder(float chance)LootConditionTypegetType()booleantest(LootContext lootContext)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParameters, validate
-
Field Details
-
chance
private final float chance
-
-
Constructor Details
-
RandomChanceLootCondition
private RandomChanceLootCondition(float chance)
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceLootCondition
-
test
- Specified by:
testin interfacePredicate<LootContext>
-
builder
-