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 named net/minecraft/util/math/BlockPosintermediary net/minecraft/class_2338official jd
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier 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.static final PacketCodec<ByteBuf, BlockPos> private static final intstatic final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier 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) clampToWithin(Vec3d pos) 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.static BlockPosstatic BlockPosmultiply(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.Vec3i
compareTo, 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 named CODECLnet/minecraft/util/math/BlockPos;CODEC:Lcom/mojang/serialization/Codec;intermediary field_25064Lnet/minecraft/class_2338;field_25064:Lcom/mojang/serialization/Codec;official aLjd;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/util/math/BlockPos;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48404Lnet/minecraft/class_2338;field_48404:Lnet/minecraft/class_9139;official bLjd;b:Lyx;
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/util/math/BlockPos;LOGGER:Lorg/slf4j/Logger;intermediary field_18789Lnet/minecraft/class_2338;field_18789:Lorg/slf4j/Logger;official eLjd;e:Lorg/slf4j/Logger;
-
ORIGIN
The block position which x, y, and z values are all zero.- Mappings:
Namespace Name Mixin selector named ORIGINLnet/minecraft/util/math/BlockPos;ORIGIN:Lnet/minecraft/util/math/BlockPos;intermediary field_10980Lnet/minecraft/class_2338;field_10980:Lnet/minecraft/class_2338;official cLjd;c:Ljd;
-
SIZE_BITS_X
private static final int SIZE_BITS_X- Mappings:
Namespace Name Mixin selector named SIZE_BITS_XLnet/minecraft/util/math/BlockPos;SIZE_BITS_X:Iintermediary field_10978Lnet/minecraft/class_2338;field_10978:Iofficial hLjd;h:I
-
SIZE_BITS_Z
private static final int SIZE_BITS_Z- Mappings:
Namespace Name Mixin selector named SIZE_BITS_ZLnet/minecraft/util/math/BlockPos;SIZE_BITS_Z:Iintermediary field_10977Lnet/minecraft/class_2338;field_10977:Iofficial iLjd;i:I
-
SIZE_BITS_Y
public static final int SIZE_BITS_Y- Mappings:
Namespace Name Mixin selector named SIZE_BITS_YLnet/minecraft/util/math/BlockPos;SIZE_BITS_Y:Iintermediary field_10975Lnet/minecraft/class_2338;field_10975:Iofficial dLjd;d:I
-
BITS_X
private static final long BITS_X- Mappings:
Namespace Name Mixin selector named BITS_XLnet/minecraft/util/math/BlockPos;BITS_X:Jintermediary field_10976Lnet/minecraft/class_2338;field_10976:Jofficial jLjd;j:J
-
BITS_Y
private static final long BITS_Y- Mappings:
Namespace Name Mixin selector named BITS_YLnet/minecraft/util/math/BlockPos;BITS_Y:Jintermediary field_10974Lnet/minecraft/class_2338;field_10974:Jofficial kLjd;k:J
-
BITS_Z
private static final long BITS_Z- Mappings:
Namespace Name Mixin selector named BITS_ZLnet/minecraft/util/math/BlockPos;BITS_Z:Jintermediary field_10973Lnet/minecraft/class_2338;field_10973:Jofficial lLjd;l:J
-
field_33083
private static final int field_33083- See Also:
- Mappings:
Namespace Name Mixin selector named field_33083Lnet/minecraft/util/math/BlockPos;field_33083:Iintermediary field_33083Lnet/minecraft/class_2338;field_33083:Iofficial mLjd;m:I
-
BIT_SHIFT_Z
private static final int BIT_SHIFT_Z- Mappings:
Namespace Name Mixin selector named BIT_SHIFT_ZLnet/minecraft/util/math/BlockPos;BIT_SHIFT_Z:Iintermediary field_10983Lnet/minecraft/class_2338;field_10983:Iofficial nLjd;n:I
-
BIT_SHIFT_X
private static final int BIT_SHIFT_X- Mappings:
Namespace Name Mixin selector named BIT_SHIFT_XLnet/minecraft/util/math/BlockPos;BIT_SHIFT_X:Iintermediary field_10981Lnet/minecraft/class_2338;field_10981:Iofficial oLjd;o:I
-
-
Constructor Details
-
BlockPos
public BlockPos(int x, int y, int z) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/util/math/Vec3i;<init>(III)Vintermediary <init>Lnet/minecraft/class_2382;<init>(III)Vofficial <init>Lkh;<init>(III)V
-
BlockPos
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/util/math/BlockPos;<init>(Lnet/minecraft/util/math/Vec3i;)Vintermediary <init>Lnet/minecraft/class_2338;<init>(Lnet/minecraft/class_2382;)Vofficial <init>Ljd;<init>(Lkh;)V
-
-
Method Details
-
offset
- Mappings:
Namespace Name Mixin selector named offsetLnet/minecraft/util/math/BlockPos;offset(JLnet/minecraft/util/math/Direction;)Jintermediary method_10060Lnet/minecraft/class_2338;method_10060(JLnet/minecraft/class_2350;)Jofficial aLjd;a(JLji;)J
-
add
public static long add(long value, int x, int y, int z) - Mappings:
Namespace Name Mixin selector named addLnet/minecraft/util/math/BlockPos;add(JIII)Jintermediary method_10096Lnet/minecraft/class_2338;method_10096(JIII)Jofficial aLjd;a(JIII)J
-
unpackLongX
public static int unpackLongX(long packedPos) - Mappings:
Namespace Name Mixin selector named unpackLongXLnet/minecraft/util/math/BlockPos;unpackLongX(J)Iintermediary method_10061Lnet/minecraft/class_2338;method_10061(J)Iofficial aLjd;a(J)I
-
unpackLongY
public static int unpackLongY(long packedPos) - Mappings:
Namespace Name Mixin selector named unpackLongYLnet/minecraft/util/math/BlockPos;unpackLongY(J)Iintermediary method_10071Lnet/minecraft/class_2338;method_10071(J)Iofficial bLjd;b(J)I
-
unpackLongZ
public static int unpackLongZ(long packedPos) - Mappings:
Namespace Name Mixin selector named unpackLongZLnet/minecraft/util/math/BlockPos;unpackLongZ(J)Iintermediary method_10083Lnet/minecraft/class_2338;method_10083(J)Iofficial cLjd;c(J)I
-
fromLong
- Mappings:
Namespace Name Mixin selector named fromLongLnet/minecraft/util/math/BlockPos;fromLong(J)Lnet/minecraft/util/math/BlockPos;intermediary method_10092Lnet/minecraft/class_2338;method_10092(J)Lnet/minecraft/class_2338;official dLjd;d(J)Ljd;
-
ofFloored
- Mappings:
Namespace Name Mixin selector named ofFlooredLnet/minecraft/util/math/BlockPos;ofFloored(DDD)Lnet/minecraft/util/math/BlockPos;intermediary method_49637Lnet/minecraft/class_2338;method_49637(DDD)Lnet/minecraft/class_2338;official aLjd;a(DDD)Ljd;
-
ofFloored
- Mappings:
Namespace Name Mixin selector named ofFlooredLnet/minecraft/util/math/BlockPos;ofFloored(Lnet/minecraft/util/math/Position;)Lnet/minecraft/util/math/BlockPos;intermediary method_49638Lnet/minecraft/class_2338;method_49638(Lnet/minecraft/class_2374;)Lnet/minecraft/class_2338;official aLjd;a(Ljw;)Ljd;
-
min
- Mappings:
Namespace Name Mixin selector named minLnet/minecraft/util/math/BlockPos;min(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;intermediary method_58249Lnet/minecraft/class_2338;method_58249(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;official aLjd;a(Ljd;Ljd;)Ljd;
-
max
- Mappings:
Namespace Name Mixin selector named maxLnet/minecraft/util/math/BlockPos;max(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;intermediary method_58250Lnet/minecraft/class_2338;method_58250(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;official bLjd;b(Ljd;Ljd;)Ljd;
-
asLong
public long asLong()- Mappings:
Namespace Name Mixin selector named asLongLnet/minecraft/util/math/BlockPos;asLong()Jintermediary method_10063Lnet/minecraft/class_2338;method_10063()Jofficial aLjd;a()J
-
asLong
public static long asLong(int x, int y, int z) - Mappings:
Namespace Name Mixin selector named asLongLnet/minecraft/util/math/BlockPos;asLong(III)Jintermediary method_10064Lnet/minecraft/class_2338;method_10064(III)Jofficial aLjd;a(III)J
-
removeChunkSectionLocalY
public static long removeChunkSectionLocalY(long y) - Mappings:
Namespace Name Mixin selector named removeChunkSectionLocalYLnet/minecraft/util/math/BlockPos;removeChunkSectionLocalY(J)Jintermediary method_10091Lnet/minecraft/class_2338;method_10091(J)Jofficial eLjd;e(J)J
-
add
Description 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 classVec3i- Returns:
- another Vec3i whose coordinates have the parameter x, y, and z added to the coordinates of this vector
- Mappings:
Namespace Name Mixin selector named addLnet/minecraft/util/math/BlockPos;add(III)Lnet/minecraft/util/math/BlockPos;intermediary method_10069Lnet/minecraft/class_2338;method_10069(III)Lnet/minecraft/class_2338;official bLjd;b(III)Ljd;
-
toCenterPos
Returns the center of this block position.- Returns:
- the center of this block position
- See Also:
- Mappings:
Namespace Name Mixin selector named toCenterPosLnet/minecraft/util/math/BlockPos;toCenterPos()Lnet/minecraft/util/math/Vec3d;intermediary method_46558Lnet/minecraft/class_2338;method_46558()Lnet/minecraft/class_243;official bLjd;b()Lexc;
-
toBottomCenterPos
- Mappings:
Namespace Name Mixin selector named toBottomCenterPosLnet/minecraft/util/math/BlockPos;toBottomCenterPos()Lnet/minecraft/util/math/Vec3d;intermediary method_61082Lnet/minecraft/class_2338;method_61082()Lnet/minecraft/class_243;official cLjd;c()Lexc;
-
add
Description 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 classVec3i- Returns:
- another Vec3i whose coordinates have the coordinates of
vecadded to the coordinates of this vector - Mappings:
Namespace Name Mixin selector named addLnet/minecraft/util/math/BlockPos;add(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos;intermediary method_10081Lnet/minecraft/class_2338;method_10081(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338;official aLjd;a(Lkh;)Ljd;
-
subtract
Description 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 classVec3i- Returns:
- another Vec3i whose coordinates have the coordinates of
vecsubtracted from the coordinates of this vector - Mappings:
Namespace Name Mixin selector named subtractLnet/minecraft/util/math/BlockPos;subtract(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos;intermediary method_10059Lnet/minecraft/class_2338;method_10059(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338;official bLjd;b(Lkh;)Ljd;
-
multiply
Description copied from class:Vec3iReturns a vector with all components multiplied byscale.- Overrides:
multiplyin classVec3i- Returns:
- a vector with all components multiplied by
scale - Mappings:
Namespace Name Mixin selector named multiplyLnet/minecraft/util/math/BlockPos;multiply(I)Lnet/minecraft/util/math/BlockPos;intermediary method_35830Lnet/minecraft/class_2338;method_35830(I)Lnet/minecraft/class_2338;official aLjd;a(I)Ljd;
-
up
Description copied from class:Vec3iReturns a vector which is offset by1in the upward direction.- Overrides:
upin classVec3i- Returns:
- a vector which is offset by
1in the upward direction - Mappings:
Namespace Name Mixin selector named upLnet/minecraft/util/math/BlockPos;up()Lnet/minecraft/util/math/BlockPos;intermediary method_10084Lnet/minecraft/class_2338;method_10084()Lnet/minecraft/class_2338;official dLjd;d()Ljd;
-
up
Description copied from class:Vec3iReturns a vector which is offset bydistancein the upward direction.- Overrides:
upin classVec3i- Returns:
- a vector which is offset by
distancein the upward direction - Mappings:
Namespace Name Mixin selector named upLnet/minecraft/util/math/BlockPos;up(I)Lnet/minecraft/util/math/BlockPos;intermediary method_10086Lnet/minecraft/class_2338;method_10086(I)Lnet/minecraft/class_2338;official bLjd;b(I)Ljd;
-
down
Description copied from class:Vec3iReturns a vector which is offset by1in the downward direction.- Overrides:
downin classVec3i- Returns:
- a vector which is offset by
1in the downward direction - Mappings:
Namespace Name Mixin selector named downLnet/minecraft/util/math/BlockPos;down()Lnet/minecraft/util/math/BlockPos;intermediary method_10074Lnet/minecraft/class_2338;method_10074()Lnet/minecraft/class_2338;official eLjd;e()Ljd;
-
down
Description copied from class:Vec3iReturns a vector which is offset bydistancein the downward direction.- Overrides:
downin classVec3i- Returns:
- a vector which is offset by
distancein the downward direction - Mappings:
Namespace Name Mixin selector named downLnet/minecraft/util/math/BlockPos;down(I)Lnet/minecraft/util/math/BlockPos;intermediary method_10087Lnet/minecraft/class_2338;method_10087(I)Lnet/minecraft/class_2338;official cLjd;c(I)Ljd;
-
north
Description copied from class:Vec3iReturns a vector which is offset by1in the northward direction.- Overrides:
northin classVec3i- Returns:
- a vector which is offset by
1in the northward direction - Mappings:
Namespace Name Mixin selector named northLnet/minecraft/util/math/BlockPos;north()Lnet/minecraft/util/math/BlockPos;intermediary method_10095Lnet/minecraft/class_2338;method_10095()Lnet/minecraft/class_2338;official fLjd;f()Ljd;
-
north
Description copied from class:Vec3iReturns a vector which is offset bydistancein the northward direction.- Overrides:
northin classVec3i- Returns:
- a vector which is offset by
distancein the northward direction - Mappings:
Namespace Name Mixin selector named northLnet/minecraft/util/math/BlockPos;north(I)Lnet/minecraft/util/math/BlockPos;intermediary method_10076Lnet/minecraft/class_2338;method_10076(I)Lnet/minecraft/class_2338;official dLjd;d(I)Ljd;
-
south
Description copied from class:Vec3iReturns a vector which is offset by1in the southward direction.- Overrides:
southin classVec3i- Returns:
- a vector which is offset by
1in the southward direction - Mappings:
Namespace Name Mixin selector named southLnet/minecraft/util/math/BlockPos;south()Lnet/minecraft/util/math/BlockPos;intermediary method_10072Lnet/minecraft/class_2338;method_10072()Lnet/minecraft/class_2338;official gLjd;g()Ljd;
-
south
Description copied from class:Vec3iReturns a vector which is offset bydistancein the southward direction.- Overrides:
southin classVec3i- Returns:
- a vector which is offset by
distancein the southward direction - Mappings:
Namespace Name Mixin selector named southLnet/minecraft/util/math/BlockPos;south(I)Lnet/minecraft/util/math/BlockPos;intermediary method_10077Lnet/minecraft/class_2338;method_10077(I)Lnet/minecraft/class_2338;official eLjd;e(I)Ljd;
-
west
Description copied from class:Vec3iReturns a vector which is offset by1in the westward direction.- Overrides:
westin classVec3i- Returns:
- a vector which is offset by
1in the westward direction - Mappings:
Namespace Name Mixin selector named westLnet/minecraft/util/math/BlockPos;west()Lnet/minecraft/util/math/BlockPos;intermediary method_10067Lnet/minecraft/class_2338;method_10067()Lnet/minecraft/class_2338;official hLjd;h()Ljd;
-
west
Description copied from class:Vec3iReturns a vector which is offset bydistancein the westward direction.- Overrides:
westin classVec3i- Returns:
- a vector which is offset by
distancein the westward direction - Mappings:
Namespace Name Mixin selector named westLnet/minecraft/util/math/BlockPos;west(I)Lnet/minecraft/util/math/BlockPos;intermediary method_10088Lnet/minecraft/class_2338;method_10088(I)Lnet/minecraft/class_2338;official fLjd;f(I)Ljd;
-
east
Description copied from class:Vec3iReturns a vector which is offset by1in the eastward direction.- Overrides:
eastin classVec3i- Returns:
- a vector which is offset by
1in the eastward direction - Mappings:
Namespace Name Mixin selector named eastLnet/minecraft/util/math/BlockPos;east()Lnet/minecraft/util/math/BlockPos;intermediary method_10078Lnet/minecraft/class_2338;method_10078()Lnet/minecraft/class_2338;official iLjd;i()Ljd;
-
east
Description copied from class:Vec3iReturns a vector which is offset bydistancein the eastward direction.- Overrides:
eastin classVec3i- Returns:
- a vector which is offset by
distancein the eastward direction - Mappings:
Namespace Name Mixin selector named eastLnet/minecraft/util/math/BlockPos;east(I)Lnet/minecraft/util/math/BlockPos;intermediary method_10089Lnet/minecraft/class_2338;method_10089(I)Lnet/minecraft/class_2338;official gLjd;g(I)Ljd;
-
offset
Description copied from class:Vec3iReturns a vector which is offset by1indirectiondirection.- Overrides:
offsetin classVec3i- Returns:
- a vector which is offset by
1indirectiondirection - Mappings:
Namespace Name Mixin selector named offsetLnet/minecraft/util/math/BlockPos;offset(Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/BlockPos;intermediary method_10093Lnet/minecraft/class_2338;method_10093(Lnet/minecraft/class_2350;)Lnet/minecraft/class_2338;official aLjd;a(Lji;)Ljd;
-
offset
Description copied from class:Vec3iReturns a vector which is offset bydistanceindirectiondirection.- Overrides:
offsetin classVec3i- Returns:
- a vector which is offset by
distanceindirectiondirection - Mappings:
Namespace Name Mixin selector named offsetLnet/minecraft/util/math/BlockPos;offset(Lnet/minecraft/util/math/Direction;I)Lnet/minecraft/util/math/BlockPos;intermediary method_10079Lnet/minecraft/class_2338;method_10079(Lnet/minecraft/class_2350;I)Lnet/minecraft/class_2338;official aLjd;a(Lji;I)Ljd;
-
offset
Description copied from class:Vec3iReturns a vector which is offset bydistanceonaxisaxis.- Overrides:
offsetin classVec3i- Returns:
- a vector which is offset by
distanceonaxisaxis - Mappings:
Namespace Name Mixin selector named offsetLnet/minecraft/util/math/BlockPos;offset(Lnet/minecraft/util/math/Direction$Axis;I)Lnet/minecraft/util/math/BlockPos;intermediary method_30513Lnet/minecraft/class_2338;method_30513(Lnet/minecraft/class_2350$class_2351;I)Lnet/minecraft/class_2338;official aLjd;a(Lji$a;I)Ljd;
-
rotate
- Mappings:
Namespace Name Mixin selector named rotateLnet/minecraft/util/math/BlockPos;rotate(Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/util/math/BlockPos;intermediary method_10070Lnet/minecraft/class_2338;method_10070(Lnet/minecraft/class_2470;)Lnet/minecraft/class_2338;official aLjd;a(Ldmm;)Ljd;
-
crossProduct
- Overrides:
crossProductin classVec3i- Mappings:
Namespace Name Mixin selector named crossProductLnet/minecraft/util/math/BlockPos;crossProduct(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos;intermediary method_10075Lnet/minecraft/class_2338;method_10075(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338;official cLjd;c(Lkh;)Ljd;
-
withY
- Mappings:
Namespace Name Mixin selector named withYLnet/minecraft/util/math/BlockPos;withY(I)Lnet/minecraft/util/math/BlockPos;intermediary method_33096Lnet/minecraft/class_2338;method_33096(I)Lnet/minecraft/class_2338;official hLjd;h(I)Ljd;
-
toImmutable
Returns 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 named toImmutableLnet/minecraft/util/math/BlockPos;toImmutable()Lnet/minecraft/util/math/BlockPos;intermediary method_10062Lnet/minecraft/class_2338;method_10062()Lnet/minecraft/class_2338;official jLjd;j()Ljd;
-
mutableCopy
Returns 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 named mutableCopyLnet/minecraft/util/math/BlockPos;mutableCopy()Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_25503Lnet/minecraft/class_2338;method_25503()Lnet/minecraft/class_2338$class_2339;official kLjd;k()Ljd$a;
-
clampToWithin
- Mappings:
Namespace Name Mixin selector named clampToWithinLnet/minecraft/util/math/BlockPos;clampToWithin(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;intermediary method_60913Lnet/minecraft/class_2338;method_60913(Lnet/minecraft/class_243;)Lnet/minecraft/class_243;official aLjd;a(Lexc;)Lexc;
-
iterateRandomly
public 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 iteratearound- theBlockPosto iterate aroundrange- the maximum distance from the given pos in any axis- Mappings:
Namespace Name Mixin selector named iterateRandomlyLnet/minecraft/util/math/BlockPos;iterateRandomly(Lnet/minecraft/util/math/random/Random;ILnet/minecraft/util/math/BlockPos;I)Ljava/lang/Iterable;intermediary method_34848Lnet/minecraft/class_2338;method_34848(Lnet/minecraft/class_5819;ILnet/minecraft/class_2338;I)Ljava/lang/Iterable;official aLjd;a(Layw;ILjd;I)Ljava/lang/Iterable;
-
streamSouthEastSquare
Deprecated.- Mappings:
Namespace Name Mixin selector named streamSouthEastSquareLnet/minecraft/util/math/BlockPos;streamSouthEastSquare(Lnet/minecraft/util/math/BlockPos;)Ljava/util/stream/Stream;intermediary method_51686Lnet/minecraft/class_2338;method_51686(Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;official aLjd;a(Ljd;)Ljava/util/stream/Stream;
-
iterateRandomly
public 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 iterateminX- the minimum x value for returned positionsminY- the minimum y value for returned positionsminZ- the minimum z value for returned positionsmaxX- the maximum x value for returned positionsmaxY- the maximum y value for returned positionsmaxZ- the maximum z value for returned positions- Mappings:
Namespace Name Mixin selector named iterateRandomlyLnet/minecraft/util/math/BlockPos;iterateRandomly(Lnet/minecraft/util/math/random/Random;IIIIIII)Ljava/lang/Iterable;intermediary method_27156Lnet/minecraft/class_2338;method_27156(Lnet/minecraft/class_5819;IIIIIII)Ljava/lang/Iterable;official aLjd;a(Layw;IIIIIII)Ljava/lang/Iterable;
-
iterateOutwards
public 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 iterationrangeX- the maximum x difference from the centerrangeY- the maximum y difference from the centerrangeZ- the maximum z difference from the center- Mappings:
Namespace Name Mixin selector named iterateOutwardsLnet/minecraft/util/math/BlockPos;iterateOutwards(Lnet/minecraft/util/math/BlockPos;III)Ljava/lang/Iterable;intermediary method_25996Lnet/minecraft/class_2338;method_25996(Lnet/minecraft/class_2338;III)Ljava/lang/Iterable;official aLjd;a(Ljd;III)Ljava/lang/Iterable;
-
findClosest
public static Optional<BlockPos> findClosest(BlockPos pos, int horizontalRange, int verticalRange, Predicate<BlockPos> condition) - Mappings:
Namespace Name Mixin selector named findClosestLnet/minecraft/util/math/BlockPos;findClosest(Lnet/minecraft/util/math/BlockPos;IILjava/util/function/Predicate;)Ljava/util/Optional;intermediary method_25997Lnet/minecraft/class_2338;method_25997(Lnet/minecraft/class_2338;IILjava/util/function/Predicate;)Ljava/util/Optional;official aLjd;a(Ljd;IILjava/util/function/Predicate;)Ljava/util/Optional;
-
streamOutwards
- Mappings:
Namespace Name Mixin selector named streamOutwardsLnet/minecraft/util/math/BlockPos;streamOutwards(Lnet/minecraft/util/math/BlockPos;III)Ljava/util/stream/Stream;intermediary method_25998Lnet/minecraft/class_2338;method_25998(Lnet/minecraft/class_2338;III)Ljava/util/stream/Stream;official bLjd;b(Ljd;III)Ljava/util/stream/Stream;
-
iterate
- Mappings:
Namespace Name Mixin selector named iterateLnet/minecraft/util/math/BlockPos;iterate(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Ljava/lang/Iterable;intermediary method_10097Lnet/minecraft/class_2338;method_10097(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Ljava/lang/Iterable;official cLjd;c(Ljd;Ljd;)Ljava/lang/Iterable;
-
stream
- Mappings:
Namespace Name Mixin selector named streamLnet/minecraft/util/math/BlockPos;stream(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Ljava/util/stream/Stream;intermediary method_20437Lnet/minecraft/class_2338;method_20437(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;official dLjd;d(Ljd;Ljd;)Ljava/util/stream/Stream;
-
stream
- Mappings:
Namespace Name Mixin selector named streamLnet/minecraft/util/math/BlockPos;stream(Lnet/minecraft/util/math/BlockBox;)Ljava/util/stream/Stream;intermediary method_23627Lnet/minecraft/class_2338;method_23627(Lnet/minecraft/class_3341;)Ljava/util/stream/Stream;official aLjd;a(Lejj;)Ljava/util/stream/Stream;
-
stream
- Mappings:
Namespace Name Mixin selector named streamLnet/minecraft/util/math/BlockPos;stream(Lnet/minecraft/util/math/Box;)Ljava/util/stream/Stream;intermediary method_29715Lnet/minecraft/class_2338;method_29715(Lnet/minecraft/class_238;)Ljava/util/stream/Stream;official aLjd;a(Lewx;)Ljava/util/stream/Stream;
-
stream
public static Stream<BlockPos> stream(int startX, int startY, int startZ, int endX, int endY, int endZ) - Mappings:
Namespace Name Mixin selector named streamLnet/minecraft/util/math/BlockPos;stream(IIIIII)Ljava/util/stream/Stream;intermediary method_17962Lnet/minecraft/class_2338;method_17962(IIIIII)Ljava/util/stream/Stream;official aLjd;a(IIIIII)Ljava/util/stream/Stream;
-
iterate
public static Iterable<BlockPos> iterate(int startX, int startY, int startZ, int endX, int endY, int endZ) - Mappings:
Namespace Name Mixin selector named iterateLnet/minecraft/util/math/BlockPos;iterate(IIIIII)Ljava/lang/Iterable;intermediary method_10094Lnet/minecraft/class_2338;method_10094(IIIIII)Ljava/lang/Iterable;official bLjd;b(IIIIII)Ljava/lang/Iterable;
-
iterateInSquare
public 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 iterationradius- the maximum chebychev distancefirstDirection- the direction the iterator moves firstsecondDirection- the direction the iterator moves after the first- Throws:
IllegalStateException- when the 2 directions lie on the same axis- Mappings:
Namespace Name Mixin selector named iterateInSquareLnet/minecraft/util/math/BlockPos;iterateInSquare(Lnet/minecraft/util/math/BlockPos;ILnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Direction;)Ljava/lang/Iterable;intermediary method_30512Lnet/minecraft/class_2338;method_30512(Lnet/minecraft/class_2338;ILnet/minecraft/class_2350;Lnet/minecraft/class_2350;)Ljava/lang/Iterable;official aLjd;a(Ljd;ILji;Lji;)Ljava/lang/Iterable;
-
iterateRecursively
public 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 positionmaxDepth- the maximum depth of iterationmaxIterations- the maximum number of total iterationsnextQueuer- a function that enqueues the next positions- Returns:
- the total number of iterations
- Mappings:
Namespace Name Mixin selector named iterateRecursivelyLnet/minecraft/util/math/BlockPos;iterateRecursively(Lnet/minecraft/util/math/BlockPos;IILjava/util/function/BiConsumer;Ljava/util/function/Predicate;)Iintermediary method_49925Lnet/minecraft/class_2338;method_49925(Lnet/minecraft/class_2338;IILjava/util/function/BiConsumer;Ljava/util/function/Predicate;)Iofficial aLjd;a(Ljd;IILjava/util/function/BiConsumer;Ljava/util/function/Predicate;)I
-