Skip to content

Commit

Permalink
SubData API updates & usage optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
ME1312 committed Jan 30, 2021
1 parent 6d32f1b commit b0340b4
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion SubServers.Bungee/pom.xml
Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Server</artifactId>
<version>21w05b</version>
<version>21w05d</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Expand Down
Expand Up @@ -38,10 +38,8 @@ public PacketExDownloadTemplates(SubProxy plugin, ExternalHost host) {
@Override
public void send(SubDataClient client, OutputStream stream) throws Throwable {
try {
int initial = client.getBlockSize();
client.setBlockSize(DataSize.MBB);
if (client.getBlockSize() < DataSize.MBB) client.tempBlockSize(DataSize.MBB);
Util.zip(new UniversalFile(plugin.dir, "SubServers:Templates"), stream);
client.setBlockSize(initial);
stream.close();

Util.isException(() -> Util.reflect(ExternalSubCreator.class.getDeclaredField("enableRT"), host.getCreator(), true));
Expand Down
Expand Up @@ -30,7 +30,6 @@ protected SubProtocol() {

setName("SubServers 2");
setVersion(new Version("2.16a+"));
setBlockSize(DataSize.MB);


// 00-0F: Object Link Packets
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Client/Bukkit/pom.xml
Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>21w05b</version>
<version>21w05d</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Expand Down
Expand Up @@ -36,7 +36,6 @@ protected SubProtocol() {

setName("SubServers 2");
addVersion(new Version("2.16a+"));
setBlockSize(DataSize.MB);


// 00-0F: Object Link Packets
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Client/Common/pom.xml
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>21w05b</version>
<version>21w05d</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Client/Sponge/pom.xml
Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>21w05b</version>
<version>21w05d</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Expand Down
Expand Up @@ -39,7 +39,6 @@ protected SubProtocol() {

setName("SubServers 2");
addVersion(new Version("2.16a+"));
setBlockSize(DataSize.MB);


// 00-0F: Object Link Packets
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Host/pom.xml
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>21w05b</version>
<version>21w05d</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Expand Down
Expand Up @@ -78,7 +78,7 @@ public void start() {
Process process = this.process;
ExHost host = SubAPI.getInstance().getInternals();
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>>() {
@Override
public void run(Pair<DisconnectReason, DataClient> client) {
Expand All @@ -95,7 +95,7 @@ public void run() {
if (!started || SubLoggerImpl.this.process == null || process != SubLoggerImpl.this.process || !process.isAlive()) {
timer.cancel();
} else try {
SubDataClient open = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].openChannel();
SubDataClient open = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].newChannel();
open.on.closed(run);
channel = open;
timer.cancel();
Expand Down
Expand Up @@ -34,7 +34,6 @@ protected SubProtocol() {

setName("SubServers 2");
addVersion(new Version("2.16a+"));
setBlockSize(DataSize.MB);


// 00-0F: Object Link Packets
Expand Down
2 changes: 1 addition & 1 deletion SubServers.Sync/pom.xml
Expand Up @@ -57,7 +57,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>21w05b</version>
<version>21w05d</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Expand Down
Expand Up @@ -43,7 +43,6 @@ protected SubProtocol() {

setName("SubServers 2");
addVersion(new Version("2.16a+"));
setBlockSize(DataSize.MB);


// 00-0F: Object Link Packets
Expand Down

0 comments on commit b0340b4

Please sign in to comment.