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) longdoublebooleanbooleanstatic SFVec3ifrom(int x, int y, int z) static SFVec3ifromDouble(net.minecraft.world.phys.Vec3 vec) static SFVec3ifromInt(net.minecraft.core.BlockPos vec) inthashCode()static longlongHash(int x, int y, int z) sub(int x, int y, int z) net.minecraft.core.BlockPostoString()net.minecraft.world.phys.Vec3toVec3()
-
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
-
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
-