Class BlockPos
- All Implemented Interfaces:
- Comparable<Vec3i>
- Direct Known Subclasses:
- BlockPos.Mutable
The position is integer-valued.
A block position may be mutable; hence, when using block positions
 obtained from other places as map keys, etc., you should call toImmutable() to obtain an immutable block position.
- Mappings:
- Namespace - Name - official - hx- intermediary - net/minecraft/class_2338- named - net/minecraft/util/math/BlockPos
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final longprivate static final longprivate static final longstatic final com.mojang.serialization.Codec<BlockPos>private static final intprivate static final Loggerstatic final BlockPosThe block position which x, y, and z values are all zero.private static final intstatic final intprivate static final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionadd(int int2, int int3, int int4) Returns another Vec3i whose coordinates have the parameter x, y, and z added to the coordinates of this vector.static longadd(long value, int x, int y, int z) Returns another Vec3i whose coordinates have the coordinates ofvecadded to the coordinates of this vector.longasLong()static longasLong(int x, int y, int z) crossProduct(Vec3i pos) down()Returns a vector which is offset by1in the downward direction.down(int int2) Returns a vector which is offset bydistancein the downward direction.east()Returns a vector which is offset by1in the eastward direction.east(int distance) Returns a vector which is offset bydistancein the eastward direction.findClosest(BlockPos pos, int horizontalRange, int verticalRange, Predicate<BlockPos> condition) static BlockPosfromLong(long packedPos) iterate(int startX, int startY, int startZ, int endX, int endY, int endZ) static Iterable<BlockPos.Mutable>iterateInSquare(BlockPos center, int radius, Direction firstDirection, Direction secondDirection) Iterates block positions around thecenterin a square of (2 * radius + 1) by (2 * radius + 1).iterateOutwards(BlockPos center, int rangeX, int rangeY, int rangeZ) Iterates block positions around thecenter.iterateRandomly(Random random, int count, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) Iterates throughcountrandom block positions in the given area.iterateRandomly(Random random, int count, BlockPos around, int range) Iterates throughcountrandom block positions in a given range around the given position.static intiterateRecursively(BlockPos pos, int maxDepth, int maxIterations, BiConsumer<BlockPos, Consumer<BlockPos>> nextQueuer, Predicate<BlockPos> callback) Iterates fromposrecursively, like in a fill tool in a raster image editor.multiply(int int2) Returns a vector with all components multiplied byscale.Returns a mutable copy of this block position.north()Returns a vector which is offset by1in the northward direction.north(int distance) Returns a vector which is offset bydistancein the northward direction.static BlockPosofFloored(double x, double y, double z) static BlockPosstatic longReturns a vector which is offset by1indirectiondirection.offset(Direction.Axis axis, int int2) Returns a vector which is offset bydistanceonaxisaxis.Returns a vector which is offset bydistanceindirectiondirection.static longremoveChunkSectionLocalY(long y) rotate(BlockRotation rotation) south()Returns a vector which is offset by1in the southward direction.south(int distance) Returns a vector which is offset bydistancein the southward direction.stream(int startX, int startY, int startZ, int endX, int endY, int endZ) streamOutwards(BlockPos center, int maxX, int maxY, int maxZ) Deprecated.Returns another Vec3i whose coordinates have the coordinates ofvecsubtracted from the coordinates of this vector.Returns the center of this block position.Returns an immutable block position with the same x, y, and z as this position.static intunpackLongX(long packedPos) static intunpackLongY(long packedPos) static intunpackLongZ(long packedPos) up()Returns a vector which is offset by1in the upward direction.up(int distance) Returns a vector which is offset bydistancein the upward direction.west()Returns a vector which is offset by1in the westward direction.west(int distance) Returns a vector which is offset bydistancein the westward direction.withY(int y) Methods inherited from class net.minecraft.util.math.Vec3icompareTo, createOffsetCodec, equals, getComponentAlongAxis, getManhattanDistance, getSquaredDistance, getSquaredDistance, getSquaredDistance, getSquaredDistanceFromCenter, getX, getY, getZ, hashCode, isWithinDistance, isWithinDistance, setX, setY, setZ, toShortString, toString
- 
Field Details- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a:Lcom/mojang/serialization/Codec;- intermediary - field_25064- Lnet/minecraft/class_2338;field_25064:Lcom/mojang/serialization/Codec;- named - CODEC- Lnet/minecraft/util/math/BlockPos;CODEC:Lcom/mojang/serialization/Codec;
 
