Remove redundant patch

This commit is contained in:
md_5 2013-06-11 14:06:05 +10:00
parent 14a70d4c94
commit 016520a89f
22 changed files with 24 additions and 377 deletions

View File

@ -1,4 +1,4 @@
From f6bd2fb90b9b614f53681fd4145bbb81b2af7884 Mon Sep 17 00:00:00 2001
From 466112f1f5eeb7a8bd190d52d354ad2daa4e30f2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 23 Apr 2013 11:47:32 +1000
Subject: [PATCH] Netty
@ -210,10 +210,10 @@ index 17cfacc..a945892 100644
this.b = true;
} catch (Exception exception) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ff929e4..39311d9 100644
index 82dfef1..2485ef9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1374,4 +1374,20 @@ public final class CraftServer implements Server {
@@ -1389,4 +1389,20 @@ public final class CraftServer implements Server {
public CraftScoreboardManager getScoreboardManager() {
return scoreboardManager;
}

View File

@ -1,4 +1,4 @@
From ee6dd85e5385c495000a2949901a95e750ddd136 Mon Sep 17 00:00:00 2001
From 7a9eac68de775fb0a6335ab48aa250a50b455776 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Feb 2013 11:58:47 -0500
Subject: [PATCH] Entity Tracking Ranges

View File

@ -1,353 +0,0 @@
From e67b7218fe1029438873286490ca2514d8a9df16 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 21 Mar 2013 17:00:54 +1100
Subject: [PATCH] Stage DataWatcher & WatchableObject.
So that we may identify the exact cause of exceptions originating from these classes.
diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java
new file mode 100644
index 0000000..f0fa9ca
--- /dev/null
+++ b/src/main/java/net/minecraft/server/DataWatcher.java
@@ -0,0 +1,287 @@
+package net.minecraft.server;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+public class DataWatcher {
+
+ private boolean a = true;
+ private static final HashMap b = new HashMap();
+ private final Map c = new HashMap();
+ private boolean d;
+ private ReadWriteLock e = new ReentrantReadWriteLock();
+
+ public DataWatcher() {}
+
+ public void a(int i, Object object) {
+ Integer integer = (Integer) b.get(object.getClass());
+
+ if (integer == null) {
+ throw new IllegalArgumentException("Unknown data type: " + object.getClass());
+ } else if (i > 31) {
+ throw new IllegalArgumentException("Data value id is too big with " + i + "! (Max is " + 31 + ")");
+ } else if (this.c.containsKey(Integer.valueOf(i))) {
+ throw new IllegalArgumentException("Duplicate id value for " + i + "!");
+ } else {
+ WatchableObject watchableobject = new WatchableObject(integer.intValue(), i, object);
+
+ this.e.writeLock().lock();
+ this.c.put(Integer.valueOf(i), watchableobject);
+ this.e.writeLock().unlock();
+ this.a = false;
+ }
+ }
+
+ public void a(int i, int j) {
+ WatchableObject watchableobject = new WatchableObject(j, i, null);
+
+ this.e.writeLock().lock();
+ this.c.put(Integer.valueOf(i), watchableobject);
+ this.e.writeLock().unlock();
+ this.a = false;
+ }
+
+ public byte getByte(int i) {
+ return ((Byte) this.i(i).b()).byteValue();
+ }
+
+ public short getShort(int i) {
+ return ((Short) this.i(i).b()).shortValue();
+ }
+
+ public int getInt(int i) {
+ return ((Integer) this.i(i).b()).intValue();
+ }
+
+ public String getString(int i) {
+ return (String) this.i(i).b();
+ }
+
+ public ItemStack getItemStack(int i) {
+ return (ItemStack) this.i(i).b();
+ }
+
+ private WatchableObject i(int i) {
+ this.e.readLock().lock();
+
+ WatchableObject watchableobject;
+
+ try {
+ watchableobject = (WatchableObject) this.c.get(Integer.valueOf(i));
+ } catch (Throwable throwable) {
+ CrashReport crashreport = CrashReport.a(throwable, "Getting synched entity data");
+ CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Synched entity data");
+
+ crashreportsystemdetails.a("Data ID", Integer.valueOf(i));
+ throw new ReportedException(crashreport);
+ }
+
+ this.e.readLock().unlock();
+ return watchableobject;
+ }
+
+ public void watch(int i, Object object) {
+ WatchableObject watchableobject = this.i(i);
+
+ if (!object.equals(watchableobject.b())) {
+ watchableobject.a(object);
+ watchableobject.a(true);
+ this.d = true;
+ }
+ }
+
+ public void h(int i) {
+ WatchableObject.a(this.i(i), true);
+ this.d = true;
+ }
+
+ public boolean a() {
+ return this.d;
+ }
+
+ public static void a(List list, DataOutputStream dataoutputstream) throws IOException { // Spigot
+ if (list != null) {
+ Iterator iterator = list.iterator();
+
+ while (iterator.hasNext()) {
+ WatchableObject watchableobject = (WatchableObject) iterator.next();
+
+ a(dataoutputstream, watchableobject);
+ }
+ }
+
+ dataoutputstream.writeByte(127);
+ }
+
+ public List b() {
+ ArrayList arraylist = null;
+
+ if (this.d) {
+ this.e.readLock().lock();
+ Iterator iterator = this.c.values().iterator();
+
+ while (iterator.hasNext()) {
+ WatchableObject watchableobject = (WatchableObject) iterator.next();
+
+ if (watchableobject.d()) {
+ watchableobject.a(false);
+ if (arraylist == null) {
+ arraylist = new ArrayList();
+ }
+
+ arraylist.add(watchableobject);
+ }
+ }
+
+ this.e.readLock().unlock();
+ }
+
+ this.d = false;
+ return arraylist;
+ }
+
+ public void a(DataOutputStream dataoutputstream) throws IOException { // Spigot
+ this.e.readLock().lock();
+ Iterator iterator = this.c.values().iterator();
+
+ while (iterator.hasNext()) {
+ WatchableObject watchableobject = (WatchableObject) iterator.next();
+
+ a(dataoutputstream, watchableobject);
+ }
+
+ this.e.readLock().unlock();
+ dataoutputstream.writeByte(127);
+ }
+
+ public List c() {
+ ArrayList arraylist = null;
+
+ this.e.readLock().lock();
+
+ WatchableObject watchableobject;
+
+ for (Iterator iterator = this.c.values().iterator(); iterator.hasNext(); arraylist.add(watchableobject)) {
+ watchableobject = (WatchableObject) iterator.next();
+ if (arraylist == null) {
+ arraylist = new ArrayList();
+ }
+ }
+
+ this.e.readLock().unlock();
+ return arraylist;
+ }
+
+ private static void a(DataOutputStream dataoutputstream, WatchableObject watchableobject) throws IOException { // Spigot
+ int i = (watchableobject.c() << 5 | watchableobject.a() & 31) & 255;
+
+ dataoutputstream.writeByte(i);
+ switch (watchableobject.c()) {
+ case 0:
+ dataoutputstream.writeByte(((Byte) watchableobject.b()).byteValue());
+ break;
+
+ case 1:
+ dataoutputstream.writeShort(((Short) watchableobject.b()).shortValue());
+ break;
+
+ case 2:
+ dataoutputstream.writeInt(((Integer) watchableobject.b()).intValue());
+ break;
+
+ case 3:
+ dataoutputstream.writeFloat(((Float) watchableobject.b()).floatValue());
+ break;
+
+ case 4:
+ Packet.a((String) watchableobject.b(), dataoutputstream);
+ break;
+
+ case 5:
+ ItemStack itemstack = (ItemStack) watchableobject.b();
+
+ Packet.a(itemstack, dataoutputstream);
+ break;
+
+ case 6:
+ ChunkCoordinates chunkcoordinates = (ChunkCoordinates) watchableobject.b();
+
+ dataoutputstream.writeInt(chunkcoordinates.x);
+ dataoutputstream.writeInt(chunkcoordinates.y);
+ dataoutputstream.writeInt(chunkcoordinates.z);
+ }
+ }
+
+ public static List a(DataInputStream datainputstream) throws IOException { // Spigot
+ ArrayList arraylist = null;
+
+ for (byte b0 = datainputstream.readByte(); b0 != 127; b0 = datainputstream.readByte()) {
+ if (arraylist == null) {
+ arraylist = new ArrayList();
+ }
+
+ int i = (b0 & 224) >> 5;
+ int j = b0 & 31;
+ WatchableObject watchableobject = null;
+
+ switch (i) {
+ case 0:
+ watchableobject = new WatchableObject(i, j, Byte.valueOf(datainputstream.readByte()));
+ break;
+
+ case 1:
+ watchableobject = new WatchableObject(i, j, Short.valueOf(datainputstream.readShort()));
+ break;
+
+ case 2:
+ watchableobject = new WatchableObject(i, j, Integer.valueOf(datainputstream.readInt()));
+ break;
+
+ case 3:
+ watchableobject = new WatchableObject(i, j, Float.valueOf(datainputstream.readFloat()));
+ break;
+
+ case 4:
+ watchableobject = new WatchableObject(i, j, Packet.a(datainputstream, 64));
+ break;
+
+ case 5:
+ watchableobject = new WatchableObject(i, j, Packet.c(datainputstream));
+ break;
+
+ case 6:
+ int k = datainputstream.readInt();
+ int l = datainputstream.readInt();
+ int i1 = datainputstream.readInt();
+
+ watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k, l, i1));
+ }
+
+ arraylist.add(watchableobject);
+ }
+
+ return arraylist;
+ }
+
+ public boolean d() {
+ return this.a;
+ }
+
+ static {
+ b.put(Byte.class, Integer.valueOf(0));
+ b.put(Short.class, Integer.valueOf(1));
+ b.put(Integer.class, Integer.valueOf(2));
+ b.put(Float.class, Integer.valueOf(3));
+ b.put(String.class, Integer.valueOf(4));
+ b.put(ItemStack.class, Integer.valueOf(5));
+ b.put(ChunkCoordinates.class, Integer.valueOf(6));
+ }
+}
diff --git a/src/main/java/net/minecraft/server/WatchableObject.java b/src/main/java/net/minecraft/server/WatchableObject.java
new file mode 100644
index 0000000..678aa91
--- /dev/null
+++ b/src/main/java/net/minecraft/server/WatchableObject.java
@@ -0,0 +1,44 @@
+package net.minecraft.server;
+
+public class WatchableObject {
+
+ private final int a;
+ private final int b;
+ private Object c;
+ private boolean d;
+
+ public WatchableObject(int i, int j, Object object) {
+ this.b = j;
+ this.c = object;
+ this.a = i;
+ this.d = true;
+ }
+
+ public int a() {
+ return this.b;
+ }
+
+ public void a(Object object) {
+ this.c = object;
+ }
+
+ public Object b() {
+ return this.c;
+ }
+
+ public int c() {
+ return this.a;
+ }
+
+ public boolean d() {
+ return this.d;
+ }
+
+ public void a(boolean flag) {
+ this.d = flag;
+ }
+
+ static boolean a(WatchableObject watchableobject, boolean flag) {
+ return watchableobject.d = flag;
+ }
+}
--
1.8.1.2

