Skip to content

Commit 72338e2

Browse files
authored
fixes: making life easier for me
1 parent 945600f commit 72338e2

File tree

1 file changed

+37
-39
lines changed

1 file changed

+37
-39
lines changed

src/main/java/net/potato/tuff/ChunkSectionKey.java

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,65 @@
33
import java.util.Objects;
44
import java.util.UUID;
55

6-
// formats stuff to be good boy strings
7-
86
public final class ChunkSectionKey {
9-
private final UUID playerId;
10-
private final String worldName;
11-
private final int cx;
12-
private final int cz;
13-
private final int sectionY;
7+
private final UUID p;
8+
private final String w;
9+
private final int x;
10+
private final int z;
11+
private final int y;
1412

15-
public ChunkSectionKey(UUID playerId, String worldName, int cx, int cz, int sectionY) {
16-
this.playerId = playerId;
17-
this.worldName = worldName;
18-
this.cx = cx;
19-
this.cz = cz;
20-
this.sectionY = sectionY;
13+
public ChunkSectionKey(UUID p, String w, int x, int z, int y) {
14+
this.p = p;
15+
this.w = w;
16+
this.x = x;
17+
this.z = z;
18+
this.y = y;
2119
}
2220

23-
public UUID playerId() {
24-
return playerId;
21+
public UUID p() {
22+
return p;
2523
}
2624

27-
public String worldName() {
28-
return worldName;
25+
public String w() {
26+
return w;
2927
}
3028

31-
public int cx() {
32-
return cx;
29+
public int x() {
30+
return x;
3331
}
3432

35-
public int cz() {
36-
return cz;
33+
public int z() {
34+
return z;
3735
}
3836

39-
public int sectionY() {
40-
return sectionY;
37+
public int y() {
38+
return y;
4139
}
4240

4341
@Override
44-
public boolean equals(Object obj) {
45-
if (obj == this) return true;
46-
if (obj == null || obj.getClass() != this.getClass()) return false;
47-
var that = (ChunkSectionKey) obj;
48-
return Objects.equals(this.playerId, that.playerId) &&
49-
Objects.equals(this.worldName, that.worldName) &&
50-
this.cx == that.cx &&
51-
this.cz == that.cz &&
52-
this.sectionY == that.sectionY;
42+
public boolean equals(Object o) {
43+
if (o == this) return true;
44+
if (o == null || o.getClass() != this.getClass()) return false;
45+
var t = (ChunkSectionKey) o;
46+
return Objects.equals(p, t.p) &&
47+
Objects.equals(w, t.w) &&
48+
x == t.x &&
49+
z == t.z &&
50+
y == t.y;
5351
}
5452

5553
@Override
5654
public int hashCode() {
57-
return Objects.hash(playerId, worldName, cx, cz, sectionY);
55+
return Objects.hash(p, w, x, z, y);
5856
}
5957

6058
@Override
6159
public String toString() {
6260
return "ChunkSectionKey[" +
63-
"playerId=" + playerId + ", " +
64-
"worldName=" + worldName + ", " +
65-
"cx=" + cx + ", " +
66-
"cz=" + cz + ", " +
67-
"sectionY=" + sectionY + ']';
61+
"p=" + p + ", " +
62+
"w=" + w + ", " +
63+
"x=" + x + ", " +
64+
"z=" + z + ", " +
65+
"y=" + y + ']';
6866
}
69-
}
67+
}

0 commit comments

Comments
 (0)