mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-26 06:53:01 +00:00
Request for loaded chunks is now handled by a Req packet.
This commit is contained in:
1 parent
e59eccf811
commit
578f50fbcb
7 files changed
+43
-60
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package mcp.mobius.opis.data.holders;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class SerializableInt implements ISerializable {
|
||||
|
||||
public int value = 0;
|
||||
|
||||
public SerializableInt(int value){
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToStream(DataOutputStream stream) throws IOException {
|
||||
stream.writeInt(this.value);
|
||||
}
|
||||
|
||||
public static SerializableInt readFromStream(DataInputStream stream) throws IOException {
|
||||
return new SerializableInt(stream.readInt());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user