Class CooldownInteractionCondition
java.lang.Object
com.pixelmonmod.pixelmon.api.npc.interaction.condition.MutableInteractionCondition
com.pixelmonmod.pixelmon.api.npc.interaction.condition.type.calendar.CooldownInteractionCondition
- All Implemented Interfaces:
InteractionCondition
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CooldownInteractionCondition>protected intprotected net.minecraft.resources.ResourceLocationprotected DataProvider<net.minecraft.server.level.ServerPlayer>protected TimeUnitFields inherited from class com.pixelmonmod.pixelmon.api.npc.interaction.condition.MutableInteractionCondition
codec, constructor, inputTypesFields inherited from interface com.pixelmonmod.pixelmon.api.npc.interaction.condition.InteractionCondition
DIRECT_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCooldownInteractionCondition(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation cooldownKey, int cooldown, TimeUnit unit) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfits(InteractionContext context) Method to check if the given context is correct for the conditionstatic CooldownInteractionConditionof(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation cooldownKey, int cooldown, TimeUnit unit) Methods inherited from class com.pixelmonmod.pixelmon.api.npc.interaction.condition.MutableInteractionCondition
codec, fill, inputTypes, transformData, variableMethods 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
toData
-
Field Details
-
CODEC
-
player
-
cooldownKey
protected net.minecraft.resources.ResourceLocation cooldownKey -
cooldown
protected int cooldown -
unit
-
-
Constructor Details
-
CooldownInteractionCondition
protected CooldownInteractionCondition(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation cooldownKey, int cooldown, TimeUnit unit)
-
-
Method Details
-
of
public static CooldownInteractionCondition of(DataProvider<net.minecraft.server.level.ServerPlayer> player, net.minecraft.resources.ResourceLocation cooldownKey, int cooldown, TimeUnit unit) -
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
-