View File

@ -1,4 +1,4 @@
From ca371364635e418b297745fdfb1a9e5a1f3f1149 Mon Sep 17 00:00:00 2001
From 9f3a81d2a07452e24ec0affe007f47a90e50351b Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 11:15:11 +1100
Subject: [PATCH] BungeeCord Support

View File

@ -1,4 +1,4 @@
From 29e1876216e161284bde8964a33d2064410b0889 Mon Sep 17 00:00:00 2001
From 72f8a9e2cf2195bfa5e6cb491496ed76e11396c6 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 13:04:45 +1100
Subject: [PATCH] Texture Pack Resolutions

View File

@ -1,4 +1,4 @@
From 5f542438e7d8dcd2ea42a9793feec7d4eaffd0ae Mon Sep 17 00:00:00 2001
From 6d634e5f4a78fc72a3dec4a6e9b6727ab0b09eaa Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 19:08:41 +1100
Subject: [PATCH] Limit Custom Map Rendering

View File

@ -1,4 +1,4 @@
From 0ea93eb08852641102d51a1a8ae4b84a9b1022dd Mon Sep 17 00:00:00 2001
From 5397d36be3a93afd7b4a3080af4cce5c8bb0f6c1 Mon Sep 17 00:00:00 2001
From: Hudson <hudson@mydomain.com>
Date: Wed, 3 Apr 2013 02:16:56 -0500
Subject: [PATCH] Revert "Throw exception for disabled plugin tasks. Fixes

