BlockPos
Link to blockpos
Импорт класса
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 Copyimport crafttweaker.api.util.math.BlockPos;
Extending Vec3i
Link to extending-vec3i
BlockPos extends Vec3i. That means all methods available in Vec3i are also available in BlockPos
Constructors
Link to constructors
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 Copynew 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 Copynew 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 |
Методы
Link to методы
Name: above
Return Type: BlockPos
ZenScript CopyBlockPos.above(distance as int) as BlockPos
Параметр | Тип |
---|---|
Параметр distance | Тип int |
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 CopyBlockPos.atY(value as int) as BlockPos
Параметр | Тип |
---|---|
Параметр value | Тип int |
Name: below
Return Type: BlockPos
ZenScript CopyBlockPos.below(distance as int) as BlockPos
Параметр | Тип |
---|---|
Параметр distance | Тип int |
Name: east
Return Type: BlockPos
ZenScript CopyBlockPos.east(distance as int) as BlockPos
Параметр | Тип |
---|---|
Параметр distance | Тип int |
Name: multiply
Return Type: BlockPos
ZenScript CopyBlockPos.multiply(scalar as int) as BlockPos
Параметр | Тип |
---|---|
Параметр scalar | Тип int |
Name: north
Return Type: BlockPos
ZenScript CopyBlockPos.north(distance as int) as BlockPos
Параметр | Тип |
---|---|
Параметр distance | Тип int |
Name: offset
Return Type: BlockPos
ZenScript CopyBlockPos.offset(x as double, y as double, z as double) as BlockPos
Параметр | Тип |
---|---|
Параметр x | Тип double |
Параметр y | Тип double |
Параметр z | Тип double |
Name: offset
Return Type: BlockPos
ZenScript CopyBlockPos.offset(x as int, y as int, z as int) as BlockPos
Параметр | Тип |
---|---|
Параметр x | Тип int |
Параметр y | Тип int |
Параметр z | Тип int |
Name: south
Return Type: BlockPos
ZenScript CopyBlockPos.south(distance as int) as BlockPos
Параметр | Тип |
---|---|
Параметр distance | Тип int |
Name: west
Return Type: BlockPos
ZenScript CopyBlockPos.west(distance as int) as BlockPos
Параметр | Тип |
---|---|
Параметр distance | Тип int |