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

PistonStructureResolver

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.PistonStructureResolver;

Members

Getter
Gets the direction that the piston is moving.

This is usually the direction that the piston block is facing, however if the piston is retracting, the direction is the opposite.

script.zs
// PistonStructureResolver.pushDirection as Direction
myPistonStructureResolver.pushDirection

Return Type: Direction

pushDirection() as Direction
Gets the direction that the piston is moving.

This is usually the direction that the piston block is facing, however if the piston is retracting, the direction is the opposite.

Returns: The direction that the piston is moving.

script.zs
// PistonStructureResolver.pushDirection() as Direction;
myPistonStructureResolver.pushDirection();

Return Type: Direction

resolve() as bool
Calculates and caches the blocks to push and the blocks to destroy.

Returns: True if blocks should move, false otherwise

script.zs
// PistonStructureResolver.resolve() as bool;
myPistonStructureResolver.resolve();

Return Type: bool

Getter
Gets the blocks that will be destroyed by pushing the piston.
script.zs
// PistonStructureResolver.toDestroy as List<BlockPos>
myPistonStructureResolver.toDestroy

Return Type: List<BlockPos>

toDestroy() as List<BlockPos>
Gets the blocks that will be destroyed by pushing the piston.

Returns: The blocks that will be destroyed.

script.zs
// PistonStructureResolver.toDestroy() as List<BlockPos>;
myPistonStructureResolver.toDestroy();

Return Type: List<BlockPos>

Getter
Gets the blocks that will be pushed.
script.zs
// PistonStructureResolver.toPush as List<BlockPos>
myPistonStructureResolver.toPush

Return Type: List<BlockPos>

toPush() as List<BlockPos>
Gets the blocks that will be pushed.

Returns: The blocks that will be pushed.

script.zs
// PistonStructureResolver.toPush() as List<BlockPos>;
myPistonStructureResolver.toPush();

Return Type: List<BlockPos>