public static class BlockPos.Mutable extends BlockPos
BlockPos.Mutable
Constructor and Description |
---|
Mutable() |
Mutable(double x,
double y,
double z) |
Mutable(int x,
int y,
int z) |
Modifier and Type | Method and Description |
---|---|
BlockPos |
add(double x,
double y,
double z) |
BlockPos |
add(int x,
int y,
int z) |
BlockPos.Mutable |
clamp(Direction.Axis axis,
int min,
int max)
Clamps the component corresponding to the given
axis between min and max . |
BlockPos.Mutable |
move(Direction direction)
Moves this mutable block position by 1 block in the given direction.
|
BlockPos.Mutable |
move(Direction direction,
int distance)
Moves this mutable block position by the given distance in the given
direction.
|
BlockPos.Mutable |
move(int dx,
int dy,
int dz)
Moves the mutable block position by the delta x, y, and z provided.
|
BlockPos.Mutable |
move(Vec3i vec) |
BlockPos |
offset(Direction.Axis axis,
int distance) |
BlockPos |
offset(Direction direction,
int int2) |
BlockPos |
rotate(BlockRotation rotation) |
BlockPos.Mutable |
set(AxisCycleDirection axis,
int x,
int y,
int z) |
BlockPos.Mutable |
set(double x,
double y,
double z) |
BlockPos.Mutable |
set(int x,
int y,
int z)
Sets the x, y, and z of this mutable block position.
|
BlockPos.Mutable |
set(long pos) |
BlockPos.Mutable |
set(Vec3i pos) |
BlockPos.Mutable |
set(Vec3i pos,
Direction direction)
Sets this mutable block position to the offset position of the given
pos by the given direction.
|
BlockPos.Mutable |
set(Vec3i pos,
int x,
int y,
int z)
Sets this mutable block position to the sum of the given position and the
given x, y, and z.
|
void |
setX(int x) |
void |
setY(int y) |
void |
setZ(int z) |
BlockPos |
toImmutable()
Returns an immutable block position with the same x, y, and z as this
position.
|
add, add, asLong, asLong, crossProduct, down, down, east, east, findClosest, fromLong, iterate, iterate, iterateOutwards, iterateRandomly, method_30512, mutableCopy, north, north, offset, offset, removeChunkSectionLocalY, south, south, stream, stream, stream, stream, streamOutwards, subtract, unpackLongX, unpackLongY, unpackLongZ, up, up, west, west
compareTo, equals, getComponentAlongAxis, getManhattanDistance, getSquaredDistance, getSquaredDistance, getSquaredDistance, getX, getY, getZ, hashCode, isWithinDistance, isWithinDistance, toShortString, toString
public Mutable()
public Mutable(int x, int y, int z)
public Mutable(double x, double y, double z)
public BlockPos offset(Direction.Axis axis, int distance)
public BlockPos rotate(BlockRotation rotation)
public BlockPos.Mutable set(int x, int y, int z)
public BlockPos.Mutable set(double x, double y, double z)
public BlockPos.Mutable set(Vec3i pos)
public BlockPos.Mutable set(long pos)
public BlockPos.Mutable set(AxisCycleDirection axis, int x, int y, int z)
public BlockPos.Mutable set(Vec3i pos, Direction direction)
public BlockPos.Mutable set(Vec3i pos, int x, int y, int z)
public BlockPos.Mutable move(Direction direction)
public BlockPos.Mutable move(Direction direction, int distance)
public BlockPos.Mutable move(int dx, int dy, int dz)
public BlockPos.Mutable move(Vec3i vec)
public BlockPos.Mutable clamp(Direction.Axis axis, int min, int max)
axis
between min
and max
.public BlockPos toImmutable()
This method should be called when a block position is used as map keys as to prevent side effects of mutations of mutable block positions.
toImmutable
in class BlockPos