Class MovementDiagonal
java.lang.Object
com.zenith.feature.pathfinder.movement.Movement
com.zenith.feature.pathfinder.movement.movements.MovementDiagonal
- All Implemented Interfaces:
IMovement
-
Field Summary
Fields inherited from class 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) protected booleanprepared(MovementState state) protected booleansafeToCancel(MovementState state) toBreak()toString()updateState(MovementState state) Calculate latest movement state.Methods inherited from class Movement
calculatedWhileLoaded, checkLoadedChunk, getCost, getCost, getDest, getDirection, getSrc, getValidPositions, override, playerInValidPosition, recalculateCost, reset, resetBlockCache, safeToCancel, toPlace, update
-
Constructor Details
-
MovementDiagonal
-
-
Method Details
-
safeToCancel
- Overrides:
safeToCancelin classMovement
-
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) -
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
-
prepared
-
toBreak
-
toWalkInto
- Overrides:
toWalkIntoin classMovement
-
toString
-