Package net.minecraft.util.math
Class BlockPos.Mutable
java.lang.Object
net.minecraft.util.math.Vec3i
net.minecraft.util.math.BlockPos
net.minecraft.util.math.BlockPos.Mutable
- All Implemented Interfaces:
Comparable<Vec3i>
- Enclosing class:
- BlockPos
public static class BlockPos.Mutable extends BlockPos
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.util.math.BlockPos
BlockPos.Mutable -
Field Summary
Fields inherited from class net.minecraft.util.math.BlockPos
CODEC, ORIGIN, SIZE_BITS_Y -
Constructor Summary
-
Method Summary
Modifier and Type Method Description BlockPosadd(double x, double y, double z)BlockPosadd(int x, int y, int z)BlockPos.Mutableclamp(Direction.Axis axis, int min, int max)Clamps the component corresponding to the givenaxisbetweenminandmax.BlockPos.Mutablemove(int dx, int dy, int dz)Moves the mutable block position by the delta x, y, and z provided.BlockPos.Mutablemove(Direction direction)Moves this mutable block position by 1 block in the given direction.BlockPos.Mutablemove(Direction direction, int distance)Moves this mutable block position by the given distance in the given direction.BlockPos.Mutablemove(Vec3i vec)BlockPosoffset(Direction.Axis axis, int distance)BlockPosoffset(Direction direction, int int2)BlockPosrotate(BlockRotation rotation)BlockPos.Mutableset(double x, double y, double z)BlockPos.Mutableset(int x, int y, int z)Sets the x, y, and z of this mutable block position.BlockPos.Mutableset(long pos)BlockPos.Mutableset(AxisCycleDirection axis, int x, int y, int z)BlockPos.Mutableset(Vec3i pos)BlockPos.Mutableset(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.BlockPos.Mutableset(Vec3i pos, Direction direction)Sets this mutable block position to the offset position of the given pos by the given direction.BlockPos.MutablesetX(int int2)BlockPos.MutablesetY(int int2)BlockPos.MutablesetZ(int int2)BlockPostoImmutable()Returns an immutable block position with the same x, y, and z as this position.Methods inherited from class net.minecraft.util.math.BlockPos
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, withYMethods inherited from class net.minecraft.util.math.Vec3i
compareTo, equals, getComponentAlongAxis, getManhattanDistance, getSquaredDistance, getSquaredDistance, getSquaredDistance, getSquaredDistance, getX, getY, getZ, hashCode, isWithinDistance, isWithinDistance, toShortString, toString
-
Constructor Details
-
Mutable
public Mutable() -
Mutable
public Mutable(int x, int y, int z) -
Mutable
public Mutable(double x, double y, double z)
-
-
Method Details
-
add
-
add
-
offset
-
offset
-
rotate
-
set
Sets the x, y, and z of this mutable block position. -
set
-
set
-
set
-
set
-
set
Sets this mutable block position to the offset position of the given pos by the given direction. -
set
Sets this mutable block position to the sum of the given position and the given x, y, and z. -
move
Moves this mutable block position by 1 block in the given direction. -
move
Moves this mutable block position by the given distance in the given direction. -
move
Moves the mutable block position by the delta x, y, and z provided. -
move
-
clamp
Clamps the component corresponding to the givenaxisbetweenminandmax. -
setX
-
setY
-
setZ
-
toImmutable
Returns an immutable block position with the same x, y, and z as this position.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.
- Overrides:
toImmutablein classBlockPos
-