类 BlockPos
java.lang.Object
net.minecraft.core.Vec3i
net.minecraft.core.BlockPos
- 所有已实现的接口:
Comparable<Vec3i>
- 直接已知子类:
BlockPos.MutableBlockPos
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明static 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
private static final int
private static final int
private static final int
static final BlockPos
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明above()
above
(int pDistance) long
asLong()
static long
asLong
(int pX, int pY, int pZ) atY
(int pY) below()
below
(int pDistance) betweenClosed
(int pX1, int pY1, int pZ1, int pX2, int pY2, int pZ2) betweenClosed
(BlockPos pFirstPos, BlockPos pSecondPos) betweenClosedStream
(int pMinX, int pMinY, int pMinZ, int pMaxX, int pMaxY, int pMaxZ) betweenClosedStream
(BlockPos pFirstPos, BlockPos pSecondPos) betweenClosedStream
(AABB pAabb) static int
breadthFirstTraversal
(BlockPos p_278078_, int p_277385_, int p_277666_, BiConsumer<BlockPos, Consumer<BlockPos>> p_277755_, Predicate<BlockPos> p_278094_) static BlockPos
containing
(double pX, double pY, double pZ) static BlockPos
containing
(Position pPosition) east()
east
(int pDistance) findClosestMatch
(BlockPos pPos, int pWidth, int pHeight, Predicate<BlockPos> pPosFilter) static long
getFlatIndex
(long pPackedPos) static int
getX
(long pPackedPos) static int
getY
(long pPackedPos) static int
getZ
(long pPackedPos) multiply
(int pScalar) mutable()
north()
north
(int pDistance) static BlockPos
of
(long pPackedPos) offset
(int pDx, int pDy, int pDz) static long
offset
(long pPos, int pDx, int pDy, int pDz) static long
randomBetweenClosed
(RandomSource pRandom, int pAmount, int pMinX, int pMinY, int pMinZ, int pMaxX, int pMaxY, int pMaxZ) randomInCube
(RandomSource pRandom, int pAmount, BlockPos pCenter, int pRadius) relative
(Direction.Axis pAxis, int pAmount) south()
south
(int pDistance) static Iterable<BlockPos.MutableBlockPos>
spiralAround
(BlockPos pPos, int p_121937_, Direction p_121938_, Direction p_121939_) squareOutSouthEast
(BlockPos pPos) 已过时。west()
west
(int pDistance) withinManhattan
(BlockPos pPos, int pXSize, int pYSize, int pZSize) withinManhattanStream
(BlockPos pPos, int pXSize, int pYSize, int pZSize) 从类继承的方法 net.minecraft.core.Vec3i
closerThan, closerToCenterThan, compareTo, distManhattan, distSqr, distToCenterSqr, distToCenterSqr, distToLowCornerSqr, equals, get, getX, getY, getZ, hashCode, offsetCodec, setX, setY, setZ, toShortString, toString
-
字段详细资料
-
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- 另请参阅:
-
Z_OFFSET
private static final int Z_OFFSET -
X_OFFSET
private static final int X_OFFSET
-
-
构造器详细资料
-
BlockPos
public BlockPos(int pX, int pY, int pZ) -
BlockPos
-
-
方法详细资料
-
offset
-
offset
public static long offset(long pPos, int pDx, int pDy, int pDz) -
getX
public static int getX(long pPackedPos) -
getY
public static int getY(long pPackedPos) -
getZ
public static int getZ(long pPackedPos) -
of
-
containing
-
containing
-
asLong
public long asLong() -
asLong
public static long asLong(int pX, int pY, int pZ) -
getFlatIndex
public static long getFlatIndex(long pPackedPos) -
offset
-
getCenter
-
offset
-
subtract
-
multiply
-
above
-
above
-
below
-
below
-
north
-
north
-
south
-
south
-
west
-
west
-
east
-
east
-
relative
-
relative
-
relative
-
rotate
-
cross
-
atY
-
immutable
-
mutable
-
randomInCube
public static Iterable<BlockPos> randomInCube(RandomSource pRandom, int pAmount, BlockPos pCenter, int pRadius) -
squareOutSouthEast
已过时。 -
randomBetweenClosed
public static Iterable<BlockPos> randomBetweenClosed(RandomSource pRandom, int pAmount, int pMinX, int pMinY, int pMinZ, int pMaxX, int pMaxY, int pMaxZ) -
withinManhattan
-
findClosestMatch
-
withinManhattanStream
-
betweenClosed
-
betweenClosedStream
-
betweenClosedStream
-
betweenClosedStream
-
betweenClosedStream
-
betweenClosed
-
spiralAround
public static Iterable<BlockPos.MutableBlockPos> spiralAround(BlockPos pPos, int p_121937_, Direction p_121938_, Direction p_121939_) -
breadthFirstTraversal
-