Class MovementDescend
java.lang.Object
com.zenith.feature.pathfinder.movement.Movement
com.zenith.feature.pathfinder.movement.movements.MovementDescend
- All Implemented Interfaces:
IMovement
-
Field Summary
FieldsFields inherited from class com.zenith.feature.pathfinder.movement.Movement
ctx, dest, HORIZONTALS_BUT_ALSO_DOWN_____SO_EVERY_DIRECTION_EXCEPT_UP, positionsToBreak, positionToPlace, src, toBreakCached, toPlaceCached, toWalkIntoCached -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateCost(CalculationContext context) static voidcost(CalculationContext context, int x, int y, int z, int destX, int destZ, MutableMoveResult res) static booleandynamicFallCost(CalculationContext context, int x, int y, int z, int destX, int destZ, double frontBreak, int below, MutableMoveResult res) voidCalled by PathExecutor if needing safeMode can only be detected with knowledge about the next movementvoidreset()Resets the current state status toMovementStatus.PREPPINGbooleansafeMode()booleanupdateState(MovementState state) Calculate latest movement state.Methods inherited from class com.zenith.feature.pathfinder.movement.Movement
calculatedWhileLoaded, checkLoadedChunk, getCost, getCost, getDest, getDirection, getSrc, getValidPositions, override, playerInValidPosition, prepared, recalculateCost, resetBlockCache, safeToCancel, safeToCancel, toBreak, toPlace, toWalkInto, update
-
Field Details
-
forceSafeMode
public boolean forceSafeMode
-
-
Constructor Details
-
MovementDescend
-
-
Method Details
-
reset
-
forceSafeMode
public void forceSafeMode()Called by PathExecutor if needing safeMode can only be detected with knowledge about the next movement -
calculateCost
- Specified by:
calculateCostin classMovement
-
calculateValidPositions
- Specified by:
calculateValidPositionsin classMovement
-
cost
public static void cost(CalculationContext context, int x, int y, int z, int destX, int destZ, MutableMoveResult res) -
dynamicFallCost
public static boolean dynamicFallCost(CalculationContext context, int x, int y, int z, int destX, int destZ, double frontBreak, int below, MutableMoveResult res) -
updateState
Description copied from class:MovementCalculate latest movement state. Gets called once a tick.- Overrides:
updateStatein classMovement- Parameters:
state- The current state- Returns:
- The new state
-
safeMode
public boolean safeMode() -
skipToAscend
public boolean skipToAscend()
-