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 p_194635_, int p_194636_, int p_194637_, it.unimi.dsi.fastutil.longs.LongConsumer p_194638_) static void
aroundAndAtBlockPos
(long p_194640_, it.unimi.dsi.fastutil.longs.LongConsumer p_194641_) static void
aroundAndAtBlockPos
(BlockPos p_194643_, it.unimi.dsi.fastutil.longs.LongConsumer p_194644_) static Stream
<SectionPos> aroundChunk
(ChunkPos pChunkPos, int pX, int pY, int pZ) long
asLong()
static long
asLong
(int pX, int pY, int pZ) static long
static Stream
<SectionPos> betweenClosedStream
(int pX1, int pY1, int pZ1, int pX2, int pY2, int pZ2) static long
blockToSection
(long pLevelPos) static int
blockToSectionCoord
(double pCoord) static int
blockToSectionCoord
(int pBlockCoord) static SectionPos
bottomOf
(ChunkAccess pChunk) center()
chunk()
static Stream
<SectionPos> cube
(SectionPos pCenter, int pRadius) static long
getZeroNode
(int pX, int pZ) static long
getZeroNode
(long pPos) int
int
int
int
int
int
static SectionPos
of
(int pChunkX, int pChunkY, int pChunkZ) static SectionPos
of
(long pPacked) static SectionPos
static SectionPos
static SectionPos
static SectionPos
of
(EntityAccess pEntity) offset
(int pDx, int pDy, int pDz) static long
offset
(long pPacked, int pDx, int pDy, int pDz) static long
origin()
static int
posToSectionCoord
(double pPos) relativeToBlockPos
(short pPos) int
relativeToBlockX
(short pX) int
relativeToBlockY
(short pY) int
relativeToBlockZ
(short pZ) static int
sectionRelative
(int pRel) static short
sectionRelativePos
(BlockPos pPos) static int
sectionRelativeX
(short pX) static int
sectionRelativeY
(short pY) static int
sectionRelativeZ
(short pZ) static int
sectionToBlockCoord
(int pSectionCoord) static int
sectionToBlockCoord
(int pPos, int pOffset) int
x()
static int
x
(long pPacked) int
y()
static int
y
(long pPacked) int
z()
static int
z
(long pPacked) 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 pX, int pY, int pZ)
-
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
bottomOf
-
offset
-
offset
public static long offset(long pPacked, int pDx, int pDy, int pDz) -
posToSectionCoord
public static int posToSectionCoord(double pPos) -
blockToSectionCoord
public static int blockToSectionCoord(int pBlockCoord) -
blockToSectionCoord
public static int blockToSectionCoord(double pCoord) -
sectionRelative
public static int sectionRelative(int pRel) -
sectionRelativePos
-
sectionRelativeX
public static int sectionRelativeX(short pX) -
sectionRelativeY
public static int sectionRelativeY(short pY) -
sectionRelativeZ
public static int sectionRelativeZ(short pZ) -
relativeToBlockX
public int relativeToBlockX(short pX) -
relativeToBlockY
public int relativeToBlockY(short pY) -
relativeToBlockZ
public int relativeToBlockZ(short pZ) -
relativeToBlockPos
-
sectionToBlockCoord
public static int sectionToBlockCoord(int pSectionCoord) -
sectionToBlockCoord
public static int sectionToBlockCoord(int pPos, int pOffset) -
x
public static int x(long pPacked) -
y
public static int y(long pPacked) -
z
public static int z(long pPacked) -
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 pLevelPos) -
getZeroNode
public static long getZeroNode(int pX, int pZ) -
getZeroNode
public static long getZeroNode(long pPos) -
origin
-
center
-
chunk
-
asLong
-
asLong
public static long asLong(int pX, int pY, int pZ) -
asLong
public long asLong() -
offset
-
blocksInside
-
cube
-
aroundChunk
-
betweenClosedStream
public static Stream<SectionPos> betweenClosedStream(int pX1, int pY1, int pZ1, int pX2, int pY2, int pZ2) -
aroundAndAtBlockPos
public static void aroundAndAtBlockPos(BlockPos p_194643_, it.unimi.dsi.fastutil.longs.LongConsumer p_194644_) -
aroundAndAtBlockPos
public static void aroundAndAtBlockPos(long p_194640_, it.unimi.dsi.fastutil.longs.LongConsumer p_194641_) -
aroundAndAtBlockPos
public static void aroundAndAtBlockPos(int p_194635_, int p_194636_, int p_194637_, it.unimi.dsi.fastutil.longs.LongConsumer p_194638_)
-