Class TickHandlerBase
java.lang.Object
com.pixelmonmod.pixelmon.entities.pixelmon.tickHandlers.TickHandlerBase
- Direct Known Subclasses:
CastformTickHandler
,ShearableTickHandler
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTickHandlerBase
(AbstractBaseEntity pixelmon) TickHandlerBase
(AbstractBaseEntity pixelmon, int refreshRate) Initializes a tick handler. -
Method Summary
Modifier and TypeMethodDescriptionstatic TickHandlerBase
getTickHandler
(PixelmonEntity pixelmon) Gets the tick handler for a Pokémon.protected abstract boolean
onTick
(net.minecraft.world.level.Level world) Overridable tick method where the actual function of the tick handler should be contained.boolean
tick
(net.minecraft.world.level.Level world)
-
Field Details
-
pixelmon
-
-
Constructor Details
-
TickHandlerBase
Initializes a tick handler.- Parameters:
pixelmon
- The Pokémon with the tick handler.
-
TickHandlerBase
-
-
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 tickableAbstractBaseEntity
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
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.
-