Package net.minecraft.util.math
Class BlockPos
- java.lang.Object
-
- net.minecraft.util.math.vector.Vector3i
-
- net.minecraft.util.math.BlockPos
-
- All Implemented Interfaces:
java.lang.Comparable<Vector3i>
- Direct Known Subclasses:
BlockPos.Mutable
@Immutable public class BlockPos extends Vector3i
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockPos.Mutable
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<BlockPos>
CODEC
private static org.apache.logging.log4j.Logger
LOGGER
private static int
PACKED_X_LENGTH
private static long
PACKED_X_MASK
private static int
PACKED_Y_LENGTH
private static long
PACKED_Y_MASK
private static int
PACKED_Z_LENGTH
private static long
PACKED_Z_MASK
private static int
X_OFFSET
private static int
Z_OFFSET
static BlockPos
ZERO
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockPos
above()
BlockPos
above(int p_177981_1_)
long
asLong()
static long
asLong(int p_218276_0_, int p_218276_1_, int p_218276_2_)
BlockPos
below()
BlockPos
below(int p_177979_1_)
static java.lang.Iterable<BlockPos>
betweenClosed(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>
betweenClosed(BlockPos p_218278_0_, BlockPos p_218278_1_)
static java.util.stream.Stream<BlockPos>
betweenClosedStream(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>
betweenClosedStream(AxisAlignedBB p_239581_0_)
static java.util.stream.Stream<BlockPos>
betweenClosedStream(BlockPos p_218281_0_, BlockPos p_218281_1_)
static java.util.stream.Stream<BlockPos>
betweenClosedStream(MutableBoundingBox p_229383_0_)
BlockPos
cross(Vector3i p_177955_1_)
BlockPos
east()
BlockPos
east(int p_177965_1_)
static java.util.Optional<BlockPos>
findClosestMatch(BlockPos p_239584_0_, int p_239584_1_, int p_239584_2_, java.util.function.Predicate<BlockPos> p_239584_3_)
static long
getFlatIndex(long p_218288_0_)
static int
getX(long p_218290_0_)
static int
getY(long p_218274_0_)
static int
getZ(long p_218282_0_)
BlockPos
immutable()
BlockPos.Mutable
mutable()
BlockPos
north()
BlockPos
north(int p_177964_1_)
static BlockPos
of(long p_218283_0_)
BlockPos
offset(double p_177963_1_, double p_177963_3_, double p_177963_5_)
BlockPos
offset(int p_177982_1_, int p_177982_2_, int p_177982_3_)
static long
offset(long p_218291_0_, int p_218291_2_, int p_218291_3_, int p_218291_4_)
static long
offset(long p_218289_0_, Direction p_218289_2_)
BlockPos
offset(Vector3i p_177971_1_)
static java.lang.Iterable<BlockPos>
randomBetweenClosed(java.util.Random p_239585_0_, int p_239585_1_, int p_239585_2_, int p_239585_3_, int p_239585_4_, int p_239585_5_, int p_239585_6_, int p_239585_7_)
BlockPos
relative(Direction p_177972_1_)
BlockPos
relative(Direction.Axis p_241872_1_, int p_241872_2_)
BlockPos
relative(Direction p_177967_1_, int p_177967_2_)
BlockPos
rotate(Rotation p_190942_1_)
BlockPos
south()
BlockPos
south(int p_177970_1_)
static java.lang.Iterable<BlockPos.Mutable>
spiralAround(BlockPos p_243514_0_, int p_243514_1_, Direction p_243514_2_, Direction p_243514_3_)
BlockPos
subtract(Vector3i p_177973_1_)
BlockPos
west()
BlockPos
west(int p_177985_1_)
static java.lang.Iterable<BlockPos>
withinManhattan(BlockPos p_239583_0_, int p_239583_1_, int p_239583_2_, int p_239583_3_)
static java.util.stream.Stream<BlockPos>
withinManhattanStream(BlockPos p_239588_0_, int p_239588_1_, int p_239588_2_, int p_239588_3_)
-
Methods inherited from class net.minecraft.util.math.vector.Vector3i
closerThan, closerThan, compareTo, distManhattan, distSqr, distSqr, distSqr, equals, get, getX, getY, getZ, hashCode, setX, setY, setZ, toShortString, toString
-
-
-
-
Field Detail
-
CODEC
public static final com.mojang.serialization.Codec<BlockPos> CODEC
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
ZERO
public static final BlockPos ZERO
-
PACKED_X_LENGTH
private static final int PACKED_X_LENGTH
-
PACKED_Z_LENGTH
private static final int PACKED_Z_LENGTH
-
PACKED_Y_LENGTH
private static final int PACKED_Y_LENGTH
-
PACKED_X_MASK
private static final long PACKED_X_MASK
-
PACKED_Y_MASK
private static final long PACKED_Y_MASK
-
PACKED_Z_MASK
private static final long PACKED_Z_MASK
-
Z_OFFSET
private static final int Z_OFFSET
-
X_OFFSET
private static final int X_OFFSET
-
-
Constructor Detail
-
BlockPos
public BlockPos(int p_i46030_1_, int p_i46030_2_, int p_i46030_3_)
-
BlockPos
public BlockPos(double p_i46031_1_, double p_i46031_3_, double p_i46031_5_)
-
BlockPos
public BlockPos(Vector3d p_i47100_1_)
-
BlockPos
public BlockPos(IPosition p_i50799_1_)
-
BlockPos
public BlockPos(Vector3i p_i46034_1_)
-
-
Method Detail
-
offset
public static long offset(long p_218289_0_, Direction p_218289_2_)
-
offset
public static long offset(long p_218291_0_, int p_218291_2_, int p_218291_3_, int p_218291_4_)
-
getX
public static int getX(long p_218290_0_)
-
getY
public static int getY(long p_218274_0_)
-
getZ
public static int getZ(long p_218282_0_)
-
of
public static BlockPos of(long p_218283_0_)
-
asLong
public long asLong()
-
asLong
public static long asLong(int p_218276_0_, int p_218276_1_, int p_218276_2_)
-
getFlatIndex
public static long getFlatIndex(long p_218288_0_)
-
offset
public BlockPos offset(double p_177963_1_, double p_177963_3_, double p_177963_5_)
-
offset
public BlockPos offset(int p_177982_1_, int p_177982_2_, int p_177982_3_)
-
north
public BlockPos north()
-
north
public BlockPos north(int p_177964_1_)
-
south
public BlockPos south()
-
south
public BlockPos south(int p_177970_1_)
-
west
public BlockPos west()
-
west
public BlockPos west(int p_177985_1_)
-
east
public BlockPos east()
-
east
public BlockPos east(int p_177965_1_)
-
relative
public BlockPos relative(Direction.Axis p_241872_1_, int p_241872_2_)
-
immutable
public BlockPos immutable()
-
mutable
public BlockPos.Mutable mutable()
-
randomBetweenClosed
public static java.lang.Iterable<BlockPos> randomBetweenClosed(java.util.Random p_239585_0_, int p_239585_1_, int p_239585_2_, int p_239585_3_, int p_239585_4_, int p_239585_5_, int p_239585_6_, int p_239585_7_)
-
withinManhattan
public static java.lang.Iterable<BlockPos> withinManhattan(BlockPos p_239583_0_, int p_239583_1_, int p_239583_2_, int p_239583_3_)
-
findClosestMatch
public static java.util.Optional<BlockPos> findClosestMatch(BlockPos p_239584_0_, int p_239584_1_, int p_239584_2_, java.util.function.Predicate<BlockPos> p_239584_3_)
-
withinManhattanStream
public static java.util.stream.Stream<BlockPos> withinManhattanStream(BlockPos p_239588_0_, int p_239588_1_, int p_239588_2_, int p_239588_3_)
-
betweenClosed
public static java.lang.Iterable<BlockPos> betweenClosed(BlockPos p_218278_0_, BlockPos p_218278_1_)
-
betweenClosedStream
public static java.util.stream.Stream<BlockPos> betweenClosedStream(BlockPos p_218281_0_, BlockPos p_218281_1_)
-
betweenClosedStream
public static java.util.stream.Stream<BlockPos> betweenClosedStream(MutableBoundingBox p_229383_0_)
-
betweenClosedStream
public static java.util.stream.Stream<BlockPos> betweenClosedStream(AxisAlignedBB p_239581_0_)
-
betweenClosedStream
public static java.util.stream.Stream<BlockPos> betweenClosedStream(int p_218287_0_, int p_218287_1_, int p_218287_2_, int p_218287_3_, int p_218287_4_, int p_218287_5_)
-
betweenClosed
public static java.lang.Iterable<BlockPos> betweenClosed(int p_191531_0_, int p_191531_1_, int p_191531_2_, int p_191531_3_, int p_191531_4_, int p_191531_5_)
-
spiralAround
public static java.lang.Iterable<BlockPos.Mutable> spiralAround(BlockPos p_243514_0_, int p_243514_1_, Direction p_243514_2_, Direction p_243514_3_)
-
-