Class ActionConfig
java.lang.Object
nokunami.floral_warfare.common.entity.ActionConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction(int interval, int preDelay, int postDelay) action(ActionIntervalSupplier<net.minecraft.world.entity.Mob> supplier) Applies a ActionInterval with a function.actionInterval(net.minecraft.world.entity.Mob mob) actionPredicate(Predicate<net.minecraft.world.entity.Mob> predicate) booleanactState()actStatus(boolean config) Sets the Act Status whilest performing action, useful for animations and texture swaping.Predicate<net.minecraft.world.entity.Mob>booleancanUseGoal(net.minecraft.world.entity.Mob entity) Consumer<net.minecraft.world.entity.Mob>goalTick()ActionIntervalSupplier<net.minecraft.world.entity.Mob>onGoalTick(Consumer<net.minecraft.world.entity.Mob> predicate) range(double actionRange) range(double actionRange, double maxRange) range(net.minecraft.world.entity.Mob mob) range(ActionRangeSupplier<net.minecraft.world.entity.Mob> supplier) Applies a ActionRange with a function.ActionRangeSupplier<net.minecraft.world.entity.Mob>repeat(int times, boolean animation) repeat(ToIntFunction<net.minecraft.world.entity.Mob> times, Predicate<net.minecraft.world.entity.Mob> resetPredicate, boolean animation) intrepeatAmount(net.minecraft.world.entity.Mob mob) booleanrepeatAnimation(boolean repeat) Whether to repeat the attack animation or not, only applies to burst attacks.Predicate<net.minecraft.world.entity.Mob>booleanresetRepeats(net.minecraft.world.entity.Mob entity) shouldAlwaysTick(Predicate<net.minecraft.world.entity.Mob> predicate) booleanshouldUpdateEveryTick(net.minecraft.world.entity.Mob mob) voidtickGoal(net.minecraft.world.entity.Mob entity)
-
Constructor Details
-
ActionConfig
public ActionConfig()
-
-
Method Details
-
actState
public boolean actState() -
repeatAnim
public boolean repeatAnim() -
resetRepeats
-
resetRepeats
public boolean resetRepeats(net.minecraft.world.entity.Mob entity) -
repeatAmount
public int repeatAmount(net.minecraft.world.entity.Mob mob) -
intervalSupplier
-
actionInterval
-
rangeSupplier
-
range
-
goalTick
-
tickGoal
public void tickGoal(net.minecraft.world.entity.Mob entity) -
canUseGoal
-
canUseGoal
public boolean canUseGoal(net.minecraft.world.entity.Mob entity) -
shouldUpdateEveryTick
public boolean shouldUpdateEveryTick(net.minecraft.world.entity.Mob mob) -
actStatus
Sets the Act Status whilest performing action, useful for animations and texture swaping.
-
repeatAnimation
Whether to repeat the attack animation or not, only applies to burst attacks.
-
repeat
-
repeat
public ActionConfig repeat(int times, Predicate<net.minecraft.world.entity.Mob> resetPredicate, boolean animation) -
repeat
public ActionConfig repeat(ToIntFunction<net.minecraft.world.entity.Mob> times, Predicate<net.minecraft.world.entity.Mob> resetPredicate, boolean animation) -
action
- Parameters:
interval- Sets the interval for action.preDelay- Sets the ticks before to play animation before performing Action.postDelay- Sets the ticks after performing action. (used for post effects like fire breath, etc.)
-
action
Applies a ActionInterval with a function. -
range
- Parameters:
actionRange- Sets the range for action.
-
range
- Parameters:
actionRange- Sets the range for action, if target is within this range it will perform the action.maxRange- Sets the max distance, if target is greater than this, it'll forget.
-
range
Applies a ActionRange with a function. -
actionPredicate
- Parameters:
predicate- Defines a predicate to use action goal.
-
shouldAlwaysTick
- Parameters:
predicate- Defines a predicate to check if goal should update on every tick.
-
onGoalTick
- Parameters:
predicate- Defines a predicate to consumer to tick when goal is active.
-