Импорт класса

Link to импорт-класса

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.

ZenScript
Copy
import crafttweaker.api.util.math.BlockPos;

BlockPos extends Vec3i. That means all methods available in Vec3i are also available in 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.

ZenScript
Copy
new BlockPos(vector as Vec3) as BlockPos
new BlockPos(new Vec3(0, 1, 2));
ПараметрТипОписание
Параметр
vector
Тип
Vec3
Описание
The vector to copy the values of.

Creates a new BlockPos using the provided values.

ZenScript
Copy
new BlockPos(x as int, y as int, z as int) as BlockPos
new BlockPos(0, 1, 2);
ПараметрТипОписание
Параметр
x
Тип
int
Описание
The x value of the blockpos
Параметр
y
Тип
int
Описание
The y value of the blockpos
Параметр
z
Тип
int
Описание
The z value of the blockpos

Name: above

Return Type: BlockPos

ZenScript
Copy
// BlockPos.above() as BlockPos

myBlockPos.above();

Name: above

Return Type: BlockPos

ZenScript
Copy
BlockPos.above(distance as int) as BlockPos
ПараметрТипОписание
Параметр
distance
Тип
int
Описание
No Description Provided

Name: asImmutable

Return Type: BlockPos

ZenScript
Copy
// BlockPos.asImmutable() as BlockPos

myBlockPos.asImmutable();

Name: asLong

Return Type: long

ZenScript
Copy
// BlockPos.asLong() as long

myBlockPos.asLong();

Name: asMutable

Return Type: MutableBlockPos

ZenScript
Copy
// BlockPos.asMutable() as MutableBlockPos

myBlockPos.asMutable();

Name: atY

Return Type: BlockPos

ZenScript
Copy
BlockPos.atY(value as int) as BlockPos
ПараметрТипОписание
Параметр
value
Тип
int
Описание
No Description Provided

Name: below

Return Type: BlockPos

ZenScript
Copy
// BlockPos.below() as BlockPos

myBlockPos.below();

Name: below

Return Type: BlockPos

ZenScript
Copy
BlockPos.below(distance as int) as BlockPos
ПараметрТипОписание
Параметр
distance
Тип
int
Описание
No Description Provided

Name: cross

Return Type: BlockPos

ZenScript
Copy
BlockPos.cross(other as Vec3i) as BlockPos
ПараметрТипОписание
Параметр
other
Тип
Vec3i
Описание
No Description Provided

Name: east

Return Type: BlockPos

ZenScript
Copy
// BlockPos.east() as BlockPos

myBlockPos.east();

Name: east

Return Type: BlockPos

ZenScript
Copy
BlockPos.east(distance as int) as BlockPos
ПараметрТипОписание
Параметр
distance
Тип
int
Описание
No Description Provided

Name: multiply

Return Type: BlockPos

ZenScript
Copy
BlockPos.multiply(scalar as int) as BlockPos
ПараметрТипОписание
Параметр
scalar
Тип
int
Описание
No Description Provided

Name: north

Return Type: BlockPos

ZenScript
Copy
// BlockPos.north() as BlockPos

myBlockPos.north();

Name: north

Return Type: BlockPos

ZenScript
Copy
BlockPos.north(distance as int) as BlockPos
ПараметрТипОписание
Параметр
distance
Тип
int
Описание
No Description Provided

Name: offset

Return Type: BlockPos

ZenScript
Copy
BlockPos.offset(other as Vec3i) as BlockPos
ПараметрТипОписание
Параметр
other
Тип
Vec3i
Описание
No Description Provided

Name: offset

Return Type: BlockPos

ZenScript
Copy
BlockPos.offset(x as double, y as double, z as double) as BlockPos
ПараметрТипОписание
Параметр
x
Тип
double
Описание
No Description Provided
Параметр
y
Тип
double
Описание
No Description Provided
Параметр
z
Тип
double
Описание
No Description Provided

Name: offset

Return Type: BlockPos

ZenScript
Copy
BlockPos.offset(x as int, y as int, z as int) as BlockPos
ПараметрТипОписание
Параметр
x
Тип
int
Описание
No Description Provided
Параметр
y
Тип
int
Описание
No Description Provided
Параметр
z
Тип
int
Описание
No Description Provided

Name: relative

Return Type: BlockPos

ZenScript
Copy
BlockPos.relative(direction as Direction) as BlockPos
ПараметрТипОписание
Параметр
direction
Тип
Direction
Описание
No Description Provided

Name: relative

Return Type: BlockPos

ZenScript
Copy
BlockPos.relative(axis as Axis, distance as int) as BlockPos
ПараметрТипОписание
Параметр
axis
Тип
Axis
Описание
No Description Provided
Параметр
distance
Тип
int
Описание
No Description Provided

Name: relative

Return Type: BlockPos

ZenScript
Copy
BlockPos.relative(direction as Direction, distance as int) as BlockPos
ПараметрТипОписание
Параметр
direction
Тип
Direction
Описание
No Description Provided
Параметр
distance
Тип
int
Описание
No Description Provided

Name: rotate

Return Type: BlockPos

ZenScript
Copy
BlockPos.rotate(rotation as Rotation) as BlockPos
ПараметрТипОписание
Параметр
rotation
Тип
Rotation
Описание
No Description Provided

Name: south

Return Type: BlockPos

ZenScript
Copy
// BlockPos.south() as BlockPos

myBlockPos.south();

Name: south

Return Type: BlockPos

ZenScript
Copy
BlockPos.south(distance as int) as BlockPos
ПараметрТипОписание
Параметр
distance
Тип
int
Описание
No Description Provided

Name: subtract

Return Type: BlockPos

ZenScript
Copy
BlockPos.subtract(other as Vec3i) as BlockPos
ПараметрТипОписание
Параметр
other
Тип
Vec3i
Описание
No Description Provided

Name: west

Return Type: BlockPos

ZenScript
Copy
// BlockPos.west() as BlockPos

myBlockPos.west();

Name: west

Return Type: BlockPos

ZenScript
Copy
BlockPos.west(distance as int) as BlockPos
ПараметрТипОписание
Параметр
distance
Тип
int
Описание
No Description Provided