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 Summary
Modifier and TypeMethodDescriptionConfiguration for goal actions.default booleancanUseActionGoal(net.minecraft.world.entity.Entity target) Deprecated.floatdefault intdefault intdefault intdefault intbooleanisAct()voidperformAction(double damage) Fires when the specifiedgetStartAnimDelay()has been reached.voidTicks afterperformAction(double)fires.voidFires when the animation starts.default booleanvoidFires when at the end of a action cycle.voidsetAct(boolean b) voidsetActTick(float tick) default voidFires when the goal startsdefault voidFires when the goal ends
-
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.- 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 specifiedgetStartAnimDelay()has been reached. -
postActionTick
void postActionTick()Ticks afterperformAction(double)fires. (won't work if post delay is 0) -
resetAction
void resetAction()Fires when at the end of a action cycle.
-