- 
LOGGER- Mappings:
- Namespace - Name - Mixin selector - official - d- Lhx;d:Lorg/slf4j/Logger;- intermediary - field_18789- Lnet/minecraft/class_2338;field_18789:Lorg/slf4j/Logger;- named - LOGGER- Lnet/minecraft/util/math/BlockPos;LOGGER:Lorg/slf4j/Logger;
 
- 
ORIGINThe block position which x, y, and z values are all zero.- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b:Lhx;- intermediary - field_10980- Lnet/minecraft/class_2338;field_10980:Lnet/minecraft/class_2338;- named - ORIGIN- Lnet/minecraft/util/math/BlockPos;ORIGIN:Lnet/minecraft/util/math/BlockPos;
 
- 
SIZE_BITS_Xprivate static final int SIZE_BITS_X- Mappings:
- Namespace - Name - Mixin selector - official - e- Lhx;e:I- intermediary - field_10978- Lnet/minecraft/class_2338;field_10978:I- named - SIZE_BITS_X- Lnet/minecraft/util/math/BlockPos;SIZE_BITS_X:I
 
- 
SIZE_BITS_Zprivate static final int SIZE_BITS_Z- Mappings:
- Namespace - Name - Mixin selector - official - h- Lhx;h:I- intermediary - field_10977- Lnet/minecraft/class_2338;field_10977:I- named - SIZE_BITS_Z- Lnet/minecraft/util/math/BlockPos;SIZE_BITS_Z:I
 
- 
SIZE_BITS_Ypublic static final int SIZE_BITS_Y- Mappings:
- Namespace - Name - Mixin selector - official - c- Lhx;c:I- intermediary - field_10975- Lnet/minecraft/class_2338;field_10975:I- named - SIZE_BITS_Y- Lnet/minecraft/util/math/BlockPos;SIZE_BITS_Y:I
 
- 
BITS_Xprivate static final long BITS_X- Mappings:
- Namespace - Name - Mixin selector - official - i- Lhx;i:J- intermediary - field_10976- Lnet/minecraft/class_2338;field_10976:J- named - BITS_X- Lnet/minecraft/util/math/BlockPos;BITS_X:J
 
- 
BITS_Yprivate static final long BITS_Y- Mappings:
- Namespace - Name - Mixin selector - official - j- Lhx;j:J- intermediary - field_10974- Lnet/minecraft/class_2338;field_10974:J- named - BITS_Y- Lnet/minecraft/util/math/BlockPos;BITS_Y:J
 
- 
BITS_Zprivate static final long BITS_Z- Mappings:
- Namespace - Name - Mixin selector - official - k- Lhx;k:J- intermediary - field_10973- Lnet/minecraft/class_2338;field_10973:J- named - BITS_Z- Lnet/minecraft/util/math/BlockPos;BITS_Z:J
 
- 
field_33083private static final int field_33083- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - l- Lhx;l:I- intermediary - field_33083- Lnet/minecraft/class_2338;field_33083:I- named - field_33083- Lnet/minecraft/util/math/BlockPos;field_33083:I
 
- 
BIT_SHIFT_Zprivate static final int BIT_SHIFT_Z- Mappings:
- Namespace - Name - Mixin selector - official - m- Lhx;m:I- intermediary - field_10983- Lnet/minecraft/class_2338;field_10983:I- named - BIT_SHIFT_Z- Lnet/minecraft/util/math/BlockPos;BIT_SHIFT_Z:I
 
- 
BIT_SHIFT_Xprivate static final int BIT_SHIFT_X- Mappings:
- Namespace - Name - Mixin selector - official - n- Lhx;n:I- intermediary - field_10981- Lnet/minecraft/class_2338;field_10981:I- named - BIT_SHIFT_X- Lnet/minecraft/util/math/BlockPos;BIT_SHIFT_X:I
 
 
- 
- 
Constructor Details- 
BlockPospublic BlockPos(int x, int y, int z) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Ljb;<init>(III)V- intermediary - <init>- Lnet/minecraft/class_2382;<init>(III)V- named - <init>- Lnet/minecraft/util/math/Vec3i;<init>(III)V
 
