Skip to content

Commit

Permalink
Update VectorSerializer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
chyzman authored Oct 30, 2023
1 parent 29338a6 commit ebd3108
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/io/wispforest/owo/util/VectorSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ public static void writef(PacketByteBuf buffer, Vector3f vec3f) {
* @param buffer The packet buffer to write into
*/
public static void writei(PacketByteBuf buffer, Vec3i vec3i) {
buffer.writeFloat(vec3i.getX());
buffer.writeFloat(vec3i.getY());
buffer.writeFloat(vec3i.getZ());
buffer.writeInt(vec3i.getX());
buffer.writeInt(vec3i.getY());
buffer.writeInt(vec3i.getZ());
}

/**
Expand Down Expand Up @@ -194,7 +194,7 @@ public static Vector3f readf(PacketByteBuf buffer) {
* @param buffer The buffer to read from
* @return The deserialized vector
*/
public static Vector3f readi(PacketByteBuf buffer) {
return new Vector3f(buffer.readInt(), buffer.readInt(), buffer.readInt());
public static Vec3i readi(PacketByteBuf buffer) {
return new Vec3i(buffer.readInt(), buffer.readInt(), buffer.readInt());
}
}

0 comments on commit ebd3108

Please sign in to comment.