public class BlockPos
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockPos.BlockIterator |
| Modifier and Type | Field and Description |
|---|---|
protected int |
x |
protected int |
y |
protected int |
z |
| Constructor and Description |
|---|
BlockPos(double x,
double y,
double z) |
BlockPos(int x,
int y,
int z) |
| Modifier and Type | Method and Description |
|---|---|
BlockPos |
add(BlockPos pos) |
BlockPos |
add(int x,
int y,
int z)
Add the given coordinates to the coordinates of this BlockPos
|
int |
chunkX() |
int |
chunkZ() |
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
|
boolean |
equals(java.lang.Object obj) |
static BlockPos |
fromLong(long serialized)
Create a BlockPos from a serialized long value (created by toLong)
|
static java.lang.Iterable<BlockPos> |
getAllInBox(net.minecraft.util.AxisAlignedBB aabb) |
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. |
net.minecraft.block.Block |
getBlock(net.minecraft.world.World world) |
int |
getMetadata(net.minecraft.world.World world) |
int |
getX() |
int |
getY() |
int |
getZ() |
int |
hashCode() |
boolean |
isInRange(BlockPos pos,
int range) |
boolean |
isInside(net.minecraft.util.AxisAlignedBB aabb) |
static BlockPos |
maxOf(BlockPos p1,
BlockPos p2) |
static BlockPos |
minOf(BlockPos p1,
BlockPos p2) |
BlockPos |
north()
Offset this BlockPos 1 block in northern direction
|
BlockPos |
north(int n)
Offset this BlockPos n blocks in northern direction
|
BlockPos |
offset(net.minecraftforge.common.util.ForgeDirection facing)
Offset this BlockPos 1 block in the given direction
|
BlockPos |
offset(net.minecraftforge.common.util.ForgeDirection 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 |
substract(BlockPos pos) |
net.minecraft.world.ChunkPosition |
toChunkPosition() |
long |
toLong()
Serialize this BlockPos into a long value
|
java.lang.String |
toString() |
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
|
public BlockPos(int x,
int y,
int z)
public BlockPos(double x,
double y,
double z)
public int getX()
public int getY()
public int getZ()
public int chunkX()
public int chunkZ()
public net.minecraft.block.Block getBlock(net.minecraft.world.World world)
public int getMetadata(net.minecraft.world.World world)
public BlockPos add(int x, int y, int z)
x - X coordinatey - Y coordinatez - Z coordinatepublic 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(net.minecraftforge.common.util.ForgeDirection facing)
public BlockPos offset(net.minecraftforge.common.util.ForgeDirection facing, int n)
facing - The direction of the offsetn - The number of blocks to offset bypublic boolean isInRange(BlockPos pos, int range)
public boolean isInside(net.minecraft.util.AxisAlignedBB aabb)
public net.minecraft.world.ChunkPosition toChunkPosition()
public long toLong()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static BlockPos fromLong(long serialized)
public static java.lang.Iterable<BlockPos> getAllInBox(net.minecraft.util.AxisAlignedBB aabb)