Class RandomChanceInteractionCondition
java.lang.Object
com.pixelmonmod.pixelmon.api.npc.interaction.condition.ImmutableInteractionCondition
com.pixelmonmod.pixelmon.api.npc.interaction.condition.type.math.RandomChanceInteractionCondition
- All Implemented Interfaces:
InteractionCondition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doublestatic final com.mojang.serialization.Codec<RandomChanceInteractionCondition>Fields inherited from class com.pixelmonmod.pixelmon.api.npc.interaction.condition.ImmutableInteractionCondition
codecFields inherited from interface com.pixelmonmod.pixelmon.api.npc.interaction.condition.InteractionCondition
DIRECT_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfits(InteractionContext context) Method to check if the given context is correct for the conditionof(double chance) Methods inherited from class com.pixelmonmod.pixelmon.api.npc.interaction.condition.ImmutableInteractionCondition
codecMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pixelmonmod.pixelmon.api.npc.interaction.condition.InteractionCondition
fill, inputTypes, toData
-
Field Details
-
CODEC
-
chance
protected double chance
-
-
Constructor Details
-
RandomChanceInteractionCondition
protected RandomChanceInteractionCondition(double chance)
-
-
Method Details
-
of
-
fits
Description copied from interface:InteractionConditionMethod to check if the given context is correct for the condition- Parameters:
context- The context- Returns:
- True if the logic can proceed with the given context
-