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

public class CooldownInteractionCondition extends MutableInteractionCondition
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<CooldownInteractionCondition> CODEC
    • player

      protected DataProvider<net.minecraft.server.level.ServerPlayer> player
    • cooldownKey

      protected net.minecraft.resources.ResourceLocation cooldownKey
    • cooldown

      protected int cooldown
    • unit

      protected TimeUnit 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

      public boolean fits(InteractionContext context)
      Description copied from interface: InteractionCondition
      Method 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