Class SFVec3i
java.lang.Object
com.soulfiremc.server.pathfinding.SFVec3i
A simple 3D integer vector. This class is used instead of BlockPos because this uses direct field
access instead of getters. Even though the JIT compiler could optimize this, it's still faster to
use this class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(int x, int y, int z) long
double
boolean
boolean
static SFVec3i
from
(int x, int y, int z) static SFVec3i
fromDouble
(net.minecraft.world.phys.Vec3 vec) static SFVec3i
fromInt
(net.minecraft.core.BlockPos vec) int
hashCode()
static long
longHash
(int x, int y, int z) sub
(int x, int y, int z) net.minecraft.core.BlockPos
toString()
net.minecraft.world.phys.Vec3
toVec3()
-
Field Details
-
ZERO
-
x
public final int x -
y
public final int y -
z
public final int z
-
-
Constructor Details
-
SFVec3i
public SFVec3i(int x, int y, int z)
-
-
Method Details
-
fromDouble
-
fromInt
-
from
-
longHash
public static long longHash(int x, int y, int z) -
equals
-
equals
-
hashCode
public int hashCode() -
asMinecraftLong
public long asMinecraftLong() -
add
-
add
-
sub
-
sub
-
toVec3
public net.minecraft.world.phys.Vec3 toVec3() -
toBlockPos
public net.minecraft.core.BlockPos toBlockPos() -
toString
-
formatXYZ
-
distance
-