Package net.minecraft.util.math
Class Vec3i
java.lang.Object
net.minecraft.util.math.Vec3i
- All Implemented Interfaces:
Comparable<Vec3i>
- Direct Known Subclasses:
BlockPos,ChunkSectionPos
A publicly read-only but mutable vector composed of 3 integers.
- Mappings:
Namespace Name official gwintermediary net/minecraft/class_2382named net/minecraft/util/math/Vec3i
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z)add(int x, int y, int z)Returns another Vec3i whose coordinates have the parameter x, y, and z added to the coordinates of this vector.intcrossProduct(Vec3i vec)down()down(int distance)east()east(int distance)booleanintintgetManhattanDistance(Vec3i vec)doublegetSquaredDistance(double x, double y, double z, boolean treatAsBlockPos)doublegetSquaredDistance(Position pos, boolean treatAsBlockPos)doublegetSquaredDistance(Vec3i vec)doublegetSquaredDistance(Vec3i vec, boolean treatAsBlockPos)intgetX()intgetY()intgetZ()inthashCode()booleanisWithinDistance(Position pos, double distance)booleanisWithinDistance(Vec3i vec, double distance)multiply(int scale)north()north(int distance)offset(Direction.Axis axis, int distance)protected Vec3isetX(int x)protected Vec3isetY(int y)protected Vec3isetZ(int z)south()south(int distance)toString()up()up(int distance)west()west(int distance)
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official eLgw;e:Lcom/mojang/serialization/Codec;intermediary field_25123Lnet/minecraft/class_2382;field_25123:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/util/math/Vec3i;CODEC:Lcom/mojang/serialization/Codec;
-
ZERO
- Mappings:
Namespace Name Mixin selector official fLgw;f:Lgw;intermediary field_11176Lnet/minecraft/class_2382;field_11176:Lnet/minecraft/class_2382;named ZEROLnet/minecraft/util/math/Vec3i;ZERO:Lnet/minecraft/util/math/Vec3i;
-
x
private int x- Mappings:
Namespace Name Mixin selector official aLgw;a:Iintermediary field_11175Lnet/minecraft/class_2382;field_11175:Inamed xLnet/minecraft/util/math/Vec3i;x:I
-
y
private int y- Mappings:
Namespace Name Mixin selector official bLgw;b:Iintermediary field_11174Lnet/minecraft/class_2382;field_11174:Inamed yLnet/minecraft/util/math/Vec3i;y:I
-
z
private int z- Mappings:
Namespace Name Mixin selector official cLgw;c:Iintermediary field_11173Lnet/minecraft/class_2382;field_11173:Inamed zLnet/minecraft/util/math/Vec3i;z:I
-
-
Constructor Details
-
Vec3i
public Vec3i(int x, int y, int z)- Mappings:
Namespace Name Mixin selector official <init>Lgw;<init>(III)Vintermediary <init>Lnet/minecraft/class_2382;<init>(III)Vnamed <init>Lnet/minecraft/util/math/Vec3i;<init>(III)V
-
Vec3i
public Vec3i(double x, double y, double z)- Mappings:
Namespace Name Mixin selector official <init>Lgw;<init>(DDD)Vintermediary <init>Lnet/minecraft/class_2382;<init>(DDD)Vnamed <init>Lnet/minecraft/util/math/Vec3i;<init>(DDD)V
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<Vec3i>- Mappings:
Namespace Name Mixin selector official iLgw;i(Lgw;)Iintermediary method_10265Lnet/minecraft/class_2382;method_10265(Lnet/minecraft/class_2382;)Inamed compareToLnet/minecraft/util/math/Vec3i;compareTo(Lnet/minecraft/util/math/Vec3i;)I
-
getX
public int getX()- Mappings:
Namespace Name Mixin selector official uLgw;u()Iintermediary method_10263Lnet/minecraft/class_2382;method_10263()Inamed getXLnet/minecraft/util/math/Vec3i;getX()I
-
getY
public int getY()- Mappings:
Namespace Name Mixin selector official vLgw;v()Iintermediary method_10264Lnet/minecraft/class_2382;method_10264()Inamed getYLnet/minecraft/util/math/Vec3i;getY()I
-
getZ
public int getZ()- Mappings:
Namespace Name Mixin selector official wLgw;w()Iintermediary method_10260Lnet/minecraft/class_2382;method_10260()Inamed getZLnet/minecraft/util/math/Vec3i;getZ()I
-
setX
- Mappings:
Namespace Name Mixin selector official uLgw;u(I)Lgw;intermediary method_20787Lnet/minecraft/class_2382;method_20787(I)Lnet/minecraft/class_2382;named setXLnet/minecraft/util/math/Vec3i;setX(I)Lnet/minecraft/util/math/Vec3i;
-
setY
- Mappings:
Namespace Name Mixin selector official tLgw;t(I)Lgw;intermediary method_10099Lnet/minecraft/class_2382;method_10099(I)Lnet/minecraft/class_2382;named setYLnet/minecraft/util/math/Vec3i;setY(I)Lnet/minecraft/util/math/Vec3i;
-
setZ
- Mappings:
Namespace Name Mixin selector official sLgw;s(I)Lgw;intermediary method_20788Lnet/minecraft/class_2382;method_20788(I)Lnet/minecraft/class_2382;named setZLnet/minecraft/util/math/Vec3i;setZ(I)Lnet/minecraft/util/math/Vec3i;
-
add
- Mappings:
Namespace Name Mixin selector official bLgw;b(DDD)Lgw;intermediary method_35849Lnet/minecraft/class_2382;method_35849(DDD)Lnet/minecraft/class_2382;named addLnet/minecraft/util/math/Vec3i;add(DDD)Lnet/minecraft/util/math/Vec3i;
-
add
Returns 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.
- Mappings:
Namespace Name Mixin selector official cLgw;c(III)Lgw;intermediary method_34592Lnet/minecraft/class_2382;method_34592(III)Lnet/minecraft/class_2382;named addLnet/minecraft/util/math/Vec3i;add(III)Lnet/minecraft/util/math/Vec3i;
-
add
- Mappings:
Namespace Name Mixin selector official fLgw;f(Lgw;)Lgw;intermediary method_35853Lnet/minecraft/class_2382;method_35853(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2382;named addLnet/minecraft/util/math/Vec3i;add(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/Vec3i;
-
subtract
- Mappings:
Namespace Name Mixin selector official eLgw;e(Lgw;)Lgw;intermediary method_35852Lnet/minecraft/class_2382;method_35852(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2382;named subtractLnet/minecraft/util/math/Vec3i;subtract(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/Vec3i;
-
multiply
- Mappings:
Namespace Name Mixin selector official oLgw;o(I)Lgw;intermediary method_35862Lnet/minecraft/class_2382;method_35862(I)Lnet/minecraft/class_2382;named multiplyLnet/minecraft/util/math/Vec3i;multiply(I)Lnet/minecraft/util/math/Vec3i;
-
up
- Mappings:
Namespace Name Mixin selector official oLgw;o()Lgw;intermediary method_30931Lnet/minecraft/class_2382;method_30931()Lnet/minecraft/class_2382;named upLnet/minecraft/util/math/Vec3i;up()Lnet/minecraft/util/math/Vec3i;
-
up
- Mappings:
Namespace Name Mixin selector official nLgw;n(I)Lgw;intermediary method_30930Lnet/minecraft/class_2382;method_30930(I)Lnet/minecraft/class_2382;named upLnet/minecraft/util/math/Vec3i;up(I)Lnet/minecraft/util/math/Vec3i;
-
down
- Mappings:
Namespace Name Mixin selector official nLgw;n()Lgw;intermediary method_23228Lnet/minecraft/class_2382;method_23228()Lnet/minecraft/class_2382;named downLnet/minecraft/util/math/Vec3i;down()Lnet/minecraft/util/math/Vec3i;
-
down
- Mappings:
Namespace Name Mixin selector official mLgw;m(I)Lgw;intermediary method_23227Lnet/minecraft/class_2382;method_23227(I)Lnet/minecraft/class_2382;named downLnet/minecraft/util/math/Vec3i;down(I)Lnet/minecraft/util/math/Vec3i;
-
north
- Mappings:
Namespace Name Mixin selector official mLgw;m()Lgw;intermediary method_35861Lnet/minecraft/class_2382;method_35861()Lnet/minecraft/class_2382;named northLnet/minecraft/util/math/Vec3i;north()Lnet/minecraft/util/math/Vec3i;
-
north
- Mappings:
Namespace Name Mixin selector official lLgw;l(I)Lgw;intermediary method_35860Lnet/minecraft/class_2382;method_35860(I)Lnet/minecraft/class_2382;named northLnet/minecraft/util/math/Vec3i;north(I)Lnet/minecraft/util/math/Vec3i;
-
south
- Mappings:
Namespace Name Mixin selector official lLgw;l()Lgw;intermediary method_35859Lnet/minecraft/class_2382;method_35859()Lnet/minecraft/class_2382;named southLnet/minecraft/util/math/Vec3i;south()Lnet/minecraft/util/math/Vec3i;
-
south
- Mappings:
Namespace Name Mixin selector official kLgw;k(I)Lgw;intermediary method_35858Lnet/minecraft/class_2382;method_35858(I)Lnet/minecraft/class_2382;named southLnet/minecraft/util/math/Vec3i;south(I)Lnet/minecraft/util/math/Vec3i;
-
west
- Mappings:
Namespace Name Mixin selector official kLgw;k()Lgw;intermediary method_35857Lnet/minecraft/class_2382;method_35857()Lnet/minecraft/class_2382;named westLnet/minecraft/util/math/Vec3i;west()Lnet/minecraft/util/math/Vec3i;
-
west
- Mappings:
Namespace Name Mixin selector official jLgw;j(I)Lgw;intermediary method_35856Lnet/minecraft/class_2382;method_35856(I)Lnet/minecraft/class_2382;named westLnet/minecraft/util/math/Vec3i;west(I)Lnet/minecraft/util/math/Vec3i;
-
east
- Mappings:
Namespace Name Mixin selector official jLgw;j()Lgw;intermediary method_35855Lnet/minecraft/class_2382;method_35855()Lnet/minecraft/class_2382;named eastLnet/minecraft/util/math/Vec3i;east()Lnet/minecraft/util/math/Vec3i;
-
east
- Mappings:
Namespace Name Mixin selector official iLgw;i(I)Lgw;intermediary method_35854Lnet/minecraft/class_2382;method_35854(I)Lnet/minecraft/class_2382;named eastLnet/minecraft/util/math/Vec3i;east(I)Lnet/minecraft/util/math/Vec3i;
-
offset
- Mappings:
Namespace Name Mixin selector official bLgw;b(Lgg;)Lgw;intermediary method_35851Lnet/minecraft/class_2382;method_35851(Lnet/minecraft/class_2350;)Lnet/minecraft/class_2382;named offsetLnet/minecraft/util/math/Vec3i;offset(Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/Vec3i;
-
offset
- Mappings:
Namespace Name Mixin selector official bLgw;b(Lgg;I)Lgw;intermediary method_23226Lnet/minecraft/class_2382;method_23226(Lnet/minecraft/class_2350;I)Lnet/minecraft/class_2382;named offsetLnet/minecraft/util/math/Vec3i;offset(Lnet/minecraft/util/math/Direction;I)Lnet/minecraft/util/math/Vec3i;
-
offset
- Mappings:
Namespace Name Mixin selector official bLgw;b(Lgg$a;I)Lgw;intermediary method_35850Lnet/minecraft/class_2382;method_35850(Lnet/minecraft/class_2350$class_2351;I)Lnet/minecraft/class_2382;named offsetLnet/minecraft/util/math/Vec3i;offset(Lnet/minecraft/util/math/Direction$Axis;I)Lnet/minecraft/util/math/Vec3i;
-
crossProduct
- Mappings:
Namespace Name Mixin selector official dLgw;d(Lgw;)Lgw;intermediary method_10259Lnet/minecraft/class_2382;method_10259(Lnet/minecraft/class_2382;)Lnet/minecraft/class_2382;named crossProductLnet/minecraft/util/math/Vec3i;crossProduct(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/Vec3i;
-
isWithinDistance
- Mappings:
Namespace Name Mixin selector official aLgw;a(Lgw;D)Zintermediary method_19771Lnet/minecraft/class_2382;method_19771(Lnet/minecraft/class_2382;D)Znamed isWithinDistanceLnet/minecraft/util/math/Vec3i;isWithinDistance(Lnet/minecraft/util/math/Vec3i;D)Z
-
isWithinDistance
- Mappings:
Namespace Name Mixin selector official aLgw;a(Lgo;D)Zintermediary method_19769Lnet/minecraft/class_2382;method_19769(Lnet/minecraft/class_2374;D)Znamed isWithinDistanceLnet/minecraft/util/math/Vec3i;isWithinDistance(Lnet/minecraft/util/math/Position;D)Z
-
getSquaredDistance
- Mappings:
Namespace Name Mixin selector official jLgw;j(Lgw;)Dintermediary method_10262Lnet/minecraft/class_2382;method_10262(Lnet/minecraft/class_2382;)Dnamed getSquaredDistanceLnet/minecraft/util/math/Vec3i;getSquaredDistance(Lnet/minecraft/util/math/Vec3i;)D
-
getSquaredDistance
- Mappings:
Namespace Name Mixin selector official aLgw;a(Lgo;Z)Dintermediary method_19770Lnet/minecraft/class_2382;method_19770(Lnet/minecraft/class_2374;Z)Dnamed getSquaredDistanceLnet/minecraft/util/math/Vec3i;getSquaredDistance(Lnet/minecraft/util/math/Position;Z)D
-
getSquaredDistance
- Mappings:
Namespace Name Mixin selector official aLgw;a(Lgw;Z)Dintermediary method_33106Lnet/minecraft/class_2382;method_33106(Lnet/minecraft/class_2382;Z)Dnamed getSquaredDistanceLnet/minecraft/util/math/Vec3i;getSquaredDistance(Lnet/minecraft/util/math/Vec3i;Z)D
-
getSquaredDistance
public double getSquaredDistance(double x, double y, double z, boolean treatAsBlockPos)- Mappings:
Namespace Name Mixin selector official aLgw;a(DDDZ)Dintermediary method_10268Lnet/minecraft/class_2382;method_10268(DDDZ)Dnamed getSquaredDistanceLnet/minecraft/util/math/Vec3i;getSquaredDistance(DDDZ)D
-
getManhattanDistance
- Mappings:
Namespace Name Mixin selector official kLgw;k(Lgw;)Iintermediary method_19455Lnet/minecraft/class_2382;method_19455(Lnet/minecraft/class_2382;)Inamed getManhattanDistanceLnet/minecraft/util/math/Vec3i;getManhattanDistance(Lnet/minecraft/util/math/Vec3i;)I
-
getComponentAlongAxis
- Mappings:
Namespace Name Mixin selector official aLgw;a(Lgg$a;)Iintermediary method_30558Lnet/minecraft/class_2382;method_30558(Lnet/minecraft/class_2350$class_2351;)Inamed getComponentAlongAxisLnet/minecraft/util/math/Vec3i;getComponentAlongAxis(Lnet/minecraft/util/math/Direction$Axis;)I
-
toString
-
toShortString
- Mappings:
Namespace Name Mixin selector official xLgw;x()Ljava/lang/String;intermediary method_23854Lnet/minecraft/class_2382;method_23854()Ljava/lang/String;named toShortStringLnet/minecraft/util/math/Vec3i;toShortString()Ljava/lang/String;
-