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 intermediary net/minecraft/class_1923official clrnamed 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 intermediary field_36299Lnet/minecraft/class_1923;field_36299:Iofficial gLclr;g: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 intermediary field_17348Lnet/minecraft/class_1923;field_17348:Jofficial aLclr;a:Jnamed MARKERLnet/minecraft/util/math/ChunkPos;MARKER:J
-
ORIGIN
The origin of the chunk position,0, 0.- Mappings:
Namespace Name Mixin selector intermediary field_35107Lnet/minecraft/class_1923;field_35107:Lnet/minecraft/class_1923;official bLclr;b:Lclr;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 intermediary field_30953Lnet/minecraft/class_1923;field_30953:Jofficial hLclr;h: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 intermediary field_30954Lnet/minecraft/class_1923;field_30954:Jofficial iLclr;i: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 intermediary field_30955Lnet/minecraft/class_1923;field_30955:Iofficial jLclr;j: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 intermediary field_38224Lnet/minecraft/class_1923;field_38224:Iofficial cLclr;c: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 intermediary field_30956Lnet/minecraft/class_1923;field_30956:Iofficial kLclr;k: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 intermediary field_38225Lnet/minecraft/class_1923;field_38225:Iofficial dLclr;d: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 intermediary field_30957Lnet/minecraft/class_1923;field_30957:Iofficial lLclr;l: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 intermediary field_30958Lnet/minecraft/class_1923;field_30958:Iofficial mLclr;m: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 intermediary field_30959Lnet/minecraft/class_1923;field_30959:Iofficial nLclr;n:Inamed field_30959Lnet/minecraft/util/math/ChunkPos;field_30959:I
-
x
public final int x- Mappings:
Namespace Name Mixin selector intermediary field_9181Lnet/minecraft/class_1923;field_9181:Iofficial eLclr;e:Inamed xLnet/minecraft/util/math/ChunkPos;x:I
-
z
public final int z- Mappings:
Namespace Name Mixin selector intermediary field_9180Lnet/minecraft/class_1923;field_9180:Iofficial fLclr;f:Inamed zLnet/minecraft/util/math/ChunkPos;z:I
-
-
Constructor Details
-
ChunkPos
public ChunkPos(int x, int z) - Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_1923;<init>(II)Vofficial <init>Lclr;<init>(II)Vnamed <init>Lnet/minecraft/util/math/ChunkPos;<init>(II)V
-
ChunkPos
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_1923;<init>(Lnet/minecraft/class_2338;)Vofficial <init>Lclr;<init>(Lgu;)Vnamed <init>Lnet/minecraft/util/math/ChunkPos;<init>(Lnet/minecraft/util/math/BlockPos;)V
-
ChunkPos
public ChunkPos(long pos) - Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_1923;<init>(J)Vofficial <init>Lclr;<init>(J)Vnamed <init>Lnet/minecraft/util/math/ChunkPos;<init>(J)V
-
-
Method Details
-
fromRegion
- Mappings:
Namespace Name Mixin selector intermediary method_42305Lnet/minecraft/class_1923;method_42305(II)Lnet/minecraft/class_1923;official aLclr;a(II)Lclr;named fromRegionLnet/minecraft/util/math/ChunkPos;fromRegion(II)Lnet/minecraft/util/math/ChunkPos;
-
fromRegionCenter
- Mappings:
Namespace Name Mixin selector intermediary method_42306Lnet/minecraft/class_1923;method_42306(II)Lnet/minecraft/class_1923;official bLclr;b(II)Lclr;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 intermediary method_8324Lnet/minecraft/class_1923;method_8324()Jofficial aLclr;a()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 intermediary method_8331Lnet/minecraft/class_1923;method_8331(II)Jofficial cLclr;c(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 intermediary method_37232Lnet/minecraft/class_1923;method_37232(Lnet/minecraft/class_2338;)Jofficial aLclr;a(Lgu;)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 intermediary method_8325Lnet/minecraft/class_1923;method_8325(J)Iofficial aLclr;a(J)Inamed getPackedXLnet/minecraft/util/math/ChunkPos;getPackedX(J)I
-
getPackedZ
public static int getPackedZ(long pos) - Mappings:
Namespace Name Mixin selector intermediary method_8332Lnet/minecraft/class_1923;method_8332(J)Iofficial bLclr;b(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 intermediary method_42307Lnet/minecraft/class_1923;method_42307(II)Iofficial dLclr;d(II)Inamed hashCodeLnet/minecraft/util/math/ChunkPos;hashCode(II)I
-
equals
-
getCenterX
public int getCenterX()- Mappings:
Namespace Name Mixin selector intermediary method_33940Lnet/minecraft/class_1923;method_33940()Iofficial bLclr;b()Inamed getCenterXLnet/minecraft/util/math/ChunkPos;getCenterX()I
-
getCenterZ
public int getCenterZ()- Mappings:
Namespace Name Mixin selector intermediary method_33942Lnet/minecraft/class_1923;method_33942()Iofficial cLclr;c()Inamed getCenterZLnet/minecraft/util/math/ChunkPos;getCenterZ()I
-
getStartX
public int getStartX()- Mappings:
Namespace Name Mixin selector intermediary method_8326Lnet/minecraft/class_1923;method_8326()Iofficial dLclr;d()Inamed getStartXLnet/minecraft/util/math/ChunkPos;getStartX()I
-
getStartZ
public int getStartZ()- Mappings:
Namespace Name Mixin selector intermediary method_8328Lnet/minecraft/class_1923;method_8328()Iofficial eLclr;e()Inamed getStartZLnet/minecraft/util/math/ChunkPos;getStartZ()I
-
getEndX
public int getEndX()- Mappings:
Namespace Name Mixin selector intermediary method_8327Lnet/minecraft/class_1923;method_8327()Iofficial fLclr;f()Inamed getEndXLnet/minecraft/util/math/ChunkPos;getEndX()I
-
getEndZ
public int getEndZ()- Mappings:
Namespace Name Mixin selector intermediary method_8329Lnet/minecraft/class_1923;method_8329()Iofficial gLclr;g()Inamed getEndZLnet/minecraft/util/math/ChunkPos;getEndZ()I
-
getRegionX
public int getRegionX()- Mappings:
Namespace Name Mixin selector intermediary method_17885Lnet/minecraft/class_1923;method_17885()Iofficial hLclr;h()Inamed getRegionXLnet/minecraft/util/math/ChunkPos;getRegionX()I
-
getRegionZ
public int getRegionZ()- Mappings:
Namespace Name Mixin selector intermediary method_17886Lnet/minecraft/class_1923;method_17886()Iofficial iLclr;i()Inamed getRegionZLnet/minecraft/util/math/ChunkPos;getRegionZ()I
-
getRegionRelativeX
public int getRegionRelativeX()- Mappings:
Namespace Name Mixin selector intermediary method_17887Lnet/minecraft/class_1923;method_17887()Iofficial jLclr;j()Inamed getRegionRelativeXLnet/minecraft/util/math/ChunkPos;getRegionRelativeX()I
-
getRegionRelativeZ
public int getRegionRelativeZ()- Mappings:
Namespace Name Mixin selector intermediary method_17888Lnet/minecraft/class_1923;method_17888()Iofficial kLclr;k()Inamed getRegionRelativeZLnet/minecraft/util/math/ChunkPos;getRegionRelativeZ()I
-
getBlockPos
- Mappings:
Namespace Name Mixin selector intermediary method_35231Lnet/minecraft/class_1923;method_35231(III)Lnet/minecraft/class_2338;official aLclr;a(III)Lgu;named getBlockPosLnet/minecraft/util/math/ChunkPos;getBlockPos(III)Lnet/minecraft/util/math/BlockPos;
-
getOffsetX
public int getOffsetX(int offset) - Mappings:
Namespace Name Mixin selector intermediary method_33939Lnet/minecraft/class_1923;method_33939(I)Iofficial aLclr;a(I)Inamed getOffsetXLnet/minecraft/util/math/ChunkPos;getOffsetX(I)I
-
getOffsetZ
public int getOffsetZ(int offset) - Mappings:
Namespace Name Mixin selector intermediary method_33941Lnet/minecraft/class_1923;method_33941(I)Iofficial bLclr;b(I)Inamed getOffsetZLnet/minecraft/util/math/ChunkPos;getOffsetZ(I)I
-
getCenterAtY
- Mappings:
Namespace Name Mixin selector intermediary method_33943Lnet/minecraft/class_1923;method_33943(I)Lnet/minecraft/class_2338;official cLclr;c(I)Lgu;named getCenterAtYLnet/minecraft/util/math/ChunkPos;getCenterAtY(I)Lnet/minecraft/util/math/BlockPos;
-
toString
-
getStartPos
- Mappings:
Namespace Name Mixin selector intermediary method_8323Lnet/minecraft/class_1923;method_8323()Lnet/minecraft/class_2338;official lLclr;l()Lgu;named getStartPosLnet/minecraft/util/math/ChunkPos;getStartPos()Lnet/minecraft/util/math/BlockPos;
-
getChebyshevDistance
- Mappings:
Namespace Name Mixin selector intermediary method_24022Lnet/minecraft/class_1923;method_24022(Lnet/minecraft/class_1923;)Iofficial aLclr;a(Lclr;)Inamed getChebyshevDistanceLnet/minecraft/util/math/ChunkPos;getChebyshevDistance(Lnet/minecraft/util/math/ChunkPos;)I
-
stream
- Mappings:
Namespace Name Mixin selector intermediary method_19280Lnet/minecraft/class_1923;method_19280(Lnet/minecraft/class_1923;I)Ljava/util/stream/Stream;official aLclr;a(Lclr;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 intermediary method_19281Lnet/minecraft/class_1923;method_19281(Lnet/minecraft/class_1923;Lnet/minecraft/class_1923;)Ljava/util/stream/Stream;official aLclr;a(Lclr;Lclr;)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;
-