Package net.minecraft.core
Class BlockPos
java.lang.Object
net.minecraft.core.Vec3i
net.minecraft.core.BlockPos
- All Implemented Interfaces:
Comparable<Vec3i>
- Direct Known Subclasses:
BlockPos.MutableBlockPos
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<BlockPos> private static final org.slf4j.Logger
private static final int
private static final long
static final int
private static final long
private static final int
private static final long
static final StreamCodec
<io.netty.buffer.ByteBuf, BlockPos> private static final int
private static final int
private static final int
static final BlockPos
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabove()
above
(int p_121972_) long
asLong()
static long
asLong
(int p_121883_, int p_121884_, int p_121885_) atY
(int p_175289_) below()
below
(int p_122000_) betweenClosed
(int p_121977_, int p_121978_, int p_121979_, int p_121980_, int p_121981_, int p_121982_) betweenClosed
(BlockPos p_121941_, BlockPos p_121942_) betweenClosedStream
(int p_121887_, int p_121888_, int p_121889_, int p_121890_, int p_121891_, int p_121892_) betweenClosedStream
(BlockPos p_121991_, BlockPos p_121992_) betweenClosedStream
(BoundingBox p_121920_) betweenClosedStream
(AABB p_121922_) static int
breadthFirstTraversal
(BlockPos p_278078_, int p_277385_, int p_277666_, BiConsumer<BlockPos, Consumer<BlockPos>> p_277755_, Predicate<BlockPos> p_278094_) clampLocationWithin
(Vec3 p_350293_) static BlockPos
containing
(double p_275310_, double p_275414_, double p_275737_) static BlockPos
containing
(Position p_275443_) east()
east
(int p_122031_) findClosestMatch
(BlockPos p_121931_, int p_121932_, int p_121933_, Predicate<BlockPos> p_121934_) static long
getFlatIndex
(long p_122028_) static int
getX
(long p_121984_) static int
getY
(long p_122009_) static int
getZ
(long p_122016_) static BlockPos
static BlockPos
multiply
(int p_175263_) mutable()
north()
north
(int p_122014_) static BlockPos
of
(long p_122023_) offset
(int p_121973_, int p_121974_, int p_121975_) static long
offset
(long p_121911_, int p_121912_, int p_121913_, int p_121914_) static long
randomBetweenClosed
(RandomSource p_235642_, int p_235643_, int p_235644_, int p_235645_, int p_235646_, int p_235647_, int p_235648_, int p_235649_) randomInCube
(RandomSource p_235651_, int p_235652_, BlockPos p_235653_, int p_235654_) relative
(Direction.Axis p_121943_, int p_121944_) south()
south
(int p_122021_) static Iterable
<BlockPos.MutableBlockPos> spiralAround
(BlockPos p_121936_, int p_121937_, Direction p_121938_, Direction p_121939_) squareOutSouthEast
(BlockPos p_284978_) Deprecated.west()
west
(int p_122026_) withinManhattan
(BlockPos p_121926_, int p_121927_, int p_121928_, int p_121929_) withinManhattanStream
(BlockPos p_121986_, int p_121987_, int p_121988_, int p_121989_) Methods inherited from class net.minecraft.core.Vec3i
closerThan, closerToCenterThan, compareTo, distManhattan, distSqr, distToCenterSqr, distToCenterSqr, distToLowCornerSqr, equals, get, getX, getY, getZ, hashCode, offsetCodec, setX, setY, setZ, toShortString, toString
-
Field Details
-
CODEC
-
STREAM_CODEC
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ZERO
-
PACKED_X_LENGTH
private static final int PACKED_X_LENGTH -
PACKED_Z_LENGTH
private static final int PACKED_Z_LENGTH -
PACKED_Y_LENGTH
public static final int PACKED_Y_LENGTH -
PACKED_X_MASK
private static final long PACKED_X_MASK -
PACKED_Y_MASK
private static final long PACKED_Y_MASK -
PACKED_Z_MASK
private static final long PACKED_Z_MASK -
Y_OFFSET
private static final int Y_OFFSET- See Also:
-
Z_OFFSET
private static final int Z_OFFSET -
X_OFFSET
private static final int X_OFFSET
-
-
Constructor Details
-
BlockPos
public BlockPos(int p_121869_, int p_121870_, int p_121871_) -
BlockPos
-
-
Method Details
-
offset
-
offset
public static long offset(long p_121911_, int p_121912_, int p_121913_, int p_121914_) -
getX
public static int getX(long p_121984_) -
getY
public static int getY(long p_122009_) -
getZ
public static int getZ(long p_122016_) -
of
-
containing
-
containing
-
min
-
max
-
asLong
public long asLong() -
asLong
public static long asLong(int p_121883_, int p_121884_, int p_121885_) -
getFlatIndex
public static long getFlatIndex(long p_122028_) -
offset
-
getCenter
-
getBottomCenter
-
offset
-
subtract
-
multiply
-
above
-
above
-
below
-
below
-
north
-
north
-
south
-
south
-
west
-
west
-
east
-
east
-
relative
-
relative
-
relative
-
rotate
-
cross
-
atY
-
immutable
-
mutable
-
clampLocationWithin
-
randomInCube
public static Iterable<BlockPos> randomInCube(RandomSource p_235651_, int p_235652_, BlockPos p_235653_, int p_235654_) -
squareOutSouthEast
Deprecated. -
randomBetweenClosed
public static Iterable<BlockPos> randomBetweenClosed(RandomSource p_235642_, int p_235643_, int p_235644_, int p_235645_, int p_235646_, int p_235647_, int p_235648_, int p_235649_) -
withinManhattan
-
findClosestMatch
-
withinManhattanStream
-
betweenClosed
-
betweenClosedStream
-
betweenClosedStream
-
betweenClosedStream
-
betweenClosedStream
-
betweenClosed
-
spiralAround
public static Iterable<BlockPos.MutableBlockPos> spiralAround(BlockPos p_121936_, int p_121937_, Direction p_121938_, Direction p_121939_) -
breadthFirstTraversal
-