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

BlockHitResult

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.util.BlockHitResult;

Extends

BlockHitResult extends HitResult.

Members

Getter
script.zs
// BlockHitResult.blockPos as BlockPos
myBlockHitResult.blockPos

Return Type: BlockPos

blockPos() as BlockPos
script.zs
// BlockHitResult.blockPos() as BlockPos;
myBlockHitResult.blockPos();

Return Type: BlockPos

Getter
script.zs
// BlockHitResult.direction as Direction
myBlockHitResult.direction

Return Type: Direction

direction() as Direction
script.zs
// BlockHitResult.direction() as Direction;
myBlockHitResult.direction();

Return Type: Direction

distanceTo(entity as Entity) as double
script.zs
// BlockHitResult.distanceTo(entity as Entity) as double;
myBlockHitResult.distanceTo(myEntity);

Parameters:

entity Type: Entity

Return Type: double

Getter
script.zs
// BlockHitResult.isInside as bool
myBlockHitResult.isInside

Return Type: bool

isInside() as bool
script.zs
// BlockHitResult.isInside() as bool;
myBlockHitResult.isInside();

Return Type: bool

Getter
script.zs
// BlockHitResult.location as Vec3
myBlockHitResult.location

Return Type: Vec3

location() as Vec3
script.zs
// BlockHitResult.location() as Vec3;
myBlockHitResult.location();

Return Type: Vec3

Getter
script.zs
// BlockHitResult.type as Type
myBlockHitResult.type

Return Type: HitResultType

type() as Type
script.zs
// BlockHitResult.type() as Type;
myBlockHitResult.type();

Return Type: HitResultType

withDirection(param0 as Direction) as BlockHitResult
script.zs
// BlockHitResult.withDirection(param0 as Direction) as BlockHitResult;
myBlockHitResult.withDirection(myDirection);

Parameters:

param0 Type: Direction

Return Type: BlockHitResult

withPosition(param0 as BlockPos) as BlockHitResult
script.zs
// BlockHitResult.withPosition(param0 as BlockPos) as BlockHitResult;
myBlockHitResult.withPosition(myBlockPos);

Parameters:

param0 Type: BlockPos

Return Type: BlockHitResult