java.lang.Object
com.pixelmonmod.pixelmon.entities.pixelmon.tickHandlers.TickHandlerBase
Direct Known Subclasses:
CastformTickHandler, ShearableTickHandler

public abstract class TickHandlerBase extends Object
  • Field Details

  • Constructor Details

    • TickHandlerBase

      public TickHandlerBase(AbstractBaseEntity pixelmon, int refreshRate)
      Initializes a tick handler.
      Parameters:
      pixelmon - The Pokémon with the tick handler.
    • TickHandlerBase

      public TickHandlerBase(AbstractBaseEntity pixelmon)
  • Method Details

    • onTick

      protected abstract boolean onTick(net.minecraft.world.level.Level world)
      Overridable tick method where the actual function of the tick handler should be contained.
      Parameters:
      world - The world the tickable AbstractBaseEntity is in.
      Returns:
      Whether to remove this tick handler from the entity or not.
    • tick

      public boolean tick(net.minecraft.world.level.Level world)
    • getTickHandler

      public static TickHandlerBase getTickHandler(PixelmonEntity pixelmon)
      Gets the tick handler for a Pokémon.
      Parameters:
      pixelmon - The Pokémon to get the tick handler for.
      Returns:
      The tick handler for the Pokémon, or null if the Pokémon doesn't have one.