Package net.minecraft.core
Class SectionPos
java.lang.Object
net.minecraft.core.Vec3i
net.minecraft.core.SectionPos
- All Implemented Interfaces:
Comparable<Vec3i>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final long
private static final int
private static final long
private static final int
private static final long
private static final int
private static final int
private static final int
static final int
static final int
static final int
static final int
static final int
private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
aroundAndAtBlockPos
(int x, int y, int z, it.unimi.dsi.fastutil.longs.LongConsumer consumer) static void
aroundAndAtBlockPos
(long pos, it.unimi.dsi.fastutil.longs.LongConsumer consumer) static void
aroundAndAtBlockPos
(BlockPos pos, it.unimi.dsi.fastutil.longs.LongConsumer consumer) static Stream
<SectionPos> aroundChunk
(ChunkPos chunkPos, int x, int y, int z) long
asLong()
static long
asLong
(int x, int y, int z) static long
static Stream
<SectionPos> betweenClosedStream
(int x1, int y1, int z1, int x2, int y2, int z2) static long
blockToSection
(long levelPos) static int
blockToSectionCoord
(double coord) static int
blockToSectionCoord
(int blockCoord) static SectionPos
bottomOf
(ChunkAccess chunk) center()
chunk()
static Stream
<SectionPos> cube
(SectionPos center, int radius) static long
getZeroNode
(int x, int z) static long
getZeroNode
(long pos) int
int
int
int
int
int
static SectionPos
of
(int chunkX, int chunkY, int chunkZ) static SectionPos
of
(long packed) static SectionPos
static SectionPos
static SectionPos
static SectionPos
of
(EntityAccess entity) offset
(int dx, int dy, int dz) static long
offset
(long packed, int dx, int dy, int dz) static long
origin()
static int
posToSectionCoord
(double pos) relativeToBlockPos
(short pos) int
relativeToBlockX
(short x) int
relativeToBlockY
(short y) int
relativeToBlockZ
(short z) static int
sectionRelative
(int rel) static short
static int
sectionRelativeX
(short x) static int
sectionRelativeY
(short y) static int
sectionRelativeZ
(short z) static int
sectionToBlockCoord
(int sectionCoord) static int
sectionToBlockCoord
(int pos, int offset) int
x()
static int
x
(long packed) int
y()
static int
y
(long packed) int
z()
static int
z
(long packed) Methods inherited from class net.minecraft.core.Vec3i
above, above, below, below, closerThan, closerToCenterThan, compareTo, cross, distManhattan, distSqr, distToCenterSqr, distToCenterSqr, distToLowCornerSqr, east, east, equals, get, getX, getY, getZ, hashCode, multiply, north, north, offset, offsetCodec, relative, relative, relative, setX, setY, setZ, south, south, subtract, toShortString, toString, west, west
-
Field Details
-
SECTION_BITS
public static final int SECTION_BITS- See Also:
-
SECTION_SIZE
public static final int SECTION_SIZE- See Also:
-
SECTION_MASK
public static final int SECTION_MASK- See Also:
-
SECTION_HALF_SIZE
public static final int SECTION_HALF_SIZE- See Also:
-
SECTION_MAX_INDEX
public static final int SECTION_MAX_INDEX- See Also:
-
PACKED_X_LENGTH
private static final int PACKED_X_LENGTH- See Also:
-
PACKED_Y_LENGTH
private static final int PACKED_Y_LENGTH- See Also:
-
PACKED_Z_LENGTH
private static final int PACKED_Z_LENGTH- See Also:
-
PACKED_X_MASK
private static final long PACKED_X_MASK- See Also:
-
PACKED_Y_MASK
private static final long PACKED_Y_MASK- See Also:
-
PACKED_Z_MASK
private static final long PACKED_Z_MASK- See Also:
-
Y_OFFSET
private static final int Y_OFFSET- See Also:
-
Z_OFFSET
private static final int Z_OFFSET- See Also:
-
X_OFFSET
private static final int X_OFFSET- See Also:
-
RELATIVE_X_SHIFT
private static final int RELATIVE_X_SHIFT- See Also:
-
RELATIVE_Y_SHIFT
private static final int RELATIVE_Y_SHIFT- See Also:
-
RELATIVE_Z_SHIFT
private static final int RELATIVE_Z_SHIFT- See Also:
-
-
Constructor Details
-
SectionPos
SectionPos(int x, int y, int z)
-
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
bottomOf
-
offset
-
offset
public static long offset(long packed, int dx, int dy, int dz) -
posToSectionCoord
public static int posToSectionCoord(double pos) -
blockToSectionCoord
public static int blockToSectionCoord(int blockCoord) -
blockToSectionCoord
public static int blockToSectionCoord(double coord) -
sectionRelative
public static int sectionRelative(int rel) -
sectionRelativePos
-
sectionRelativeX
public static int sectionRelativeX(short x) -
sectionRelativeY
public static int sectionRelativeY(short y) -
sectionRelativeZ
public static int sectionRelativeZ(short z) -
relativeToBlockX
public int relativeToBlockX(short x) -
relativeToBlockY
public int relativeToBlockY(short y) -
relativeToBlockZ
public int relativeToBlockZ(short z) -
relativeToBlockPos
-
sectionToBlockCoord
public static int sectionToBlockCoord(int sectionCoord) -
sectionToBlockCoord
public static int sectionToBlockCoord(int pos, int offset) -
x
public static int x(long packed) -
y
public static int y(long packed) -
z
public static int z(long packed) -
x
public int x() -
y
public int y() -
z
public int z() -
minBlockX
public int minBlockX() -
minBlockY
public int minBlockY() -
minBlockZ
public int minBlockZ() -
maxBlockX
public int maxBlockX() -
maxBlockY
public int maxBlockY() -
maxBlockZ
public int maxBlockZ() -
blockToSection
public static long blockToSection(long levelPos) -
getZeroNode
public static long getZeroNode(int x, int z) -
getZeroNode
public static long getZeroNode(long pos) -
origin
-
center
-
chunk
-
asLong
-
asLong
public static long asLong(int x, int y, int z) -
asLong
public long asLong() -
offset
-
blocksInside
-
cube
-
aroundChunk
-
betweenClosedStream
public static Stream<SectionPos> betweenClosedStream(int x1, int y1, int z1, int x2, int y2, int z2) -
aroundAndAtBlockPos
public static void aroundAndAtBlockPos(BlockPos pos, it.unimi.dsi.fastutil.longs.LongConsumer consumer) -
aroundAndAtBlockPos
public static void aroundAndAtBlockPos(long pos, it.unimi.dsi.fastutil.longs.LongConsumer consumer) -
aroundAndAtBlockPos
public static void aroundAndAtBlockPos(int x, int y, int z, it.unimi.dsi.fastutil.longs.LongConsumer consumer)
-