- 
BlockPos- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lhx;<init>(Ljb;)V- intermediary - <init>- Lnet/minecraft/class_2338;<init>(Lnet/minecraft/class_2382;)V- named - <init>- Lnet/minecraft/util/math/BlockPos;<init>(Lnet/minecraft/util/math/Vec3i;)V
 
 
- 
- 
Method Details- 
offset- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(JLic;)J- intermediary - method_10060- Lnet/minecraft/class_2338;method_10060(JLnet/minecraft/class_2350;)J- named - offset- Lnet/minecraft/util/math/BlockPos;offset(JLnet/minecraft/util/math/Direction;)J
 
- 
addpublic static long add(long value, int x, int y, int z) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(JIII)J- intermediary - method_10096- Lnet/minecraft/class_2338;method_10096(JIII)J- named - add- Lnet/minecraft/util/math/BlockPos;add(JIII)J
 
- 
unpackLongXpublic static int unpackLongX(long packedPos) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(J)I- intermediary - method_10061- Lnet/minecraft/class_2338;method_10061(J)I- named - unpackLongX- Lnet/minecraft/util/math/BlockPos;unpackLongX(J)I
 
- 
unpackLongYpublic static int unpackLongY(long packedPos) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b(J)I- intermediary - method_10071- Lnet/minecraft/class_2338;method_10071(J)I- named - unpackLongY- Lnet/minecraft/util/math/BlockPos;unpackLongY(J)I
 
- 
unpackLongZpublic static int unpackLongZ(long packedPos) - Mappings:
- Namespace - Name - Mixin selector - official - c- Lhx;c(J)I- intermediary - method_10083- Lnet/minecraft/class_2338;method_10083(J)I- named - unpackLongZ- Lnet/minecraft/util/math/BlockPos;unpackLongZ(J)I
 
- 
fromLong- Mappings:
- Namespace - Name - Mixin selector - official - d- Lhx;d(J)Lhx;- intermediary - method_10092- Lnet/minecraft/class_2338;method_10092(J)Lnet/minecraft/class_2338;- named - fromLong- Lnet/minecraft/util/math/BlockPos;fromLong(J)Lnet/minecraft/util/math/BlockPos;
 
- 
ofFloored- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(DDD)Lhx;- intermediary - method_49637- Lnet/minecraft/class_2338;method_49637(DDD)Lnet/minecraft/class_2338;- named - ofFloored- Lnet/minecraft/util/math/BlockPos;ofFloored(DDD)Lnet/minecraft/util/math/BlockPos;
 
- 
ofFloored- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lir;)Lhx;- intermediary - method_49638- Lnet/minecraft/class_2338;method_49638(Lnet/minecraft/class_2374;)Lnet/minecraft/class_2338;- named - ofFloored- Lnet/minecraft/util/math/BlockPos;ofFloored(Lnet/minecraft/util/math/Position;)Lnet/minecraft/util/math/BlockPos;
 
- 
asLongpublic long asLong()- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a()J- intermediary - method_10063- Lnet/minecraft/class_2338;method_10063()J- named - asLong- Lnet/minecraft/util/math/BlockPos;asLong()J
 
- 
asLongpublic static long asLong(int x, int y, int z) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(III)J- intermediary - method_10064- Lnet/minecraft/class_2338;method_10064(III)J- named - asLong- Lnet/minecraft/util/math/BlockPos;asLong(III)J
 
- 
removeChunkSectionLocalYpublic static long removeChunkSectionLocalY(long y) - Mappings:
- Namespace - Name - Mixin selector - official - e- Lhx;e(J)J- intermediary - method_10091- Lnet/minecraft/class_2338;method_10091(J)J- named - removeChunkSectionLocalY- Lnet/minecraft/util/math/BlockPos;removeChunkSectionLocalY(J)J
 
- 
addDescription copied from class:Vec3iReturns another Vec3i whose coordinates have the parameter x, y, and z added to the coordinates of this vector.This method always returns an immutable object. - Overrides:
- addin class- Vec3i
- Returns:
- another Vec3i whose coordinates have the parameter x, y, and z added to the coordinates of this vector
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b(III)Lhx;- intermediary - method_10069- Lnet/minecraft/class_2338;method_10069(III)Lnet/minecraft/class_2338;- named - add- Lnet/minecraft/util/math/BlockPos;add(III)Lnet/minecraft/util/math/BlockPos;
 