View File

@ -1,4 +1,4 @@
From 7abc0d7cdeac2369d52acd424df41766b13297be Mon Sep 17 00:00:00 2001
From eac39fdfb71fa7098f49ef79afbdc45eb30a5833 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Feb 2013 20:45:20 +1100
Subject: [PATCH] Enable Improved ping sending

View File

@ -1,4 +1,4 @@
From b2d589c87acbdf25ea1d3c0e12e8b9c2cba981d5 Mon Sep 17 00:00:00 2001
From 9b5ebd76c5b4dbe304f3bfb417eb1099fd9dde0d Mon Sep 17 00:00:00 2001
From: Benjamin James Harrison-Sims <tehrainbowguy@gmail.com>
Date: Sun, 14 Apr 2013 21:19:57 +0500
Subject: [PATCH] Prevent handshake spam from invalid names.

View File

@ -1,4 +1,4 @@
From d7c2bcb5484e97e70b62416fb4d3c47d574bf3af Mon Sep 17 00:00:00 2001
From 3e6d1c4c4c502bd2cbb06f6fe2e0642779e23fd2 Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com>
Date: Sat, 20 Apr 2013 12:26:20 +0500
Subject: [PATCH] Save entity counts for randomly spawned creatures to avoid

View File

@ -1,4 +1,4 @@
From 517269b20f3cc981e89795653662eae59ceda92e Mon Sep 17 00:00:00 2001
From e0d82a1a80afcf59a31f49a89e991522d5fc9f81 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 23 Apr 2013 11:50:27 +1000
Subject: [PATCH] Thread Naming and Tweaks

