java.lang.Object
com.pixelmonmod.pixelmon.entities.pixelmon.interactions.custom.PixelmonInteraction
Direct Known Subclasses:
CameruptInteraction, MiltankInteraction, ShearInteraction

public abstract class PixelmonInteraction extends Object
A special interaction with a specific pokemon of Pokémon.
  • Field Details

    • maxInteractions

      public int maxInteractions
      The maximum number of interactions that the Pokémon can store.
    • counter

      public int counter
      The amount of ticks before incrementing the Pokémon's stored interactions.
  • Constructor Details

    • PixelmonInteraction

      public PixelmonInteraction(int maxInteractions)
      Initializes an interaction.
      Parameters:
      maxInteractions - The maximum number of intetractions that the Pokémon can store.
  • Method Details

    • processInteract

      public boolean processInteract(AbstractBaseEntity pixelmon, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack itemstack)
      Handles a player interacting with the Pokémon.
      Parameters:
      player - The player interacting with the Pokémon.
      Returns:
      Whether the interaction caused something to occur.
    • resetCounter

      public void resetCounter(AbstractBaseEntity pixelmon)
      Ticks the timer for incrementing the Pokémon's interactions.
    • getInteraction

      @Nullable public static PixelmonInteraction getInteraction(Species species)
      Gets the interaction for a Pokémon.
      Parameters:
      species - The Pokémon to get an interaction for.
      Returns:
      The interaction for the Pokémon, or null if the Pokémon doesn't have one.