- 
toCenterPosReturns the center of this block position.- Returns:
- the center of this block position
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b()Lelt;- intermediary - method_46558- Lnet/minecraft/class_2338;method_46558()Lnet/minecraft/class_243;- named - toCenterPos- Lnet/minecraft/util/math/BlockPos;toCenterPos()Lnet/minecraft/util/math/Vec3d;
 
- 
addDescription copied from class:Vec3iReturns another Vec3i whose coordinates have the coordinates ofvecadded to the coordinates of this vector.This method always returns an immutable object. - Overrides:
- addin class- Vec3i
- Returns:
- another Vec3i whose coordinates have the coordinates of vecadded to the coordinates of this vector
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Ljb;)Lhx;- intermediary - method_10081- Lnet/minecraft/class_2338;method_10081(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338;- named - add- Lnet/minecraft/util/math/BlockPos;add(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos;
 
- 
subtractDescription copied from class:Vec3iReturns another Vec3i whose coordinates have the coordinates ofvecsubtracted from the coordinates of this vector.This method always returns an immutable object. - Overrides:
- subtractin class- Vec3i
- Returns:
- another Vec3i whose coordinates have the coordinates of vecsubtracted from the coordinates of this vector
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b(Ljb;)Lhx;- intermediary - method_10059- Lnet/minecraft/class_2338;method_10059(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338;- named - subtract- Lnet/minecraft/util/math/BlockPos;subtract(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos;
 
- 
multiplyDescription copied from class:Vec3iReturns a vector with all components multiplied byscale.- Overrides:
- multiplyin class- Vec3i
- Returns:
- a vector with all components multiplied by scale
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(I)Lhx;- intermediary - method_35830- Lnet/minecraft/class_2338;method_35830(I)Lnet/minecraft/class_2338;- named - multiply- Lnet/minecraft/util/math/BlockPos;multiply(I)Lnet/minecraft/util/math/BlockPos;
 
- 
upDescription copied from class:Vec3iReturns a vector which is offset by1in the upward direction.- Overrides:
- upin class- Vec3i
- Returns:
- a vector which is offset by 1in the upward direction
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lhx;c()Lhx;- intermediary - method_10084- Lnet/minecraft/class_2338;method_10084()Lnet/minecraft/class_2338;- named - up- Lnet/minecraft/util/math/BlockPos;up()Lnet/minecraft/util/math/BlockPos;
 
- 
upDescription copied from class:Vec3iReturns a vector which is offset bydistancein the upward direction.- Overrides:
- upin class- Vec3i
- Returns:
- a vector which is offset by distancein the upward direction
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b(I)Lhx;- intermediary - method_10086- Lnet/minecraft/class_2338;method_10086(I)Lnet/minecraft/class_2338;- named - up- Lnet/minecraft/util/math/BlockPos;up(I)Lnet/minecraft/util/math/BlockPos;
 
- 
downDescription copied from class:Vec3iReturns a vector which is offset by1in the downward direction.- Overrides:
- downin class- Vec3i
- Returns:
- a vector which is offset by 1in the downward direction
- Mappings:
- Namespace - Name - Mixin selector - official - d- Lhx;d()Lhx;- intermediary - method_10074- Lnet/minecraft/class_2338;method_10074()Lnet/minecraft/class_2338;- named - down- Lnet/minecraft/util/math/BlockPos;down()Lnet/minecraft/util/math/BlockPos;
 
- 
downDescription copied from class:Vec3iReturns a vector which is offset bydistancein the downward direction.- Overrides:
- downin class- Vec3i
- Returns:
- a vector which is offset by distancein the downward direction
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lhx;c(I)Lhx;- intermediary - method_10087- Lnet/minecraft/class_2338;method_10087(I)Lnet/minecraft/class_2338;- named - down- Lnet/minecraft/util/math/BlockPos;down(I)Lnet/minecraft/util/math/BlockPos;
 
- 
northDescription copied from class:Vec3iReturns a vector which is offset by1in the northward direction.- Overrides:
- northin class- Vec3i
- Returns:
- a vector which is offset by 1in the northward direction
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lhx;e()Lhx;- intermediary - method_10095- Lnet/minecraft/class_2338;method_10095()Lnet/minecraft/class_2338;- named - north- Lnet/minecraft/util/math/BlockPos;north()Lnet/minecraft/util/math/BlockPos;
 
- 
northDescription copied from class:Vec3iReturns a vector which is offset bydistancein the northward direction.- Overrides:
- northin class- Vec3i
- Returns:
- a vector which is offset by distancein the northward direction
- Mappings:
- Namespace - Name - Mixin selector - official - d- Lhx;d(I)Lhx;- intermediary - method_10076- Lnet/minecraft/class_2338;method_10076(I)Lnet/minecraft/class_2338;- named - north- Lnet/minecraft/util/math/BlockPos;north(I)Lnet/minecraft/util/math/BlockPos;
 
- 
southDescription copied from class:Vec3iReturns a vector which is offset by1in the southward direction.- Overrides:
- southin class- Vec3i
- Returns:
- a vector which is offset by 1in the southward direction
- Mappings:
- Namespace - Name - Mixin selector - official - f- Lhx;f()Lhx;- intermediary - method_10072- Lnet/minecraft/class_2338;method_10072()Lnet/minecraft/class_2338;- named - south- Lnet/minecraft/util/math/BlockPos;south()Lnet/minecraft/util/math/BlockPos;
 
- 
southDescription copied from class:Vec3iReturns a vector which is offset bydistancein the southward direction.- Overrides:
- southin class- Vec3i
- Returns:
- a vector which is offset by distancein the southward direction
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lhx;e(I)Lhx;- intermediary - method_10077- Lnet/minecraft/class_2338;method_10077(I)Lnet/minecraft/class_2338;- named - south- Lnet/minecraft/util/math/BlockPos;south(I)Lnet/minecraft/util/math/BlockPos;
 
- 
westDescription copied from class:Vec3iReturns a vector which is offset by1in the westward direction.- Overrides:
- westin class- Vec3i
- Returns:
- a vector which is offset by 1in the westward direction
- Mappings:
- Namespace - Name - Mixin selector - official - g- Lhx;g()Lhx;- intermediary - method_10067- Lnet/minecraft/class_2338;method_10067()Lnet/minecraft/class_2338;- named - west- Lnet/minecraft/util/math/BlockPos;west()Lnet/minecraft/util/math/BlockPos;
 
- 
westDescription copied from class:Vec3iReturns a vector which is offset bydistancein the westward direction.- Overrides:
- westin class- Vec3i
- Returns:
- a vector which is offset by distancein the westward direction
- Mappings:
- Namespace - Name - Mixin selector - official - f- Lhx;f(I)Lhx;- intermediary - method_10088- Lnet/minecraft/class_2338;method_10088(I)Lnet/minecraft/class_2338;- named - west- Lnet/minecraft/util/math/BlockPos;west(I)Lnet/minecraft/util/math/BlockPos;
 
- 
eastDescription copied from class:Vec3iReturns a vector which is offset by1in the eastward direction.- Overrides:
- eastin class- Vec3i
- Returns:
- a vector which is offset by 1in the eastward direction
- Mappings:
- Namespace - Name - Mixin selector - official - h- Lhx;h()Lhx;- intermediary - method_10078- Lnet/minecraft/class_2338;method_10078()Lnet/minecraft/class_2338;- named - east- Lnet/minecraft/util/math/BlockPos;east()Lnet/minecraft/util/math/BlockPos;
 
- 
eastDescription copied from class:Vec3iReturns a vector which is offset bydistancein the eastward direction.- Overrides:
- eastin class- Vec3i
- Returns:
- a vector which is offset by distancein the eastward direction
- Mappings:
- Namespace - Name - Mixin selector - official - g- Lhx;g(I)Lhx;- intermediary - method_10089- Lnet/minecraft/class_2338;method_10089(I)Lnet/minecraft/class_2338;- named - east- Lnet/minecraft/util/math/BlockPos;east(I)Lnet/minecraft/util/math/BlockPos;
 
- 
offsetDescription copied from class:Vec3iReturns a vector which is offset by1indirectiondirection.- Overrides:
- offsetin class- Vec3i
- Returns:
- a vector which is offset by 1indirectiondirection
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lic;)Lhx;- intermediary - method_10093- Lnet/minecraft/class_2338;method_10093(Lnet/minecraft/class_2350;)Lnet/minecraft/class_2338;- named - offset- Lnet/minecraft/util/math/BlockPos;offset(Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/BlockPos;
 
- 
offsetDescription copied from class:Vec3iReturns a vector which is offset bydistanceindirectiondirection.- Overrides:
- offsetin class- Vec3i
- Returns:
- a vector which is offset by distanceindirectiondirection
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lic;I)Lhx;- intermediary - method_10079- Lnet/minecraft/class_2338;method_10079(Lnet/minecraft/class_2350;I)Lnet/minecraft/class_2338;- named - offset- Lnet/minecraft/util/math/BlockPos;offset(Lnet/minecraft/util/math/Direction;I)Lnet/minecraft/util/math/BlockPos;
 
- 
offsetDescription copied from class:Vec3iReturns a vector which is offset bydistanceonaxisaxis.- Overrides:
- offsetin class- Vec3i
- Returns:
- a vector which is offset by distanceonaxisaxis
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lic$a;I)Lhx;- intermediary - method_30513- Lnet/minecraft/class_2338;method_30513(Lnet/minecraft/class_2350$class_2351;I)Lnet/minecraft/class_2338;- named - offset- Lnet/minecraft/util/math/BlockPos;offset(Lnet/minecraft/util/math/Direction$Axis;I)Lnet/minecraft/util/math/BlockPos;
 
- 
rotate- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lddc;)Lhx;- intermediary - method_10070- Lnet/minecraft/class_2338;method_10070(Lnet/minecraft/class_2470;)Lnet/minecraft/class_2338;- named - rotate- Lnet/minecraft/util/math/BlockPos;rotate(Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/util/math/BlockPos;
 
- 
crossProduct- Overrides:
- crossProductin class- Vec3i
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lhx;c(Ljb;)Lhx;- intermediary - method_10075- Lnet/minecraft/class_2338;method_10075(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338;- named - crossProduct- Lnet/minecraft/util/math/BlockPos;crossProduct(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos;
 
- 
withY- Mappings:
- Namespace - Name - Mixin selector - official - h- Lhx;h(I)Lhx;- intermediary - method_33096- Lnet/minecraft/class_2338;method_33096(I)Lnet/minecraft/class_2338;- named - withY- Lnet/minecraft/util/math/BlockPos;withY(I)Lnet/minecraft/util/math/BlockPos;
 
- 
toImmutableReturns an immutable block position with the same x, y, and z as this position.This method should be called when a block position is used as map keys as to prevent side effects of mutations of mutable block positions. - Mappings:
- Namespace - Name - Mixin selector - official - i- Lhx;i()Lhx;- intermediary - method_10062- Lnet/minecraft/class_2338;method_10062()Lnet/minecraft/class_2338;- named - toImmutable- Lnet/minecraft/util/math/BlockPos;toImmutable()Lnet/minecraft/util/math/BlockPos;
 
- 
mutableCopyReturns a mutable copy of this block position.If this block position is a mutable one, mutation to this block position won't affect the returned position. - Mappings:
- Namespace - Name - Mixin selector - official - j- Lhx;j()Lhx$a;- intermediary - method_25503- Lnet/minecraft/class_2338;method_25503()Lnet/minecraft/class_2338$class_2339;- named - mutableCopy- Lnet/minecraft/util/math/BlockPos;mutableCopy()Lnet/minecraft/util/math/BlockPos$Mutable;
 
- 
iterateRandomlypublic static Iterable<BlockPos> iterateRandomly(Random random, int count, BlockPos around, int range) Iterates throughcountrandom block positions in a given range around the given position.The iterator yields positions in no specific order. The same position may be returned multiple times by the iterator. - Parameters:
- count- the number of positions to iterate
- around- the- BlockPosto iterate around
- range- the maximum distance from the given pos in any axis
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lauv;ILhx;I)Ljava/lang/Iterable;- intermediary - method_34848- Lnet/minecraft/class_2338;method_34848(Lnet/minecraft/class_5819;ILnet/minecraft/class_2338;I)Ljava/lang/Iterable;- named - iterateRandomly- Lnet/minecraft/util/math/BlockPos;iterateRandomly(Lnet/minecraft/util/math/random/Random;ILnet/minecraft/util/math/BlockPos;I)Ljava/lang/Iterable;
 
- 
streamSouthEastSquareDeprecated.- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lhx;)Ljava/util/stream/Stream;- intermediary - method_51686- Lnet/minecraft/class_2338;method_51686(Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;- named - streamSouthEastSquare- Lnet/minecraft/util/math/BlockPos;streamSouthEastSquare(Lnet/minecraft/util/math/BlockPos;)Ljava/util/stream/Stream;
 
- 
iterateRandomlypublic static Iterable<BlockPos> iterateRandomly(Random random, int count, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) Iterates throughcountrandom block positions in the given area.The iterator yields positions in no specific order. The same position may be returned multiple times by the iterator. - Parameters:
- count- the number of positions to iterate
- minX- the minimum x value for returned positions
- minY- the minimum y value for returned positions
- minZ- the minimum z value for returned positions
- maxX- the maximum x value for returned positions
- maxY- the maximum y value for returned positions
- maxZ- the maximum z value for returned positions
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lauv;IIIIIII)Ljava/lang/Iterable;- intermediary - method_27156- Lnet/minecraft/class_2338;method_27156(Lnet/minecraft/class_5819;IIIIIII)Ljava/lang/Iterable;- named - iterateRandomly- Lnet/minecraft/util/math/BlockPos;iterateRandomly(Lnet/minecraft/util/math/random/Random;IIIIIII)Ljava/lang/Iterable;
 
- 
iterateOutwardspublic static Iterable<BlockPos> iterateOutwards(BlockPos center, int rangeX, int rangeY, int rangeZ) Iterates block positions around thecenter. The iteration order is mainly based on the manhattan distance of the position from the center.For the same manhattan distance, the positions are iterated by y offset, from negative to positive. For the same y offset, the positions are iterated by x offset, from negative to positive. For the two positions with the same x and y offsets and the same manhattan distance, the one with a positive z offset is visited first before the one with a negative z offset. - Parameters:
- center- the center of iteration
- rangeX- the maximum x difference from the center
- rangeY- the maximum y difference from the center
- rangeZ- the maximum z difference from the center
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lhx;III)Ljava/lang/Iterable;- intermediary - method_25996- Lnet/minecraft/class_2338;method_25996(Lnet/minecraft/class_2338;III)Ljava/lang/Iterable;- named - iterateOutwards- Lnet/minecraft/util/math/BlockPos;iterateOutwards(Lnet/minecraft/util/math/BlockPos;III)Ljava/lang/Iterable;
 
- 
findClosestpublic static Optional<BlockPos> findClosest(BlockPos pos, int horizontalRange, int verticalRange, Predicate<BlockPos> condition) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lhx;IILjava/util/function/Predicate;)Ljava/util/Optional;- intermediary - method_25997- Lnet/minecraft/class_2338;method_25997(Lnet/minecraft/class_2338;IILjava/util/function/Predicate;)Ljava/util/Optional;- named - findClosest- Lnet/minecraft/util/math/BlockPos;findClosest(Lnet/minecraft/util/math/BlockPos;IILjava/util/function/Predicate;)Ljava/util/Optional;
 
