Package net.minecraft.util.math
Class BlockPos.Mutable
java.lang.Object
net.minecraft.util.math.Vec3i
net.minecraft.util.math.BlockPos
net.minecraft.util.math.BlockPos.Mutable
- All Implemented Interfaces:
Comparable<Vec3i>
- Enclosing class:
BlockPos
- Mappings:
Namespace Name named net/minecraft/util/math/BlockPos$Mutableintermediary net/minecraft/class_2338$class_2339official jh$a
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.util.math.BlockPos
BlockPos.Mutable -
Field Summary
Fields inherited from class net.minecraft.util.math.BlockPos
CODEC, MAX_XZ, ORIGIN, PACKET_CODEC, SIZE_BITS_XZ, SIZE_BITS_Y -
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.clamp(Direction.Axis axis, int min, int max) Clamps the component corresponding to the givenaxisbetweenminandmax.move(int dx, int dy, int dz) Moves the mutable block position by the delta x, y, and z provided.Moves this mutable block position by 1 block in the given direction.Moves this mutable block position by the given distance in the given direction.multiply(int int2) Returns a vector with all components multiplied byscale.offset(Direction.Axis axis, int int2) Returns a vector which is offset bydistanceonaxisaxis.Returns a vector which is offset bydistanceindirectiondirection.rotate(BlockRotation rotation) set(double x, double y, double z) set(int x, int y, int z) Sets the x, y, and z of this mutable block position.set(long pos) set(AxisCycleDirection axis, int x, int y, int z) Sets this mutable block position to the sum of the given position and the given x, y, and z.Sets this mutable block position to the offset position of the given pos by the given direction.Sets this mutable block position to the sum of the given vectors.setX(int int2) setY(int int2) setZ(int int2) Returns an immutable block position with the same x, y, and z as this position.Methods inherited from class net.minecraft.util.math.BlockPos
add, add, asLong, asLong, clampToWithin, crossProduct, down, down, east, east, findClosest, fromLong, iterate, iterate, iterate, iterateInSquare, iterateOutwards, iterateRandomly, iterateRandomly, iterateRecursively, max, min, mutableCopy, north, north, ofFloored, ofFloored, offset, offset, removeChunkSectionLocalY, south, south, stream, stream, stream, stream, streamOutwards, streamSouthEastSquare, subtract, toBottomCenterPos, toCenterPos, unpackLongX, unpackLongY, unpackLongZ, up, up, west, west, withYMethods inherited from class net.minecraft.util.math.Vec3i
compareTo, createOffsetCodec, equals, getChebyshevDistance, getComponentAlongAxis, getManhattanDistance, getSquaredDistance, getSquaredDistance, getSquaredDistance, getSquaredDistanceFromCenter, getX, getY, getZ, hashCode, isWithinDistance, isWithinDistance, toShortString, toString
-
Constructor Details
-
Mutable
public Mutable() -
Mutable
public Mutable(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>Lkl;<init>(III)V
-
Mutable
public Mutable(double x, double y, double z) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/util/math/BlockPos$Mutable;<init>(DDD)Vintermediary <init>Lnet/minecraft/class_2338$class_2339;<init>(DDD)Vofficial <init>Ljh$a;<init>(DDD)V
-
-
Method Details
-
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 classBlockPos- 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$Mutable;add(III)Lnet/minecraft/util/math/BlockPos;intermediary method_10069Lnet/minecraft/class_2338$class_2339;method_10069(III)Lnet/minecraft/class_2338;official method_10069Ljh$a;method_10069(III)Ljh;
-
multiply
Description copied from class:Vec3iReturns a vector with all components multiplied byscale.- Overrides:
multiplyin classBlockPos- Returns:
- a vector with all components multiplied by
scale - Mappings:
Namespace Name Mixin selector named multiplyLnet/minecraft/util/math/BlockPos$Mutable;multiply(I)Lnet/minecraft/util/math/BlockPos;intermediary method_35830Lnet/minecraft/class_2338$class_2339;method_35830(I)Lnet/minecraft/class_2338;official method_35830Ljh$a;method_35830(I)Ljh;
-
offset
Description copied from class:Vec3iReturns a vector which is offset bydistanceindirectiondirection.- Overrides:
offsetin classBlockPos- Returns:
- a vector which is offset by
distanceindirectiondirection - Mappings:
Namespace Name Mixin selector named offsetLnet/minecraft/util/math/BlockPos$Mutable;offset(Lnet/minecraft/util/math/Direction;I)Lnet/minecraft/util/math/BlockPos;intermediary method_10079Lnet/minecraft/class_2338$class_2339;method_10079(Lnet/minecraft/class_2350;I)Lnet/minecraft/class_2338;official method_10079Ljh$a;method_10079(Ljm;I)Ljh;
-
offset
Description copied from class:Vec3iReturns a vector which is offset bydistanceonaxisaxis.- Overrides:
offsetin classBlockPos- Returns:
- a vector which is offset by
distanceonaxisaxis - Mappings:
Namespace Name Mixin selector named offsetLnet/minecraft/util/math/BlockPos$Mutable;offset(Lnet/minecraft/util/math/Direction$Axis;I)Lnet/minecraft/util/math/BlockPos;intermediary method_30513Lnet/minecraft/class_2338$class_2339;method_30513(Lnet/minecraft/class_2350$class_2351;I)Lnet/minecraft/class_2338;official method_30513Ljh$a;method_30513(Ljm$a;I)Ljh;
-
rotate
- Overrides:
rotatein classBlockPos- 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 aLjh;a(Ldrb;)Ljh;
-
set
Sets the x, y, and z of this mutable block position.- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(III)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_10103Lnet/minecraft/class_2338$class_2339;method_10103(III)Lnet/minecraft/class_2338$class_2339;official dLjh$a;d(III)Ljh$a;
-
set
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(DDD)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_10102Lnet/minecraft/class_2338$class_2339;method_10102(DDD)Lnet/minecraft/class_2338$class_2339;official bLjh$a;b(DDD)Ljh$a;
-
set
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_10101Lnet/minecraft/class_2338$class_2339;method_10101(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338$class_2339;official gLjh$a;g(Lkl;)Ljh$a;
-
set
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(J)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_16363Lnet/minecraft/class_2338$class_2339;method_16363(J)Lnet/minecraft/class_2338$class_2339;official fLjh$a;f(J)Ljh$a;
-
set
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(Lnet/minecraft/util/math/AxisCycleDirection;III)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_17965Lnet/minecraft/class_2338$class_2339;method_17965(Lnet/minecraft/class_2335;III)Lnet/minecraft/class_2338$class_2339;official aLjh$a;a(Lje;III)Ljh$a;
-
set
Sets this mutable block position to the offset position of the given pos by the given direction.- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(Lnet/minecraft/util/math/Vec3i;Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_25505Lnet/minecraft/class_2338$class_2339;method_25505(Lnet/minecraft/class_2382;Lnet/minecraft/class_2350;)Lnet/minecraft/class_2338$class_2339;official aLjh$a;a(Lkl;Ljm;)Ljh$a;
-
set
Sets this mutable block position to the sum of the given position and the given x, y, and z.- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(Lnet/minecraft/util/math/Vec3i;III)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_25504Lnet/minecraft/class_2338$class_2339;method_25504(Lnet/minecraft/class_2382;III)Lnet/minecraft/class_2338$class_2339;official aLjh$a;a(Lkl;III)Ljh$a;
-
set
Sets this mutable block position to the sum of the given vectors.- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/math/BlockPos$Mutable;set(Lnet/minecraft/util/math/Vec3i;Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_35831Lnet/minecraft/class_2338$class_2339;method_35831(Lnet/minecraft/class_2382;Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338$class_2339;official aLjh$a;a(Lkl;Lkl;)Ljh$a;
-
move
Moves this mutable block position by 1 block in the given direction.- Mappings:
Namespace Name Mixin selector named moveLnet/minecraft/util/math/BlockPos$Mutable;move(Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_10098Lnet/minecraft/class_2338$class_2339;method_10098(Lnet/minecraft/class_2350;)Lnet/minecraft/class_2338$class_2339;official cLjh$a;c(Ljm;)Ljh$a;
-
move
Moves this mutable block position by the given distance in the given direction.- Mappings:
Namespace Name Mixin selector named moveLnet/minecraft/util/math/BlockPos$Mutable;move(Lnet/minecraft/util/math/Direction;I)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_10104Lnet/minecraft/class_2338$class_2339;method_10104(Lnet/minecraft/class_2350;I)Lnet/minecraft/class_2338$class_2339;official cLjh$a;c(Ljm;I)Ljh$a;
-
move
Moves the mutable block position by the delta x, y, and z provided.- Mappings:
Namespace Name Mixin selector named moveLnet/minecraft/util/math/BlockPos$Mutable;move(III)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_10100Lnet/minecraft/class_2338$class_2339;method_10100(III)Lnet/minecraft/class_2338$class_2339;official eLjh$a;e(III)Ljh$a;
-
move
- Mappings:
Namespace Name Mixin selector named moveLnet/minecraft/util/math/BlockPos$Mutable;move(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_30927Lnet/minecraft/class_2338$class_2339;method_30927(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2338$class_2339;official hLjh$a;h(Lkl;)Ljh$a;
-
clamp
Clamps the component corresponding to the givenaxisbetweenminandmax.- Mappings:
Namespace Name Mixin selector named clampLnet/minecraft/util/math/BlockPos$Mutable;clamp(Lnet/minecraft/util/math/Direction$Axis;II)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_27158Lnet/minecraft/class_2338$class_2339;method_27158(Lnet/minecraft/class_2350$class_2351;II)Lnet/minecraft/class_2338$class_2339;official aLjh$a;a(Ljm$a;II)Ljh$a;
-
setX
- Overrides:
setXin classVec3i- Mappings:
Namespace Name Mixin selector named setXLnet/minecraft/util/math/BlockPos$Mutable;setX(I)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_33097Lnet/minecraft/class_2338$class_2339;method_33097(I)Lnet/minecraft/class_2338$class_2339;official pLjh$a;p(I)Ljh$a;
-
setY
- Overrides:
setYin classVec3i- Mappings:
Namespace Name Mixin selector named setYLnet/minecraft/util/math/BlockPos$Mutable;setY(I)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_33098Lnet/minecraft/class_2338$class_2339;method_33098(I)Lnet/minecraft/class_2338$class_2339;official qLjh$a;q(I)Ljh$a;
-
setZ
- Overrides:
setZin classVec3i- Mappings:
Namespace Name Mixin selector named setZLnet/minecraft/util/math/BlockPos$Mutable;setZ(I)Lnet/minecraft/util/math/BlockPos$Mutable;intermediary method_33099Lnet/minecraft/class_2338$class_2339;method_33099(I)Lnet/minecraft/class_2338$class_2339;official rLjh$a;r(I)Ljh$a;
-
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.
- Overrides:
toImmutablein classBlockPos- 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 jLjh;j()Ljh;
-