PistonStructureResolver
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Methods
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.
Return Type: Direction
Gets the blocks that will be destroyed by pushing the piston.
Returns: The blocks that will be destroyed.
Return Type: stdlib.List<BlockPos>
Gets the blocks that will be pushed.
Returns: The blocks that will be pushed.
Return Type: stdlib.List<BlockPos>
Calculates and caches the blocks to push and the blocks to destroy.
Returns: True if blocks should move, false otherwise
Return Type: boolean
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name pushDirection | Type Direction | Has Getter true | Has Setter false | Description 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. |
Name toDestroy | Type stdlib.List<BlockPos> | Has Getter true | Has Setter false | Description Gets the blocks that will be destroyed by pushing the piston. |
Name toPush | Type stdlib.List<BlockPos> | Has Getter true | Has Setter false | Description Gets the blocks that will be pushed. |