@Immutable public class BlockPos extends Vec3i implements IDynamicSerializable
修飾子とタイプ | クラスと説明 |
---|---|
static class |
BlockPos.Mutable |
static class |
BlockPos.PooledMutable |
修飾子とタイプ | フィールドと説明 |
---|---|
static BlockPos |
ZERO
An immutable block pos with zero as all coordinates.
|
NULL_VECTOR
コンストラクタと説明 |
---|
BlockPos(double x,
double y,
double z) |
BlockPos(Entity source) |
BlockPos(int x,
int y,
int z) |
BlockPos(IPosition p_i50799_1_) |
BlockPos(Vec3d vec) |
BlockPos(Vec3i source) |
修飾子とタイプ | メソッドと説明 |
---|---|
BlockPos |
add(double x,
double y,
double z)
Add the given coordinates to the coordinates of this BlockPos
|
BlockPos |
add(int x,
int y,
int z)
Add the given coordinates to the coordinates of this BlockPos
|
BlockPos |
add(Vec3i vec)
Add the given Vector to this BlockPos
|
BlockPos |
crossProduct(Vec3i vec)
Calculate the cross product of this and the given Vector
|
static <T> BlockPos |
deserialize(com.mojang.datafixers.Dynamic<T> p_218286_0_) |
BlockPos |
down()
Offset this BlockPos 1 block down
|
BlockPos |
down(int n)
Offset this BlockPos n blocks down
|
BlockPos |
east()
Offset this BlockPos 1 block in eastern direction
|
BlockPos |
east(int n)
Offset this BlockPos n blocks in eastern direction
|
static BlockPos |
fromLong(long p_218283_0_) |
static long |
func_218288_f(long p_218288_0_) |
static java.util.stream.Stream<BlockPos> |
getAllInBox(BlockPos firstPos,
BlockPos secondPos) |
static java.util.stream.Stream<BlockPos> |
getAllInBox(int p_218287_0_,
int p_218287_1_,
int p_218287_2_,
int p_218287_3_,
int p_218287_4_,
int p_218287_5_) |
static java.util.stream.Stream<BlockPos> |
getAllInBox(MutableBoundingBox p_229383_0_) |
static java.lang.Iterable<BlockPos> |
getAllInBoxMutable(BlockPos firstPos,
BlockPos secondPos) |
static java.lang.Iterable<BlockPos> |
getAllInBoxMutable(int x1,
int y1,
int z1,
int x2,
int y2,
int z2)
Creates an Iterable that returns all positions in the box specified by the given corners.
|
BlockPos |
north()
Offset this BlockPos 1 block in northern direction
|
BlockPos |
north(int n)
Offset this BlockPos n blocks in northern direction
|
BlockPos |
offset(Direction facing)
Offset this BlockPos 1 block in the given direction
|
BlockPos |
offset(Direction facing,
int n)
Offsets this BlockPos n blocks in the given direction
|
static long |
offset(long pos,
Direction p_218289_2_) |
static long |
offset(long pos,
int dx,
int dy,
int dz) |
static long |
pack(int p_218276_0_,
int p_218276_1_,
int p_218276_2_) |
BlockPos |
rotate(Rotation rotationIn) |
<T> T |
serialize(com.mojang.datafixers.types.DynamicOps<T> p_218175_1_) |
BlockPos |
south()
Offset this BlockPos 1 block in southern direction
|
BlockPos |
south(int n)
Offset this BlockPos n blocks in southern direction
|
BlockPos |
subtract(Vec3i vec)
Subtract the given Vector from this BlockPos
|
BlockPos |
toImmutable()
Returns a version of this BlockPos that is guaranteed to be immutable.
|
long |
toLong() |
static int |
unpackX(long p_218290_0_) |
static int |
unpackY(long p_218274_0_) |
static int |
unpackZ(long p_218282_0_) |
BlockPos |
up()
Offset this BlockPos 1 block up
|
BlockPos |
up(int n)
Offset this BlockPos n blocks up
|
BlockPos |
west()
Offset this BlockPos 1 block in western direction
|
BlockPos |
west(int n)
Offset this BlockPos n blocks in western direction
|
compareTo, distanceSq, distanceSq, distanceSq, equals, func_229422_x_, getX, getY, getZ, hashCode, manhattanDistance, toString, withinDistance, withinDistance
public static final BlockPos ZERO
public BlockPos(int x, int y, int z)
public BlockPos(double x, double y, double z)
public BlockPos(Entity source)
public BlockPos(Vec3d vec)
public BlockPos(IPosition p_i50799_1_)
public BlockPos(Vec3i source)
public static <T> BlockPos deserialize(com.mojang.datafixers.Dynamic<T> p_218286_0_)
public <T> T serialize(com.mojang.datafixers.types.DynamicOps<T> p_218175_1_)
serialize
インタフェース内 IDynamicSerializable
public static long offset(long pos, Direction p_218289_2_)
public static long offset(long pos, int dx, int dy, int dz)
public static int unpackX(long p_218290_0_)
public static int unpackY(long p_218274_0_)
public static int unpackZ(long p_218282_0_)
public static BlockPos fromLong(long p_218283_0_)
public static long pack(int p_218276_0_, int p_218276_1_, int p_218276_2_)
public static long func_218288_f(long p_218288_0_)
public long toLong()
public BlockPos add(double x, double y, double z)
public BlockPos add(int x, int y, int z)
public BlockPos up()
public BlockPos up(int n)
public BlockPos north()
public BlockPos north(int n)
public BlockPos south()
public BlockPos south(int n)
public BlockPos west()
public BlockPos west(int n)
public BlockPos east()
public BlockPos east(int n)
public BlockPos offset(Direction facing, int n)
public BlockPos crossProduct(Vec3i vec)
crossProduct
クラス内 Vec3i
public BlockPos toImmutable()
When storing a BlockPos given to you for an extended period of time, make sure you use this in case the value is changed internally.
public static java.lang.Iterable<BlockPos> getAllInBoxMutable(BlockPos firstPos, BlockPos secondPos)
public static java.util.stream.Stream<BlockPos> getAllInBox(BlockPos firstPos, BlockPos secondPos)
public static java.util.stream.Stream<BlockPos> getAllInBox(MutableBoundingBox p_229383_0_)
public static java.util.stream.Stream<BlockPos> getAllInBox(int p_218287_0_, int p_218287_1_, int p_218287_2_, int p_218287_3_, int p_218287_4_, int p_218287_5_)
public static java.lang.Iterable<BlockPos> getAllInBoxMutable(int x1, int y1, int z1, int x2, int y2, int z2)
MutableBlockPos
instead of regular BlockPos, which grants better
performance. However, the resulting BlockPos instances can only be used inside the iteration loop (as otherwise
the value will change), unless toImmutable()
is called. This method is ideal for searching large areas
and only storing a few locations.