BlockPos

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.math.BlockPos;

Extends

BlockPos extends Vec3i.

Implements

Undocumented Interfaces

Comparable<Vec3i>

Constructors

new(x as int, y as int, z as int)
Creates a new BlockPos using the provided values.
script.zs
// new BlockPos(x as int, y as int, z as int);
new BlockPos(myInt, myInt, myInt);

Parameters:

x Type: int - The x value of the blockpos
y Type: int - The y value of the blockpos
z Type: int - The z value of the blockpos
new(vector as Vec3)
Creates a new BlockPos using the values of the given vector. Note, the values will be floored down, providing 0.85 is the same as providing 0.
script.zs
// new BlockPos(vector as Vec3);
new BlockPos(myVec3);

Parameters:

vector Type: Vec3 - The vector to copy the values of.
new(position as Position)
Creates a new BlockPos using the values of the given position. Note, the values will be floored down, providing 0.85 is the same as providing 0.
script.zs
// new BlockPos(position as Position);
new BlockPos(myPosition);

Parameters:

position Type: Position - The position to copy the values of.
new(vector as Vec3i)
Creates a new BlockPos using the values of the given vector.
script.zs
// new BlockPos(vector as Vec3i);
new BlockPos(myVec3i);

Parameters:

vector Type: Vec3i - The vector to copy the values of.

Members

above() as BlockPos
script.zs
// BlockPos.above() as BlockPos;
myBlockPos.above();

Return Type: BlockPos

above(distance as int) as BlockPos
script.zs
// BlockPos.above(distance as int) as BlockPos;
myBlockPos.above(myInt);

Parameters:

distance Type: int

Return Type: BlockPos

asImmutable() as BlockPos
script.zs
// BlockPos.asImmutable() as BlockPos;
myBlockPos.asImmutable();

Return Type: BlockPos

asLong() as long
script.zs
// BlockPos.asLong() as long;
myBlockPos.asLong();

Return Type: long

asMutable() as MutableBlockPos
script.zs
// BlockPos.asMutable() as MutableBlockPos;
myBlockPos.asMutable();

Return Type: MutableBlockPos

atY(value as int) as BlockPos
script.zs
// BlockPos.atY(value as int) as BlockPos;
myBlockPos.atY(myInt);

Parameters:

value Type: int

Return Type: BlockPos

below() as BlockPos
script.zs
// BlockPos.below() as BlockPos;
myBlockPos.below();

Return Type: BlockPos

below(distance as int) as BlockPos
script.zs
// BlockPos.below(distance as int) as BlockPos;
myBlockPos.below(myInt);

Parameters:

distance Type: int

Return Type: BlockPos

closerThan(other as Vec3i, maxDistance as double) as bool
script.zs
// BlockPos.closerThan(other as Vec3i, maxDistance as double) as bool;
myBlockPos.closerThan(myVec3i, myDouble);

Parameters:

other Type: Vec3i
maxDistance Type: double

Return Type: bool

compareTo(other as Vec3i) as int
script.zs
// BlockPos.compareTo(other as Vec3i) as int;
myBlockPos.compareTo(myVec3i);

Parameters:

other Type: Vec3i

Return Type: int

static containing(x as double, y as double, z as double) as BlockPos
script.zs
// BlockPos.containing(x as double, y as double, z as double) as BlockPos;
BlockPos.containing(myDouble, myDouble, myDouble);

Parameters:

x Type: double
y Type: double
z Type: double

Return Type: BlockPos

cross(other as Vec3i) as BlockPos
script.zs
// BlockPos.cross(other as Vec3i) as BlockPos;
myBlockPos.cross(myVec3i);

Parameters:

other Type: Vec3i

Return Type: BlockPos

distManhattan(other as Vec3i) as int
script.zs
// BlockPos.distManhattan(other as Vec3i) as int;
myBlockPos.distManhattan(myVec3i);

Parameters:

other Type: Vec3i

Return Type: int

distSqr(other as Vec3i) as double
script.zs
// BlockPos.distSqr(other as Vec3i) as double;
myBlockPos.distSqr(myVec3i);

Parameters:

other Type: Vec3i

Return Type: double

distToCenterSqr(position as Position) as double
script.zs
// BlockPos.distToCenterSqr(position as Position) as double;
myBlockPos.distToCenterSqr(myPosition);

Parameters:

position Type: Position

Return Type: double

distToCenterSqr(x as double, y as double, z as double) as double
script.zs
// BlockPos.distToCenterSqr(x as double, y as double, z as double) as double;
myBlockPos.distToCenterSqr(myDouble, myDouble, myDouble);

