Package net.minecraft.util.math
Class ChunkPos
java.lang.Object
net.minecraft.util.math.ChunkPos
An immutable pair of two integers representing the X and Z coordinates of a chunk.
Chunk positions are usually serialized as a long.
- Mappings:
Namespace Name official clrintermediary net/minecraft/class_1923named net/minecraft/util/math/ChunkPos
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate static final longprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intstatic final intstatic final intstatic final longAlong-serialized chunk position1875066, 1875066.static final ChunkPosThe origin of the chunk position,0, 0.final intfinal int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ChunkPosfromRegion(int x, int z) static ChunkPosfromRegionCenter(int x, int z) getBlockPos(int offsetX, int y, int offsetZ) getCenterAtY(int y) intintintintgetEndX()intgetEndZ()intgetOffsetX(int offset) intgetOffsetZ(int offset) static intgetPackedX(long pos) static intgetPackedZ(long pos) intintintintintintinthashCode()static inthashCode(int x, int z) longtoLong()Returns the chunk position serialized aslong.static longtoLong(int chunkX, int chunkZ) Returns the chunk position serialized aslong.static longReturns the chunk position of the givenposserialized aslong.toString()
-
Field Details
-
field_36299
private static final int field_36299- See Also:
- Mappings:
Namespace Name Mixin selector official gLclr;g:Iintermediary field_36299Lnet/minecraft/class_1923;field_36299:Inamed field_36299Lnet/minecraft/util/math/ChunkPos;field_36299:I
-
MARKER
public static final long MARKERAlong-serialized chunk position1875066, 1875066. This is a special value used as a marker.- Mappings:
Namespace Name Mixin selector official aLclr;a:Jintermediary field_17348Lnet/minecraft/class_1923;field_17348:Jnamed MARKERLnet/minecraft/util/math/ChunkPos;MARKER:J
-
ORIGIN
The origin of the chunk position,0, 0.- Mappings:
Namespace Name Mixin selector official bLclr;b:Lclr;intermediary field_35107Lnet/minecraft/class_1923;field_35107:Lnet/minecraft/class_1923;named ORIGINLnet/minecraft/util/math/ChunkPos;ORIGIN:Lnet/minecraft/util/math/ChunkPos;
-
field_30953
private static final long field_30953- See Also:
- Mappings:
Namespace Name Mixin selector official hLclr;h:Jintermediary field_30953Lnet/minecraft/class_1923;field_30953:Jnamed field_30953Lnet/minecraft/util/math/ChunkPos;field_30953:J
-
field_30954
private static final long field_30954- See Also:
- Mappings:
Namespace Name Mixin selector official iLclr;i:Jintermediary field_30954Lnet/minecraft/class_1923;field_30954:Jnamed field_30954Lnet/minecraft/util/math/ChunkPos;field_30954:J
-
field_30955
private static final int field_30955- See Also:
- Mappings:
Namespace Name Mixin selector official jLclr;j:Iintermediary field_30955Lnet/minecraft/class_1923;field_30955:Inamed field_30955Lnet/minecraft/util/math/ChunkPos;field_30955:I
-
field_38224
public static final int field_38224- See Also:
- Mappings:
Namespace Name Mixin selector official cLclr;c:Iintermediary field_38224Lnet/minecraft/class_1923;field_38224:Inamed field_38224Lnet/minecraft/util/math/ChunkPos;field_38224:I
-
field_30956
private static final int field_30956- See Also:
- Mappings:
Namespace Name Mixin selector official kLclr;k:Iintermediary field_30956Lnet/minecraft/class_1923;field_30956:Inamed field_30956Lnet/minecraft/util/math/ChunkPos;field_30956:I
-
field_38225
public static final int field_38225- See Also:
- Mappings:
Namespace Name Mixin selector official dLclr;d:Iintermediary field_38225Lnet/minecraft/class_1923;field_38225:Inamed field_38225Lnet/minecraft/util/math/ChunkPos;field_38225:I
-
field_30957
private static final int field_30957- See Also:
- Mappings:
Namespace Name Mixin selector official lLclr;l:Iintermediary field_30957Lnet/minecraft/class_1923;field_30957:Inamed field_30957Lnet/minecraft/util/math/ChunkPos;field_30957:I
-
field_30958
private static final int field_30958- See Also:
- Mappings:
Namespace Name Mixin selector official mLclr;m:Iintermediary field_30958Lnet/minecraft/class_1923;field_30958:Inamed field_30958Lnet/minecraft/util/math/ChunkPos;field_30958:I
-
field_30959
private static final int field_30959- See Also:
- Mappings:
Namespace Name Mixin selector official nLclr;n:Iintermediary field_30959Lnet/minecraft/class_1923;field_30959:Inamed field_30959Lnet/minecraft/util/math/ChunkPos;field_30959:I
-
x
public final int x- Mappings:
Namespace Name Mixin selector official eLclr;e:Iintermediary field_9181Lnet/minecraft/class_1923;field_9181:Inamed xLnet/minecraft/util/math/ChunkPos;x:I
-
z
public final int z- Mappings:
Namespace Name Mixin selector official fLclr;f:Iintermediary field_9180Lnet/minecraft/class_1923;field_9180:Inamed zLnet/minecraft/util/math/ChunkPos;z:I
-
-
Constructor Details
-
ChunkPos
public ChunkPos(int x, int z) - Mappings:
Namespace Name Mixin selector official <init>Lclr;<init>(II)Vintermediary <init>Lnet/minecraft/class_1923;<init>(II)Vnamed <init>Lnet/minecraft/util/math/ChunkPos;<init>(II)V
-
ChunkPos
- Mappings:
Namespace Name Mixin selector official <init>Lclr;<init>(Lgu;)Vintermediary <init>Lnet/minecraft/class_1923;<init>(Lnet/minecraft/class_2338;)Vnamed <init>Lnet/minecraft/util/math/ChunkPos;<init>(Lnet/minecraft/util/math/BlockPos;)V
-
ChunkPos
public ChunkPos(long pos) - Mappings:
Namespace Name Mixin selector official <init>Lclr;<init>(J)Vintermediary <init>Lnet/minecraft/class_1923;<init>(J)Vnamed <init>Lnet/minecraft/util/math/ChunkPos;<init>(J)V
-
-
Method Details
-
fromRegion
- Mappings:
Namespace Name Mixin selector official aLclr;a(II)Lclr;intermediary method_42305Lnet/minecraft/class_1923;method_42305(II)Lnet/minecraft/class_1923;named fromRegionLnet/minecraft/util/math/ChunkPos;fromRegion(II)Lnet/minecraft/util/math/ChunkPos;
-
fromRegionCenter
- Mappings:
Namespace Name Mixin selector official bLclr;b(II)Lclr;intermediary method_42306Lnet/minecraft/class_1923;method_42306(II)Lnet/minecraft/class_1923;named fromRegionCenterLnet/minecraft/util/math/ChunkPos;fromRegionCenter(II)Lnet/minecraft/util/math/ChunkPos;
-
toLong
public long toLong()Returns the chunk position serialized aslong.- Returns:
- the chunk position serialized as
long - See Also:
- Mappings:
Namespace Name Mixin selector official aLclr;a()Jintermediary method_8324Lnet/minecraft/class_1923;method_8324()Jnamed toLongLnet/minecraft/util/math/ChunkPos;toLong()J
-
toLong
public static long toLong(int chunkX, int chunkZ) Returns the chunk position serialized aslong.This returns
chunkX | (chunkZ << 32).- Returns:
- the chunk position serialized as
long - See Also:
- Mappings:
Namespace Name Mixin selector official cLclr;c(II)Jintermediary method_8331Lnet/minecraft/class_1923;method_8331(II)Jnamed toLongLnet/minecraft/util/math/ChunkPos;toLong(II)J
-
toLong
Returns the chunk position of the givenposserialized aslong.- Returns:
- the chunk position of the given
posserialized aslong - See Also:
- Mappings:
Namespace Name Mixin selector official aLclr;a(Lgu;)Jintermediary method_37232Lnet/minecraft/class_1923;method_37232(Lnet/minecraft/class_2338;)Jnamed toLongLnet/minecraft/util/math/ChunkPos;toLong(Lnet/minecraft/util/math/BlockPos;)J
-
getPackedX
public static int getPackedX(long pos) - Mappings:
Namespace Name Mixin selector official aLclr;a(J)Iintermediary method_8325Lnet/minecraft/class_1923;method_8325(J)Inamed getPackedXLnet/minecraft/util/math/ChunkPos;getPackedX(J)I
-
getPackedZ
public static int getPackedZ(long pos) - Mappings:
Namespace Name Mixin selector official bLclr;b(J)Iintermediary method_8332Lnet/minecraft/class_1923;method_8332(J)Inamed getPackedZLnet/minecraft/util/math/ChunkPos;getPackedZ(J)I
-
hashCode
public int hashCode() -
hashCode
public static int hashCode(int x, int z) - Mappings:
Namespace Name Mixin selector official dLclr;d(II)Iintermediary method_42307Lnet/minecraft/class_1923;method_42307(II)Inamed hashCodeLnet/minecraft/util/math/ChunkPos;hashCode(II)I
-
equals
-
getCenterX
public int getCenterX()- Mappings:
Namespace Name Mixin selector official bLclr;b()Iintermediary method_33940Lnet/minecraft/class_1923;method_33940()Inamed getCenterXLnet/minecraft/util/math/ChunkPos;getCenterX()I
-
getCenterZ
public int getCenterZ()- Mappings:
Namespace Name Mixin selector official cLclr;c()Iintermediary method_33942Lnet/minecraft/class_1923;method_33942()Inamed getCenterZLnet/minecraft/util/math/ChunkPos;getCenterZ()I
-
getStartX
public int getStartX()- Mappings:
Namespace Name Mixin selector official dLclr;d()Iintermediary method_8326Lnet/minecraft/class_1923;method_8326()Inamed getStartXLnet/minecraft/util/math/ChunkPos;getStartX()I
-
getStartZ
public int getStartZ()- Mappings:
Namespace Name Mixin selector official eLclr;e()Iintermediary method_8328Lnet/minecraft/class_1923;method_8328()Inamed getStartZLnet/minecraft/util/math/ChunkPos;getStartZ()I
-
getEndX
public int getEndX()- Mappings:
Namespace Name Mixin selector official fLclr;f()Iintermediary method_8327Lnet/minecraft/class_1923;method_8327()Inamed getEndXLnet/minecraft/util/math/ChunkPos;getEndX()I
-
getEndZ
public int getEndZ()- Mappings:
Namespace Name Mixin selector official gLclr;g()Iintermediary method_8329Lnet/minecraft/class_1923;method_8329()Inamed getEndZLnet/minecraft/util/math/ChunkPos;getEndZ()I
-
getRegionX
public int getRegionX()- Mappings:
Namespace Name Mixin selector official hLclr;h()Iintermediary method_17885Lnet/minecraft/class_1923;method_17885()Inamed getRegionXLnet/minecraft/util/math/ChunkPos;getRegionX()I
-
getRegionZ
public int getRegionZ()- Mappings:
Namespace Name Mixin selector official iLclr;i()Iintermediary method_17886Lnet/minecraft/class_1923;method_17886()Inamed getRegionZLnet/minecraft/util/math/ChunkPos;getRegionZ()I
-
getRegionRelativeX
public int getRegionRelativeX()- Mappings:
Namespace Name Mixin selector official jLclr;j()Iintermediary method_17887Lnet/minecraft/class_1923;method_17887()Inamed getRegionRelativeXLnet/minecraft/util/math/ChunkPos;getRegionRelativeX()I
-
getRegionRelativeZ
public int getRegionRelativeZ()- Mappings:
Namespace Name Mixin selector official kLclr;k()Iintermediary method_17888Lnet/minecraft/class_1923;method_17888()Inamed getRegionRelativeZLnet/minecraft/util/math/ChunkPos;getRegionRelativeZ()I
-
getBlockPos
- Mappings:
Namespace Name Mixin selector official aLclr;a(III)Lgu;intermediary method_35231Lnet/minecraft/class_1923;method_35231(III)Lnet/minecraft/class_2338;named getBlockPosLnet/minecraft/util/math/ChunkPos;getBlockPos(III)Lnet/minecraft/util/math/BlockPos;
-
getOffsetX
public int getOffsetX(int offset) - Mappings:
Namespace Name Mixin selector official aLclr;a(I)Iintermediary method_33939Lnet/minecraft/class_1923;method_33939(I)Inamed getOffsetXLnet/minecraft/util/math/ChunkPos;getOffsetX(I)I
-
getOffsetZ
public int getOffsetZ(int offset) - Mappings:
Namespace Name Mixin selector official bLclr;b(I)Iintermediary method_33941Lnet/minecraft/class_1923;method_33941(I)Inamed getOffsetZLnet/minecraft/util/math/ChunkPos;getOffsetZ(I)I
-
getCenterAtY
- Mappings:
Namespace Name Mixin selector official cLclr;c(I)Lgu;intermediary method_33943Lnet/minecraft/class_1923;method_33943(I)Lnet/minecraft/class_2338;named getCenterAtYLnet/minecraft/util/math/ChunkPos;getCenterAtY(I)Lnet/minecraft/util/math/BlockPos;
-
toString
-
getStartPos
- Mappings:
Namespace Name Mixin selector official lLclr;l()Lgu;intermediary method_8323Lnet/minecraft/class_1923;method_8323()Lnet/minecraft/class_2338;named getStartPosLnet/minecraft/util/math/ChunkPos;getStartPos()Lnet/minecraft/util/math/BlockPos;
-
getChebyshevDistance
- Mappings:
Namespace Name Mixin selector official aLclr;a(Lclr;)Iintermediary method_24022Lnet/minecraft/class_1923;method_24022(Lnet/minecraft/class_1923;)Inamed getChebyshevDistanceLnet/minecraft/util/math/ChunkPos;getChebyshevDistance(Lnet/minecraft/util/math/ChunkPos;)I
-
stream
- Mappings:
Namespace Name Mixin selector official aLclr;a(Lclr;I)Ljava/util/stream/Stream;intermediary method_19280Lnet/minecraft/class_1923;method_19280(Lnet/minecraft/class_1923;I)Ljava/util/stream/Stream;named streamLnet/minecraft/util/math/ChunkPos;stream(Lnet/minecraft/util/math/ChunkPos;I)Ljava/util/stream/Stream;
-
stream
- Mappings:
Namespace Name Mixin selector official aLclr;a(Lclr;Lclr;)Ljava/util/stream/Stream;intermediary method_19281Lnet/minecraft/class_1923;method_19281(Lnet/minecraft/class_1923;Lnet/minecraft/class_1923;)Ljava/util/stream/Stream;named streamLnet/minecraft/util/math/ChunkPos;stream(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/util/math/ChunkPos;)Ljava/util/stream/Stream;
-