Class AttackAnimation

java.lang.Object
com.pixelmonmod.pixelmon.api.attackAnimations.AttackAnimation
Direct Known Subclasses:
AttackAnimationLeapForward, AttackAnimationRun, AttackAnimationStationary, AttackAnimationVerticalStomp

public abstract class AttackAnimation extends Object
Interface for animations that occur when attacks are used. Implementations require registration during preInit through AttackAnimationRegistry.
Since:
April 23, 2018
  • Field Details

    • ticks

      public transient int ticks
    • dimension

      public transient net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension
    • startID

      public transient int startID
    • user

      public transient PixelmonWrapper user
    • userPos

      public transient float[] userPos
    • endID

      public transient int endID
    • target

      public transient PixelmonWrapper target
    • targetPos

      public transient float[] targetPos
    • attack

      public transient Attack attack
    • effectiveType

      public transient Element effectiveType
  • Constructor Details

    • AttackAnimation

      public AttackAnimation()
  • Method Details

    • instantiate

      public AttackAnimation instantiate(PixelmonWrapper user, PixelmonWrapper target, Attack attack)
    • initialize

      public void initialize(PixelmonWrapper user, PixelmonWrapper target, Attack attack)
    • tickAnimation

      public abstract boolean tickAnimation(int tick)
      Return true if the animation is complete and the damage can be applied.
    • usedOncePerTurn

      public abstract boolean usedOncePerTurn()
    • sendBattleEffect

      public void sendBattleEffect(AttackAnimationData data, boolean groundedStartPosition, boolean groundedEndPosition)