public class BlockPos extends Vec3i
Modifier and Type | Class and Description |
---|---|
static class |
BlockPos.MutableBlockPos |
static class |
BlockPos.PooledMutableBlockPos |
Modifier and Type | Field and Description |
---|---|
static BlockPos |
ORIGIN
An immutable block pos with zero as all coordinates.
|
NULL_VECTOR
Constructor and Description |
---|
BlockPos(double x,
double y,
double z) |
BlockPos(Entity source) |
BlockPos(int x,
int y,
int z) |
BlockPos(Vec3d vec) |
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.MutableBlockPos> |
func_191531_b(int p_191531_0_,
int p_191531_1_,
int p_191531_2_,
int p_191531_3_,
int p_191531_4_,
int p_191531_5_) |
static java.lang.Iterable<BlockPos> |
func_191532_a(int p_191532_0_,
int p_191532_1_,
int p_191532_2_,
int p_191532_3_,
int p_191532_4_,
int p_191532_5_) |
static java.lang.Iterable<BlockPos> |
getAllInBox(BlockPos from,
BlockPos to)
Create an Iterable that returns all positions in the box specified by the given corners
|
static java.lang.Iterable<BlockPos.MutableBlockPos> |
getAllInBoxMutable(BlockPos from,
BlockPos to)
Like getAllInBox but reuses a single MutableBlockPos instead.
|
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 |
rotate(Rotation rotationIn) |
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()
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, getDistance, getX, getY, getZ, hashCode, toString
public static final BlockPos ORIGIN
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(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> getAllInBox(BlockPos from, BlockPos to)
public static java.lang.Iterable<BlockPos> func_191532_a(int p_191532_0_, int p_191532_1_, int p_191532_2_, int p_191532_3_, int p_191532_4_, int p_191532_5_)
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.MutableBlockPos> getAllInBoxMutable(BlockPos from, BlockPos to)
public static java.lang.Iterable<BlockPos.MutableBlockPos> func_191531_b(int p_191531_0_, int p_191531_1_, int p_191531_2_, int p_191531_3_, int p_191531_4_, int p_191531_5_)