- 
streamOutwards- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b(Lhx;III)Ljava/util/stream/Stream;- intermediary - method_25998- Lnet/minecraft/class_2338;method_25998(Lnet/minecraft/class_2338;III)Ljava/util/stream/Stream;- named - streamOutwards- Lnet/minecraft/util/math/BlockPos;streamOutwards(Lnet/minecraft/util/math/BlockPos;III)Ljava/util/stream/Stream;
 
- 
iterate- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lhx;Lhx;)Ljava/lang/Iterable;- intermediary - method_10097- Lnet/minecraft/class_2338;method_10097(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Ljava/lang/Iterable;- named - iterate- Lnet/minecraft/util/math/BlockPos;iterate(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Ljava/lang/Iterable;
 
- 
stream- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b(Lhx;Lhx;)Ljava/util/stream/Stream;- intermediary - method_20437- Lnet/minecraft/class_2338;method_20437(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;- named - stream- Lnet/minecraft/util/math/BlockPos;stream(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Ljava/util/stream/Stream;
 
- 
stream- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Ldyy;)Ljava/util/stream/Stream;- intermediary - method_23627- Lnet/minecraft/class_2338;method_23627(Lnet/minecraft/class_3341;)Ljava/util/stream/Stream;- named - stream- Lnet/minecraft/util/math/BlockPos;stream(Lnet/minecraft/util/math/BlockBox;)Ljava/util/stream/Stream;
 
- 
stream- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lelo;)Ljava/util/stream/Stream;- intermediary - method_29715- Lnet/minecraft/class_2338;method_29715(Lnet/minecraft/class_238;)Ljava/util/stream/Stream;- named - stream- Lnet/minecraft/util/math/BlockPos;stream(Lnet/minecraft/util/math/Box;)Ljava/util/stream/Stream;
 
- 
streampublic static Stream<BlockPos> stream(int startX, int startY, int startZ, int endX, int endY, int endZ) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(IIIIII)Ljava/util/stream/Stream;- intermediary - method_17962- Lnet/minecraft/class_2338;method_17962(IIIIII)Ljava/util/stream/Stream;- named - stream- Lnet/minecraft/util/math/BlockPos;stream(IIIIII)Ljava/util/stream/Stream;
 
- 
iteratepublic static Iterable<BlockPos> iterate(int startX, int startY, int startZ, int endX, int endY, int endZ) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lhx;b(IIIIII)Ljava/lang/Iterable;- intermediary - method_10094- Lnet/minecraft/class_2338;method_10094(IIIIII)Ljava/lang/Iterable;- named - iterate- Lnet/minecraft/util/math/BlockPos;iterate(IIIIII)Ljava/lang/Iterable;
 
- 
iterateInSquarepublic static Iterable<BlockPos.Mutable> iterateInSquare(BlockPos center, int radius, Direction firstDirection, Direction secondDirection) Iterates block positions around thecenterin a square of (2 * radius + 1) by (2 * radius + 1). The blocks are iterated in a (square) spiral around the center.The first block returned is the center, then the iterator moves a block towards the first direction, followed by moving along the second direction. - Parameters:
- center- the center of iteration
- radius- the maximum chebychev distance
- firstDirection- the direction the iterator moves first
- secondDirection- the direction the iterator moves after the first
- Throws:
- IllegalStateException- when the 2 directions lie on the same axis
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lhx;ILic;Lic;)Ljava/lang/Iterable;- intermediary - method_30512- Lnet/minecraft/class_2338;method_30512(Lnet/minecraft/class_2338;ILnet/minecraft/class_2350;Lnet/minecraft/class_2350;)Ljava/lang/Iterable;- named - iterateInSquare- Lnet/minecraft/util/math/BlockPos;iterateInSquare(Lnet/minecraft/util/math/BlockPos;ILnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Direction;)Ljava/lang/Iterable;
 
- 
iterateRecursivelypublic static int iterateRecursively(BlockPos pos, int maxDepth, int maxIterations, BiConsumer<BlockPos, Consumer<BlockPos>> nextQueuer, Predicate<BlockPos> callback) Iterates fromposrecursively, like in a fill tool in a raster image editor.callbackis called once (and only once) for each position it finds. When this returnstrueand the depth/iteration limit is not reached yet,nextQueuerqueues the next (usually neighboring) positions to iterate, with the depth incremented by one.- Parameters:
- pos- the starting position
- maxDepth- the maximum depth of iteration
- maxIterations- the maximum number of total iterations
- nextQueuer- a function that enqueues the next positions
- Returns:
- the total number of iterations
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhx;a(Lhx;IILjava/util/function/BiConsumer;Ljava/util/function/Predicate;)I- intermediary - method_49925- Lnet/minecraft/class_2338;method_49925(Lnet/minecraft/class_2338;IILjava/util/function/BiConsumer;Ljava/util/function/Predicate;)I- named - iterateRecursively- Lnet/minecraft/util/math/BlockPos;iterateRecursively(Lnet/minecraft/util/math/BlockPos;IILjava/util/function/BiConsumer;Ljava/util/function/Predicate;)I
 
 
-