Package me.c7dev.dexterity.util
Class DexUtils
java.lang.Object
me.c7dev.dexterity.util.DexUtils
Defines commonly used static methods used globally in the plugin or API
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static org.bukkit.Location
blockLoc
(org.bukkit.Location loc) static String
bytesToHex
(byte[] bytes) static org.joml.Quaterniond
cloneQ
(org.joml.Quaterniond r) static org.joml.Quaternionf
cloneQ
(org.joml.Quaternionf r) static org.bukkit.inventory.ItemStack
createItem
(org.bukkit.Material material, int amount, String name, String... lore) static org.bukkit.Location
deserializeLocation
(org.bukkit.configuration.file.FileConfiguration config, String dir) static double
faceToDirection
(org.bukkit.block.BlockFace face, org.bukkit.util.Vector scale) static double
faceToDirectionAbs
(org.bukkit.block.BlockFace face, org.bukkit.util.Vector scale) getAttributes
(String[] args) getAttributesDoubles
(String[] args) getAttributesStrings
(String[] args) static org.bukkit.util.Vector
getBlockDimensions
(org.bukkit.block.data.BlockData b) static double
getBlockVolume
(org.bukkit.Location l1, org.bukkit.Location l2) getDefaultAttributes
(String[] args) getDefaultAttributesWithFlags
(String[] args) static double
getParameter
(org.bukkit.Location loc, int axis) static double
getParameter
(org.bukkit.util.Vector v, int axis) static double
getVolume
(org.bukkit.Location l1, org.bukkit.Location l2) static org.bukkit.util.Vector
hadimard
(org.bukkit.util.Vector a, org.bukkit.util.Vector b) static byte[]
static boolean
isAllowedMaterial
(org.bukkit.Material mat) static boolean
isOrthonormal
(org.bukkit.util.Vector x, org.bukkit.util.Vector y) static boolean
isOrthonormal
(org.bukkit.util.Vector x, org.bukkit.util.Vector y, org.bukkit.util.Vector z) static org.bukkit.util.Vector
linearCombination
(org.bukkit.util.Vector x1, org.bukkit.util.Vector y1, org.bukkit.util.Vector z1, org.bukkit.util.Vector u) static org.bukkit.Location
location
(org.bukkit.World w, com.sk89q.worldedit.math.BlockVector3 v) static org.bukkit.Location
location
(org.bukkit.World w, org.bukkit.util.Vector v) static String
locationString
(org.bukkit.Location loc, int decimals) static int
maxPage
(int size, int pagelen) static double
minValue
(org.bukkit.util.Vector v) static org.bukkit.util.Vector
nearestPoint
(org.bukkit.util.Vector a, org.bukkit.util.Vector b, org.bukkit.util.Vector x) static boolean
numbersContain
(List<Double> list, double x) static org.bukkit.util.Vector
oneHot
(int axis) static org.bukkit.util.Vector
oneHot
(int axis, double param) static void
static int
static String
quaternionString
(org.joml.Quaterniond q, int decimals) static String
quaternionString
(org.joml.Quaternionf q, int decimals) static org.joml.Matrix3d
rotMat
(double xrad, double yrad, double zrad) static org.joml.Matrix3d
rotMatDeg
(double xdeg, double ydeg, double zdeg) static String
round
(double d, int decimals) static void
setParameter
(org.bukkit.util.Vector v, int axis, double val) static int
valueAlias
(String s) static org.joml.Vector3f
vector
(org.bukkit.util.Vector v) static org.bukkit.util.Vector
vector
(org.joml.Vector3d v) static org.bukkit.util.Vector
vector
(org.joml.Vector3f v) static org.joml.Vector3d
vectord
(org.bukkit.util.Vector v) static String
vectorString
(org.bukkit.util.Vector loc, int decimals)
-
Constructor Details
-
DexUtils
public DexUtils()
-
-
Method Details
-
createItem
-
round
-
locationString
-
vectorString
-
quaternionString
-
quaternionString
-
blockLoc
public static org.bukkit.Location blockLoc(org.bukkit.Location loc) -
minValue
public static double minValue(org.bukkit.util.Vector v) -
attrAlias
-
valueAlias
-
getAttributes
-
getAttributesStrings
-
getAttributesDoubles
-
getFlags
-
getDefaultAttributes
-
getDefaultAttributesWithFlags
-
faceToDirection
public static double faceToDirection(org.bukkit.block.BlockFace face, org.bukkit.util.Vector scale) -
faceToDirectionAbs
public static double faceToDirectionAbs(org.bukkit.block.BlockFace face, org.bukkit.util.Vector scale) -
parseInt
-
vector
public static org.joml.Vector3f vector(org.bukkit.util.Vector v) -
vectord
public static org.joml.Vector3d vectord(org.bukkit.util.Vector v) -
vector
public static org.bukkit.util.Vector vector(org.joml.Vector3f v) -
vector
public static org.bukkit.util.Vector vector(org.joml.Vector3d v) -
hadimard
public static org.bukkit.util.Vector hadimard(org.bukkit.util.Vector a, org.bukkit.util.Vector b) -
linearCombination
public static org.bukkit.util.Vector linearCombination(org.bukkit.util.Vector x1, org.bukkit.util.Vector y1, org.bukkit.util.Vector z1, org.bukkit.util.Vector u) -
location
public static org.bukkit.Location location(org.bukkit.World w, org.bukkit.util.Vector v) -
location
public static org.bukkit.Location location(org.bukkit.World w, com.sk89q.worldedit.math.BlockVector3 v) -
cloneQ
public static org.joml.Quaternionf cloneQ(org.joml.Quaternionf r) -
cloneQ
public static org.joml.Quaterniond cloneQ(org.joml.Quaterniond r) -
getVolume
public static double getVolume(org.bukkit.Location l1, org.bukkit.Location l2) -
getBlockVolume
public static double getBlockVolume(org.bukkit.Location l1, org.bukkit.Location l2) -
maxPage
public static int maxPage(int size, int pagelen) -
paginate
-
deserializeLocation
public static org.bukkit.Location deserializeLocation(org.bukkit.configuration.file.FileConfiguration config, String dir) -
getBlockDimensions
public static org.bukkit.util.Vector getBlockDimensions(org.bukkit.block.data.BlockData b) -
materials
-
materials
-
bytesToHex
-
hexStringToBytes
-
getParameter
public static double getParameter(org.bukkit.util.Vector v, int axis) -
setParameter
public static void setParameter(org.bukkit.util.Vector v, int axis, double val) -
getParameter
public static double getParameter(org.bukkit.Location loc, int axis) -
oneHot
public static org.bukkit.util.Vector oneHot(int axis) -
oneHot
public static org.bukkit.util.Vector oneHot(int axis, double param) -
numbersContain
-
rotMatDeg
public static org.joml.Matrix3d rotMatDeg(double xdeg, double ydeg, double zdeg) -
rotMat
public static org.joml.Matrix3d rotMat(double xrad, double yrad, double zrad) -
isAllowedMaterial
public static boolean isAllowedMaterial(org.bukkit.Material mat) -
isOrthonormal
public static boolean isOrthonormal(org.bukkit.util.Vector x, org.bukkit.util.Vector y) -
isOrthonormal
public static boolean isOrthonormal(org.bukkit.util.Vector x, org.bukkit.util.Vector y, org.bukkit.util.Vector z) -
nearestPoint
public static org.bukkit.util.Vector nearestPoint(org.bukkit.util.Vector a, org.bukkit.util.Vector b, org.bukkit.util.Vector x)
-