diff --git a/common/src/main/java/dev/latvian/mods/kubejs/bindings/KMath.java b/common/src/main/java/dev/latvian/mods/kubejs/bindings/KMath.java index fb615dabe..c62e0b5e2 100644 --- a/common/src/main/java/dev/latvian/mods/kubejs/bindings/KMath.java +++ b/common/src/main/java/dev/latvian/mods/kubejs/bindings/KMath.java @@ -1,6 +1,14 @@ package dev.latvian.mods.kubejs.bindings; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Matrix3f; +import com.mojang.math.Matrix4f; +import com.mojang.math.Quaternion; +import com.mojang.math.Vector3d; +import com.mojang.math.Vector3f; +import com.mojang.math.Vector4f; import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.Vec3; public class KMath { public static final double E = 2.7182818284590452354; @@ -12,6 +20,39 @@ public static BlockPos block(double x, double y, double z) { return new BlockPos(x, y, z); } + // why + public static Vec3 v3(double x, double y, double z) { + return new Vec3(x, y, z); + } + + public static Vector3d v3d(double x, double y, double z) { + return new Vector3d(x, y, z); + } + + public static Vector3f v3f(float x, float y, float z) { + return new Vector3f(x, y, z); + } + + public static Vector4f v4f(float x, float y, float z, float w) { + return new Vector4f(x, y, z, w); + } + + public static Matrix3f m3f() { + return new Matrix3f(); + } + + public static Matrix4f m4f() { + return new Matrix4f(); + } + + public static PoseStack poseStack() { + return new PoseStack(); + } + + public static Quaternion quaternion(float x, float y, float z, float w) { + return new Quaternion(x, y, z, w); + } + public static double rad(double value) { return value * DEGREES_TO_RADIANS; }