View File

@ -1,4 +1,4 @@
From 452da8bd599aafae899e85e9be2bb9169748deef Mon Sep 17 00:00:00 2001
From e69033577aab7e5ace22b31a00d1e8f4a418d83a Mon Sep 17 00:00:00 2001
From: Antony Riley <antony@cyberiantiger.org>
Date: Wed, 27 Mar 2013 01:41:54 +0200
Subject: [PATCH] Fixes BUKKIT-3893 - Close world save files when world is
@ -19,7 +19,7 @@ index 900ed68..829f4a3 100644
public static synchronized RegionFile a(File file1, int i, int j) {
File file2 = new File(file1, "region");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 39311d9..f9da70f 100644
index 2485ef9..b6fe332 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer;

View File

@ -1,4 +1,4 @@
From cf1ba399044a6d2b54c0c8fafdffd5cf425c5ebe Mon Sep 17 00:00:00 2001
From eb6db52a6fdf947d77f48cfbe3c9a6082ae5b32e Mon Sep 17 00:00:00 2001
From: snowleo <schneeleo@gmail.com>
Date: Wed, 8 May 2013 12:09:45 +1000
Subject: [PATCH] Optimized version of LocaleLanguage

View File

@ -1,4 +1,4 @@
From 124d31f511b7c24801f296c719b400c2b7c805e7 Mon Sep 17 00:00:00 2001
From 44cd5d8a6761be65f4fdea1869a367d925cb6d6c Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Wed, 24 Apr 2013 01:43:33 -0500
Subject: [PATCH] Improve next-tick-list performance on chunk unloads, large

View File

@ -1,4 +1,4 @@
From 4196630556c7156c4bd07043106c7efda89bc8ae Mon Sep 17 00:00:00 2001
From 1d23e9d584d5fdb867f3c718d553dd51665eb97a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 19 May 2013 18:29:48 +1000
Subject: [PATCH] Remove -o Option

View File

@ -1,4 +1,4 @@
From 749ed3b8ece5efc8940c84c22f648682f61235c4 Mon Sep 17 00:00:00 2001
From f4e34841568bde49c88f151a289dced061dc8c80 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 1 Jun 2013 16:34:38 +1000
Subject: [PATCH] Recipe Deconstruction

View File

@ -1,4 +1,4 @@
From b4c915c6e625586977b42d95d05365664f1838c9 Mon Sep 17 00:00:00 2001
From 45bf0bbac3ca8a8dfc69872101ccdc25b2a5adf5 Mon Sep 17 00:00:00 2001
From: Nick Minkler <sleaker@gmail.com>
Date: Sun, 2 Jun 2013 14:54:11 +1000
Subject: [PATCH] Fix Health Scaling

View File

@ -1,4 +1,4 @@
From 6f656ab78d9cf3b7148cc6e675d3d581ffd2fc70 Mon Sep 17 00:00:00 2001
From 06619c389d4a286352b99b7867e887145af6839e Mon Sep 17 00:00:00 2001
From: Nick Minkler <sleaker@gmail.com>
Date: Sun, 2 Jun 2013 15:04:37 +1000
Subject: [PATCH] Fix EntityShootBowEvent with Skeletons

View File

@ -1,4 +1,4 @@
From 6f4a8bbd03060d87939bcb57883f34dbaad01993 Mon Sep 17 00:00:00 2001
From 633209efd05ce157f4045c0517bb7dcedaa396bb Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:16:05 +1000
Subject: [PATCH] Implement Arrow API

View File

@ -1,4 +1,4 @@
From d711bdcb5dcd3f2856cd4c79a6728999c1f13628 Mon Sep 17 00:00:00 2001
From 5947136292ce1e17489a7a0b44476ec85b1249ca Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 16:14:30 +1000
Subject: [PATCH] Particle API

View File

@ -1,4 +1,4 @@
From 9c1f21f27cbccb321b8e155f9a93b2ca1f75bd87 Mon Sep 17 00:00:00 2001
From 046fe6f829d0e08dfcc0283be964fe7e4977c454 Mon Sep 17 00:00:00 2001
From: DerFlash <bte@freenet.de>
Date: Sun, 2 Jun 2013 16:23:46 +1000
Subject: [PATCH] Hopper Cooldowns

View File

@ -1,4 +1,4 @@
From 911080c0d3b2f3d1861dcda88acfd85c822a379f Mon Sep 17 00:00:00 2001
From 2e8928d31ad16a25a3d171169281954e5357c38f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 11 Jun 2013 11:54:32 +1000
Subject: [PATCH] Prevent Shutdown Hang