Parameters:

x Type: double
y Type: double
z Type: double

Return Type: double

east() as BlockPos
script.zs
// BlockPos.east() as BlockPos;
myBlockPos.east();

Return Type: BlockPos

east(distance as int) as BlockPos
script.zs
// BlockPos.east(distance as int) as BlockPos;
myBlockPos.east(myInt);

Parameters:

distance Type: int

Return Type: BlockPos

getValue(axis as Axis) as int
script.zs
// BlockPos.getValue(axis as Axis) as int;
myBlockPos.getValue(myAxis);

Parameters:

axis Type: Axis

Return Type: int

multiply(scalar as int) as BlockPos
script.zs
// BlockPos.multiply(scalar as int) as BlockPos;
myBlockPos.multiply(myInt);

Parameters:

scalar Type: int

Return Type: BlockPos

north() as BlockPos
script.zs
// BlockPos.north() as BlockPos;
myBlockPos.north();

Return Type: BlockPos

north(distance as int) as BlockPos
script.zs
// BlockPos.north(distance as int) as BlockPos;
myBlockPos.north(myInt);

Parameters:

distance Type: int

Return Type: BlockPos

offset(x as int, y as int, z as int) as BlockPos
script.zs
// BlockPos.offset(x as int, y as int, z as int) as BlockPos;
myBlockPos.offset(myInt, myInt, myInt);

Parameters:

x Type: int
y Type: int
z Type: int

Return Type: BlockPos

offset(other as Vec3i) as BlockPos
script.zs
// BlockPos.offset(other as Vec3i) as BlockPos;
myBlockPos.offset(myVec3i);

Parameters:

other Type: Vec3i

Return Type: BlockPos

relative(direction as Direction) as BlockPos
script.zs
// BlockPos.relative(direction as Direction) as BlockPos;
myBlockPos.relative(myDirection);

Parameters:

direction Type: Direction

Return Type: BlockPos

relative(direction as Direction, distance as int) as BlockPos
script.zs
// BlockPos.relative(direction as Direction, distance as int) as BlockPos;
myBlockPos.relative(myDirection, myInt);

Parameters:

direction Type: Direction
distance Type: int

Return Type: BlockPos

relative(axis as Axis, distance as int) as BlockPos
script.zs
// BlockPos.relative(axis as Axis, distance as int) as BlockPos;
myBlockPos.relative(myAxis, myInt);

Parameters:

axis Type: Axis
distance Type: int

Return Type: BlockPos

rotate(rotation as Rotation) as BlockPos
script.zs
// BlockPos.rotate(rotation as Rotation) as BlockPos;
myBlockPos.rotate(myRotation);

Parameters:

rotation Type: Rotation

Return Type: BlockPos

south() as BlockPos
script.zs
// BlockPos.south() as BlockPos;
myBlockPos.south();

Return Type: BlockPos

south(distance as int) as BlockPos
script.zs
// BlockPos.south(distance as int) as BlockPos;
myBlockPos.south(myInt);

Parameters:

distance Type: int

Return Type: BlockPos

subtract(other as Vec3i) as BlockPos
script.zs
// BlockPos.subtract(other as Vec3i) as BlockPos;
myBlockPos.subtract(myVec3i);

Parameters:

other Type: Vec3i

Return Type: BlockPos

Getter
script.zs
// BlockPos.toShortString as string
myBlockPos.toShortString

Return Type: string

toShortString() as string
script.zs
// BlockPos.toShortString() as string;
myBlockPos.toShortString();

Return Type: string

west() as BlockPos
script.zs
// BlockPos.west() as BlockPos;
myBlockPos.west();

Return Type: BlockPos

west(distance as int) as BlockPos
script.zs
// BlockPos.west(distance as int) as BlockPos;
myBlockPos.west(myInt);

Parameters:

distance Type: int

Return Type: BlockPos

Getter
script.zs
// BlockPos.x as int
myBlockPos.x

Return Type: int

x() as int
script.zs
// BlockPos.x() as int;
myBlockPos.x();

Return Type: int

Getter
script.zs
// BlockPos.y as int
myBlockPos.y

Return Type: int

y() as int
script.zs
// BlockPos.y() as int;
myBlockPos.y();

Return Type: int

Getter
script.zs
// BlockPos.z as int
myBlockPos.z

Return Type: int

z() as int
script.zs
// BlockPos.z() as int;
myBlockPos.z();

Return Type: int