public class BlockPosUtils
extends java.lang.Object
BlockPos.| Constructor and Description |
|---|
BlockPosUtils() |
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.util.math.BlockPos |
chunkPosition(net.minecraft.util.math.BlockPos pos)
Converts the
BlockPos to its position relative to the chunk it's in. |
static int |
compare(net.minecraft.util.math.BlockPos pos1,
net.minecraft.util.math.BlockPos pos2)
Compares the distance of the passed
BlockPos to the origin (0,0,0). |
static int |
compare(Point offset,
net.minecraft.util.math.BlockPos pos1,
net.minecraft.util.math.BlockPos pos2)
Compares the distance of the passed
BlockPos to the offset Point. |
static net.minecraft.util.math.BlockPos |
fromBytes(io.netty.buffer.ByteBuf buf) |
static java.lang.Iterable<net.minecraft.util.math.BlockPos> |
getAllInBox(net.minecraft.util.math.AxisAlignedBB aabb)
Gets an iterable iterating through all the
BlockPos intersecting the passed AxisAlignedBB. |
static net.minecraft.util.math.BlockPos |
rotate(net.minecraft.util.math.BlockPos pos,
int rotation)
Rotates the
BlockPos around the Y axis around the origin (0,0,0). |
static io.netty.buffer.ByteBuf |
toBytes(net.minecraft.util.math.BlockPos pos) |
public static net.minecraft.util.math.BlockPos rotate(net.minecraft.util.math.BlockPos pos,
int rotation)
BlockPos around the Y axis around the origin (0,0,0).pos - the posrotation - the rotationpublic static net.minecraft.util.math.BlockPos chunkPosition(net.minecraft.util.math.BlockPos pos)
BlockPos to its position relative to the chunk it's in.pos - the pospublic static java.lang.Iterable<net.minecraft.util.math.BlockPos> getAllInBox(net.minecraft.util.math.AxisAlignedBB aabb)
BlockPos intersecting the passed AxisAlignedBB.aabb - the aabbpublic static io.netty.buffer.ByteBuf toBytes(net.minecraft.util.math.BlockPos pos)
public static net.minecraft.util.math.BlockPos fromBytes(io.netty.buffer.ByteBuf buf)
public static int compare(net.minecraft.util.math.BlockPos pos1,
net.minecraft.util.math.BlockPos pos2)
BlockPos to the origin (0,0,0).pos1 - the pos 1pos2 - the pos 2