From 5e1c969af27c7aa1f1f73a14db5d26da179e3f27 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Thu, 26 May 2011 16:20:11 +0200 Subject: [PATCH] Update for 1.6.4 --- pom.xml | 2 +- .../net/minecraft/server/NetworkManager.java | 24 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index ba889c8549..c49b6df47a 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ org.bukkit minecraft-server - 1.6 + 1.6.4 jar compile diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index f463aa58bf..f2bcbb727c 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -82,7 +82,9 @@ public class NetworkManager { } } - private void f() { + private boolean f() { + boolean flag = false; + try { Object object; Packet packet; @@ -100,9 +102,9 @@ public class NetworkManager { aint = e; i = packet.b(); aint[i] += packet.a(); + flag = true; } - // Craftbukkit - we used to enforce package priorities, we don't now. Do we need to redo this? - TODO if (this.z-- <= 0 && !this.o.isEmpty() && (this.f == 0 || System.currentTimeMillis() - ((Packet) this.o.get(0)).timestamp >= (long) this.f)) { object = this.g; synchronized (this.g) { @@ -115,19 +117,24 @@ public class NetworkManager { i = packet.b(); aint[i] += packet.a(); this.z = 50; + flag = true; } } catch (Exception exception) { if (!this.t) { this.a(exception); } } + + return flag; } public void a() { this.y = true; } - private void g() { + private boolean g() { + boolean flag = false; + try { Packet packet = Packet.a(this.input, this.p.c()); @@ -137,6 +144,7 @@ public class NetworkManager { aint[i] += packet.a(); this.m.add(packet); + flag = true; } else { this.a("disconnect.endOfStream", new Object[0]); } @@ -145,6 +153,8 @@ public class NetworkManager { this.a(exception); } } + + return flag; } private void a(Exception exception) { @@ -232,12 +242,12 @@ public class NetworkManager { return networkmanager.q; } - static void c(NetworkManager networkmanager) { - networkmanager.g(); + static boolean c(NetworkManager networkmanager) { + return networkmanager.g(); } - static void d(NetworkManager networkmanager) { - networkmanager.f(); + static boolean d(NetworkManager networkmanager) { + return networkmanager.f(); } static boolean e(NetworkManager networkmanager) {