Skip to content

Commit 6dd8364

Browse files
authored
Why mine (#197)
1 parent 5f05015 commit 6dd8364

File tree

6 files changed

+13
-36
lines changed

6 files changed

+13
-36
lines changed

station-maths-v0/src/main/java/net/modificationstation/stationapi/api/util/math/Direction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private static Direction[] listClosest(Direction first, Direction second, Direct
9393

9494
public static Direction transform(Matrix4f matrix, Direction direction) {
9595
Vec3i vec3i = direction.getVector();
96-
Vector4f vector4f = new Vector4f(vec3i.getX(), vec3i.getY(), vec3i.getZ(), 0.0f);
96+
Vec4f vector4f = new Vec4f(vec3i.getX(), vec3i.getY(), vec3i.getZ(), 0.0f);
9797
vector4f.transform(matrix);
9898
return Direction.getFacing(vector4f.getX(), vector4f.getY(), vector4f.getZ());
9999
}

station-maths-v0/src/main/java/net/modificationstation/stationapi/api/util/math/Vec3f.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public Vec3f(float x, float y, float z) {
2323
this.z = z;
2424
}
2525

26-
public Vec3f(Vector4f vec) {
26+
public Vec3f(Vec4f vec) {
2727
this(vec.getX(), vec.getY(), vec.getZ());
2828
}
2929

station-maths-v0/src/main/java/net/modificationstation/stationapi/api/util/math/Vector4f.java renamed to station-maths-v0/src/main/java/net/modificationstation/stationapi/api/util/math/Vec4f.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
package net.modificationstation.stationapi.api.util.math;
22

3-
public class Vector4f {
3+
public class Vec4f {
44
private float x;
55
private float y;
66
private float z;
77
private float w;
88

9-
public Vector4f() {}
9+
public Vec4f() {}
1010

11-
public Vector4f(float x, float y, float z, float w) {
11+
public Vec4f(float x, float y, float z, float w) {
1212
this.x = x;
1313
this.y = y;
1414
this.z = z;
1515
this.w = w;
1616
}
1717

18-
public Vector4f(Vec3f vector) {
18+
public Vec4f(Vec3f vector) {
1919
this(vector.getX(), vector.getY(), vector.getZ(), 1.0F);
2020
}
2121

2222
public boolean equals(Object o) {
2323
if (this == o) {
2424
return true;
2525
} else if (o != null && this.getClass() == o.getClass()) {
26-
Vector4f vector4f = (Vector4f)o;
26+
Vec4f vector4f = (Vec4f)o;
2727
if (Float.compare(vector4f.x, this.x) != 0) {
2828
return false;
2929
} else if (Float.compare(vector4f.y, this.y) != 0) {
@@ -75,7 +75,7 @@ public void set(float x, float y, float z, float w) {
7575
this.w = w;
7676
}
7777

78-
public float dotProduct(Vector4f other) {
78+
public float dotProduct(Vec4f other) {
7979
return this.x * other.x + this.y * other.y + this.z * other.z + this.w * other.w;
8080
}
8181

station-maths-v0/src/main/java/net/modificationstation/stationapi/api/util/math/Vector2f.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

station-renderer-api-v0/src/main/java/net/modificationstation/stationapi/api/client/render/model/BakedQuadFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public static ModelElementTexture uvLock(ModelElementTexture texture, Direction
4545
Matrix4f matrix4f = AffineTransformations.uvLock(rotation, orientation, () -> "Unable to resolve UVLock for model: " + modelId).getMatrix();
4646
float f = texture.getU(texture.getDirectionIndex(0));
4747
float g = texture.getV(texture.getDirectionIndex(0));
48-
Vector4f vector4f = new Vector4f(f / 16.0F, g / 16.0F, 0.0F, 1.0F);
48+
Vec4f vector4f = new Vec4f(f / 16.0F, g / 16.0F, 0.0F, 1.0F);
4949
vector4f.transform(matrix4f);
5050
float h = 16.0F * vector4f.getX();
5151
float i = 16.0F * vector4f.getY();
5252
float j = texture.getU(texture.getDirectionIndex(2));
5353
float k = texture.getV(texture.getDirectionIndex(2));
54-
Vector4f vector4f2 = new Vector4f(j / 16.0F, k / 16.0F, 0.0F, 1.0F);
54+
Vec4f vector4f2 = new Vec4f(j / 16.0F, k / 16.0F, 0.0F, 1.0F);
5555
vector4f2.transform(matrix4f);
5656
float l = 16.0F * vector4f2.getX();
5757
float m = 16.0F * vector4f2.getY();
@@ -166,7 +166,7 @@ public void transformVertex(Vec3f vertex, AffineTransformation transformation) {
166166
}
167167

168168
private void transformVertex(Vec3f vertex, Vec3f origin, Matrix4f transformationMatrix, Vec3f scale) {
169-
Vector4f vector4f = new Vector4f(vertex.getX() - origin.getX(), vertex.getY() - origin.getY(), vertex.getZ() - origin.getZ(), 1.0F);
169+
Vec4f vector4f = new Vec4f(vertex.getX() - origin.getX(), vertex.getY() - origin.getY(), vertex.getZ() - origin.getZ(), 1.0F);
170170
vector4f.transform(transformationMatrix);
171171
vector4f.multiplyComponentwise(scale);
172172
vertex.set(vector4f.getX() + origin.getX(), vector4f.getY() + origin.getY(), vector4f.getZ() + origin.getZ());

station-renderer-api-v0/src/main/java/net/modificationstation/stationapi/impl/client/render/StationTessellatorImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import net.modificationstation.stationapi.api.util.math.Direction;
88
import net.modificationstation.stationapi.api.util.math.Matrix4f;
99
import net.modificationstation.stationapi.api.util.math.Vec3f;
10-
import net.modificationstation.stationapi.api.util.math.Vector4f;
10+
import net.modificationstation.stationapi.api.util.math.Vec4f;
1111
import net.modificationstation.stationapi.mixin.render.client.TessellatorAccessor;
1212

1313
import java.nio.ByteBuffer;
@@ -20,7 +20,7 @@ public class StationTessellatorImpl implements StationTessellator {
2020
private final Tessellator self;
2121
private final TessellatorAccessor access;
2222
private final int[] fastVertexData = new int[32];
23-
private final Vector4f damageUV = new Vector4f();
23+
private final Vec4f damageUV = new Vec4f();
2424

2525
public StationTessellatorImpl(Tessellator tessellator) {
2626
self = tessellator;

0 commit comments

Comments
 (0)