Skip to content

Commit 21cabb9

Browse files
committed
new version, forgot some things
1 parent 97732f0 commit 21cabb9

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

client/src/com/xpdustry/claj/client/ClajPackets.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import arc.util.io.ByteBufferOutput;
99

1010

11-
/** @implNote This class must be the same for the client and the server. */
11+
/** @implNote This class must be the same for client and server. */
1212
public class ClajPackets {
1313
/** Identifier for CLaJ packets */
1414
public static final byte id = -4; /*doesn't uses other claj packet identifier to avoid problems*/
@@ -64,8 +64,8 @@ public void write(ByteBufferOutput write) {
6464
write0(write);
6565
}
6666

67-
public void read0(ByteBufferInput read) {};
68-
public void write0(ByteBufferOutput write) {};
67+
protected void read0(ByteBufferInput read) {};
68+
protected void write0(ByteBufferOutput write) {};
6969
}
7070

7171
/** Special packet for connection packet wrapping. */
@@ -77,11 +77,11 @@ public static class ConnectionPacketWrapPacket extends ConnectionWrapperPacket {
7777

7878
public boolean isTCP;
7979

80-
public void read0(ByteBufferInput read) {
80+
protected void read0(ByteBufferInput read) {
8181
isTCP = read.readBoolean();
8282
}
8383

84-
public void write0(ByteBufferOutput write) {
84+
protected void write0(ByteBufferOutput write) {
8585
write.writeBoolean(isTCP);
8686
}
8787
}
@@ -91,24 +91,24 @@ public static class ConnectionClosedPacket extends ConnectionWrapperPacket {
9191

9292
public DcReason reason;
9393

94-
public void read0(ByteBufferInput read) {
94+
protected void read0(ByteBufferInput read) {
9595
byte b = read.readByte();
9696
reason = b < 0 || b >= reasons.length ? DcReason.error : reasons[b];
9797
}
9898

99-
public void write0(ByteBufferOutput write) {
99+
protected void write0(ByteBufferOutput write) {
100100
write.writeByte((byte)reason.ordinal());
101101
}
102102
}
103103

104104
public static class ConnectionJoinPacket extends ConnectionWrapperPacket {
105105
public long roomId = -1;
106-
107-
public void read0(ByteBufferInput read) {
106+
107+
protected void read0(ByteBufferInput read) {
108108
roomId = read.readLong();
109109
}
110110

111-
public void write0(ByteBufferOutput write) {
111+
protected void write0(ByteBufferOutput write) {
112112
write.writeLong(roomId);
113113
}
114114
}

mod.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CLaJ (Copy Link and Join) allow you to play with your friends just by creating a
1010

1111
Please check this link for Mindustry v8 compatibility: https://github.com/xpdustry/claj#mindustry-v8-note
1212
'''
13-
version: "2.2.1"
13+
version: "2.3"
1414
minGameVersion: "146"
1515
java: true
1616
hidden: true

server/src/com/xpdustry/claj/server/ClajRoom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
public class ClajRoom implements NetListener {
13-
private /*volatile*/ boolean closed;
13+
private boolean closed;
1414

1515
public final long id;
1616
public final Connection host;

0 commit comments

Comments
 (0)