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.
import crafttweaker . api.util.math . BlockPos;
BlockPos extends Vec3i
.
Undocumented Interfaces Comparable <Vec3i >
Creates a new BlockPos using the provided values. // new BlockPos(x as int, y as int, z as int);
new BlockPos(myInt, myInt, myInt);
Parameters:
x: int
Type: int
- The x value of the blockpos
y: int
Type: int
- The y value of the blockpos
z: int
Type: int
- The z value of the blockpos
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. // new BlockPos(vector as Vec3);
Parameters:
vector: Vec3
Type: Vec3
- The vector to copy the values of. 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. // new BlockPos(position as Position);
new BlockPos(myPosition);
Creates a new BlockPos using the values of the given vector. // new BlockPos(vector as Vec3i);
Parameters:
vector: Vec3i
Type: Vec3i
- The vector to copy the values of. // BlockPos.above() as BlockPos;
Return Type:
BlockPos
// BlockPos.above(distance as int) as BlockPos;
Return Type:
BlockPos
// BlockPos.asImmutable() as BlockPos;
myBlockPos . asImmutable();
Return Type:
BlockPos
// BlockPos.asLong() as long;
Return Type:
long
// BlockPos.atY(value as int) as BlockPos;
Return Type:
BlockPos
// BlockPos.below() as BlockPos;
Return Type:
BlockPos
// BlockPos.below(distance as int) as BlockPos;
Return Type:
BlockPos
// BlockPos.closerThan(other as Vec3i, maxDistance as double) as bool;
myBlockPos . closerThan(myVec3i, myDouble);
Parameters:
maxDistance: double
Type: double
Return Type:
bool
// BlockPos.compareTo(other as Vec3i) as int;
myBlockPos . compareTo(myVec3i);
Return Type:
int
// BlockPos.containing(x as double, y as double, z as double) as BlockPos;
BlockPos . containing(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
Return Type:
BlockPos
// BlockPos.cross(other as Vec3i) as BlockPos;
myBlockPos . cross(myVec3i);
Return Type:
BlockPos
// BlockPos.distManhattan(other as Vec3i) as int;
myBlockPos . distManhattan(myVec3i);
Return Type:
int
// BlockPos.distSqr(other as Vec3i) as double;
myBlockPos . distSqr(myVec3i);
Return Type:
double
// BlockPos.distToCenterSqr(position as Position) as double;
myBlockPos . distToCenterSqr(myPosition);
Return Type:
double
// BlockPos.distToCenterSqr(x as double, y as double, z as double) as double;
myBlockPos . distToCenterSqr(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
Return Type:
double
// BlockPos.east() as BlockPos;
Return Type:
BlockPos
// BlockPos.east(distance as int) as BlockPos;
Return Type:
BlockPos
// BlockPos.getValue(axis as Axis) as int;
myBlockPos . getValue(myAxis);
Return Type:
int
// BlockPos.multiply(scalar as int) as BlockPos;
myBlockPos . multiply(myInt);
Return Type:
BlockPos
// BlockPos.north() as BlockPos;
Return Type:
BlockPos
// BlockPos.north(distance as int) as BlockPos;
Return Type:
BlockPos
// BlockPos.offset(x as int, y as int, z as int) as BlockPos;
myBlockPos . offset(myInt, myInt, myInt);
Parameters:
x: int
Type: int
y: int
Type: int
z: int
Type: int
Return Type:
BlockPos
// BlockPos.offset(other as Vec3i) as BlockPos;
myBlockPos . offset(myVec3i);
Return Type:
BlockPos
// BlockPos.relative(direction as Direction) as BlockPos;
myBlockPos . relative(myDirection);
Return Type:
BlockPos
// BlockPos.relative(direction as Direction, distance as int) as BlockPos;
myBlockPos . relative(myDirection, myInt);
Return Type:
BlockPos
// BlockPos.relative(axis as Axis, distance as int) as BlockPos;
myBlockPos . relative(myAxis, myInt);
Return Type:
BlockPos
// BlockPos.rotate(rotation as Rotation) as BlockPos;
myBlockPos . rotate(myRotation);
Return Type:
BlockPos
// BlockPos.south() as BlockPos;
Return Type:
BlockPos
// BlockPos.south(distance as int) as BlockPos;
Return Type:
BlockPos
// BlockPos.subtract(other as Vec3i) as BlockPos;
myBlockPos . subtract(myVec3i);
Return Type:
BlockPos
// BlockPos.toShortString as string
Return Type:
string
// BlockPos.toShortString() as string;
myBlockPos . toShortString();
Return Type:
string
// BlockPos.west() as BlockPos;
Return Type:
BlockPos
// BlockPos.west(distance as int) as BlockPos;
Return Type:
BlockPos