Skip to content

Commit 239793f

Browse files
committed
don't use newer 3f constructor
1 parent 9d7fd69 commit 239793f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/ch/njol/skript/classes/data/DefaultFunctions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ public Quaternionf[] executeSimple(Object[][] params) {
652652
Vector3d v = ((Vector3d) params[1][0]);
653653
if (Math2.vectorIsZero(v) || !v.isFinite())
654654
return new Quaternionf[0];
655-
Vector3f axis = new Vector3f((Vector3d) params[1][0]);
655+
Vector3f axis = new Vector3f((float) v.x, (float) v.y, (float) v.z);
656656
return CollectionUtils.array(new Quaternionf(new AxisAngle4f(angle, axis)));
657657
}
658658
})

src/main/java/org/skriptlang/skript/bukkit/misc/effects/EffRotate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ protected void execute(Event event) {
145145
if (axis == null || Math2.vectorIsZero(axis))
146146
return;
147147
axis.normalize();
148-
Vector3f v3fAxis = new Vector3f(axis);
148+
Vector3f v3fAxis = new Vector3f((float) axis.x, (float) axis.y, (float) axis.z);
149149
vectorRotator = new VectorRotator(Axis.ARBITRARY, axis, radAngle);
150150
quaternionRotator = new QuaternionRotator(Axis.LOCAL_ARBITRARY, v3fAxis, (float) radAngle);
151151
displayRotator = new DisplayRotator(Axis.LOCAL_ARBITRARY, v3fAxis, (float) radAngle);

src/main/java/org/skriptlang/skript/bukkit/misc/expressions/ExprRotate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected Object[] get(Event event) {
127127
if (axis == null || Math2.vectorIsZero(axis))
128128
return new Object[0];
129129
axis.normalize();
130-
Vector3f v3fAxis = new Vector3f(axis);
130+
Vector3f v3fAxis = new Vector3f((float) axis.x, (float) axis.y, (float) axis.z);
131131
vectorRotator = new NonMutatingVectorRotator(Axis.ARBITRARY, axis, radAngle);
132132
quaternionRotator = new NonMutatingQuaternionRotator(Axis.LOCAL_ARBITRARY, v3fAxis, (float) radAngle);
133133
} else {

0 commit comments

Comments
 (0)