public class BlockPos extends Vec3i
Modifier and Type | Class and Description |
---|---|
static class |
BlockPos.MutableBlockPos |
Modifier and Type | Field and Description |
---|---|
private static int |
NUM_X_BITS |
private static int |
NUM_Y_BITS |
private static int |
NUM_Z_BITS |
static BlockPos |
ORIGIN
The BlockPos with all coordinates 0
|
private static long |
X_MASK |
private static int |
X_SHIFT |
private static long |
Y_MASK |
private static int |
Y_SHIFT |
private static long |
Z_MASK |
NULL_VECTOR
Constructor and Description |
---|
BlockPos(double x,
double y,
double z) |
BlockPos(Entity source) |
BlockPos(int x,
int y,
int z) |
BlockPos(Vec3 source) |
BlockPos(Vec3i source) |
Modifier and Type | Method and Description |
---|---|
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
|
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 serialized)
Create a BlockPos from a serialized long value (created by toLong)
|
static java.lang.Iterable<BlockPos> |
getAllInBox(BlockPos from,
BlockPos to) |
static java.lang.Iterable<BlockPos.MutableBlockPos> |
getAllInBoxMutable(BlockPos from,
BlockPos to) |
BlockPos |
north()
Offset this BlockPos 1 block in northern direction
|
BlockPos |
north(int n)
Offset this BlockPos n blocks in northern direction
|
BlockPos |
offset(EnumFacing facing)
Offset this BlockPos 1 block in the given direction
|
BlockPos |
offset(EnumFacing facing,
int n)
Offsets this BlockPos n blocks in the given direction
|
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
|
long |
toLong()
Serialize this BlockPos into a long value
|
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, distanceSqToCenter, equals, getX, getY, getZ, hashCode, toString
public static final BlockPos ORIGIN
private static final int NUM_X_BITS
private static final int NUM_Z_BITS
private static final int NUM_Y_BITS
private static final int Y_SHIFT
private static final int X_SHIFT
private static final long X_MASK
private static final long Y_MASK
private static final long Z_MASK
public BlockPos(int x, int y, int z)
public BlockPos(double x, double y, double z)
public BlockPos(Entity source)
public BlockPos(Vec3 source)
public BlockPos(Vec3i source)
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 down()
public BlockPos down(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(EnumFacing facing)
public BlockPos offset(EnumFacing facing, int n)
public BlockPos crossProduct(Vec3i vec)
crossProduct
in class Vec3i
public long toLong()
public static BlockPos fromLong(long serialized)
public static java.lang.Iterable<BlockPos.MutableBlockPos> getAllInBoxMutable(BlockPos from, BlockPos to)