Home Commands Examples Getting Started With Scripts Global Keywords 1.21 Migration Guide
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

PistonMath

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.block.type.piston.PistonMath;

Members

static getMovementArea(area as AABB, direction as Direction, progress as double) as AABB
Gets the movement area of a piston.

Returns: The movement area of the piston.

script.zs
// PistonMath.getMovementArea(area as AABB, direction as Direction, progress as double) as AABB;
PistonMath.getMovementArea(myAABB, myDirection, myDouble);

Parameters:

area Type: AABB - The area of the piston.
direction Type: Direction - The direction of the piston.
progress Type: double - The progress of the piston.

Return Type: AABB