Interface IPlantAction

All Known Subinterfaces:
IChomper, IExplodingPlant, IRangedAttacker, ISunProducer, ISupportPlant
All Known Implementing Classes:
AbstractChomper, AbstractExplodingPlant, AbstractLobbingPlant, AbstractMint, AbstractPeaHead, AbstractPeashooter, AbstractRangedPlant, AbstractRangedShroom, AbstractShroom, AbstractSunProducer, AbstractSupportPlant, AbstractWallPlant, Ampliflower, BasePlant, Blover, CabbagePult, Cactus, Cattail, CherryBomb, Chomper, CobCannon, CoffeeBean, Curendula, DarkFlower, DoomShroom, ElectroPea, EnforcemintPlant, ExplodeONut, FirePea, FlowerPot, FrostPea, FumeShroom, Garlic, GatlingPea, GhostPepper, GloomShroom, GoldMagnet, GraveBuster, HypnoShroom, IceShroom, Jalapeno, KernelPult, KnightPea, LightningReed, LilyPad, MagnetShroom, Marigold, MelonPult, MeteorFlower, MoonFlower, MovcadiaPult, MugShroom, Peashooter, Plantern, PlantPartEntity, PotatoMine, PuffShroom, Pumpkin, Repeater, ScaredyShroom, ScatterTail, SeaShroom, ShadowPea, SkullPepper, Snapdragon, SnowPea, SolarPea, Spikerock, Spikeweed, SplitPea, SplitPeaHead, Squash, Starfruit, Sunflower, SunShroom, TallNut, TangleKelp, Threepeater, ThreepeaterHead, Toadstool, Torchwood, TreeOfWisdom, TwinSunflower, UmbrellaLeaf, WallNut, WinterMelon

public interface IPlantAction
  • Method Details

    • isAct

      boolean isAct()
    • setAct

      void setAct(boolean b)
    • getActTick

      float getActTick()
    • setActTick

      void setActTick(float tick)
    • actConfig

      ActionConfig actConfig()
      Configuration for goal actions.
    • repeatActionAnim

      default boolean repeatActionAnim()
    • getDefaultDelay

      default int getDefaultDelay()
    • getStartAnimDelay

      default int getStartAnimDelay()
    • getPreAnimDelay

      default int getPreAnimDelay()
    • getPostAnimDelay

      default int getPostAnimDelay()
    • canUseActionGoal

      @Deprecated default boolean canUseActionGoal(net.minecraft.world.entity.Entity target)
      Deprecated.
      Parameters:
      target - used for attacking actions
      Returns:
      Whether goal should run
    • startAction

      default void startAction()
      Fires when the goal starts
    • stopAction

      default void stopAction()
      Fires when the goal ends
    • preAction

      void preAction()
      Fires when the animation starts.
    • performAction

      void performAction(double damage)
      Fires when the specified getStartAnimDelay() has been reached.
    • postActionTick

      void postActionTick()
      Ticks after performAction(double) fires. (won't work if post delay is 0)
    • resetAction

      void resetAction()
      Fires when at the end of a action cycle.