SubData API updates & usage optimizations
This commit is contained in:
parent
6d32f1b6a0
commit
b0340b498e
|
@ -50,7 +50,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Server</artifactId>
|
<artifactId>Server</artifactId>
|
||||||
<version>21w05b</version>
|
<version>21w05d</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -38,10 +38,8 @@ public class PacketExDownloadTemplates implements PacketIn, PacketStreamOut {
|
||||||
@Override
|
@Override
|
||||||
public void send(SubDataClient client, OutputStream stream) throws Throwable {
|
public void send(SubDataClient client, OutputStream stream) throws Throwable {
|
||||||
try {
|
try {
|
||||||
int initial = client.getBlockSize();
|
if (client.getBlockSize() < DataSize.MBB) client.tempBlockSize(DataSize.MBB);
|
||||||
client.setBlockSize(DataSize.MBB);
|
|
||||||
Util.zip(new UniversalFile(plugin.dir, "SubServers:Templates"), stream);
|
Util.zip(new UniversalFile(plugin.dir, "SubServers:Templates"), stream);
|
||||||
client.setBlockSize(initial);
|
|
||||||
stream.close();
|
stream.close();
|
||||||
|
|
||||||
Util.isException(() -> Util.reflect(ExternalSubCreator.class.getDeclaredField("enableRT"), host.getCreator(), true));
|
Util.isException(() -> Util.reflect(ExternalSubCreator.class.getDeclaredField("enableRT"), host.getCreator(), true));
|
||||||
|
|
|
@ -30,7 +30,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||||
|
|
||||||
setName("SubServers 2");
|
setName("SubServers 2");
|
||||||
setVersion(new Version("2.16a+"));
|
setVersion(new Version("2.16a+"));
|
||||||
setBlockSize(DataSize.MB);
|
|
||||||
|
|
||||||
|
|
||||||
// 00-0F: Object Link Packets
|
// 00-0F: Object Link Packets
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>21w05b</version>
|
<version>21w05d</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -36,7 +36,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||||
|
|
||||||
setName("SubServers 2");
|
setName("SubServers 2");
|
||||||
addVersion(new Version("2.16a+"));
|
addVersion(new Version("2.16a+"));
|
||||||
setBlockSize(DataSize.MB);
|
|
||||||
|
|
||||||
|
|
||||||
// 00-0F: Object Link Packets
|
// 00-0F: Object Link Packets
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>21w05b</version>
|
<version>21w05d</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>21w05b</version>
|
<version>21w05d</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -39,7 +39,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||||
|
|
||||||
setName("SubServers 2");
|
setName("SubServers 2");
|
||||||
addVersion(new Version("2.16a+"));
|
addVersion(new Version("2.16a+"));
|
||||||
setBlockSize(DataSize.MB);
|
|
||||||
|
|
||||||
|
|
||||||
// 00-0F: Object Link Packets
|
// 00-0F: Object Link Packets
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>21w05b</version>
|
<version>21w05d</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class SubLoggerImpl {
|
||||||
Process process = this.process;
|
Process process = this.process;
|
||||||
ExHost host = SubAPI.getInstance().getInternals();
|
ExHost host = SubAPI.getInstance().getInternals();
|
||||||
if (logn) Util.isException(() -> {
|
if (logn) Util.isException(() -> {
|
||||||
channel = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].openChannel();
|
channel = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].newChannel();
|
||||||
channel.on.closed(new Callback<Pair<DisconnectReason, DataClient>>() {
|
channel.on.closed(new Callback<Pair<DisconnectReason, DataClient>>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Pair<DisconnectReason, DataClient> client) {
|
public void run(Pair<DisconnectReason, DataClient> client) {
|
||||||
|
@ -95,7 +95,7 @@ public class SubLoggerImpl {
|
||||||
if (!started || SubLoggerImpl.this.process == null || process != SubLoggerImpl.this.process || !process.isAlive()) {
|
if (!started || SubLoggerImpl.this.process == null || process != SubLoggerImpl.this.process || !process.isAlive()) {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
} else try {
|
} else try {
|
||||||
SubDataClient open = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].openChannel();
|
SubDataClient open = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].newChannel();
|
||||||
open.on.closed(run);
|
open.on.closed(run);
|
||||||
channel = open;
|
channel = open;
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
|
|
|
@ -34,7 +34,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||||
|
|
||||||
setName("SubServers 2");
|
setName("SubServers 2");
|
||||||
addVersion(new Version("2.16a+"));
|
addVersion(new Version("2.16a+"));
|
||||||
setBlockSize(DataSize.MB);
|
|
||||||
|
|
||||||
|
|
||||||
// 00-0F: Object Link Packets
|
// 00-0F: Object Link Packets
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>21w05b</version>
|
<version>21w05d</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -43,7 +43,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||||
|
|
||||||
setName("SubServers 2");
|
setName("SubServers 2");
|
||||||
addVersion(new Version("2.16a+"));
|
addVersion(new Version("2.16a+"));
|
||||||
setBlockSize(DataSize.MB);
|
|
||||||
|
|
||||||
|
|
||||||
// 00-0F: Object Link Packets
|
// 00-0F: Object Link Packets
|
||||||
|
|
Loading…
Reference in New Issue