Skip to content

Commit b73ff10

Browse files
author
nxyi
committed
fix shitty string logic in SoundCoordLogger
1 parent de4e842 commit b73ff10

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/main/java/com/dark/zewo2/modules/SoundCoordLogger.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,12 @@ else if (SoundEvents.ENTITY_ENDER_DRAGON_DEATH.equals((packet).getSound())){
3434
}
3535
}
3636

37-
private String vectorToString(Vec3d vector, boolean... includeY) {
38-
boolean reallyIncludeY = includeY.length <= 0 || includeY[0];
39-
StringBuilder builder = new StringBuilder();
40-
builder.append('(');
41-
builder.append((int) Math.floor(vector.x));
42-
builder.append(", ");
43-
if(reallyIncludeY) {
44-
builder.append((int) Math.floor(vector.y));
45-
builder.append(", ");
46-
}
47-
builder.append((int) Math.floor(vector.z));
48-
builder.append(")");
49-
return builder.toString();
37+
private String vectorToString(Vec3d vector) {
38+
return String.format(
39+
"(%s, %s, %s)",
40+
Math.floor(vector.x),
41+
Math.floor(vector.y),
42+
Math.floor(vector.z)
43+
);
5044
}
5145
}

0 commit comments

Comments
 (0)