summaryrefslogtreecommitdiffstats
path: root/nms-patches/JsonList.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/JsonList.patch')
-rw-r--r--nms-patches/JsonList.patch54
1 files changed, 34 insertions, 20 deletions
diff --git a/nms-patches/JsonList.patch b/nms-patches/JsonList.patch
index 9342f177..57ae7c2a 100644
--- a/nms-patches/JsonList.patch
+++ b/nms-patches/JsonList.patch
@@ -1,33 +1,47 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/JsonList.java 2014-11-28 17:43:43.249707432 +0000
-+++ src/main/java/net/minecraft/server/JsonList.java 2014-11-28 17:38:18.000000000 +0000
-@@ -79,6 +79,12 @@
- public String[] getEntries() {
+--- /home/matt/mc-dev-private//net/minecraft/server/JsonList.java 2015-02-26 22:40:22.863608136 +0000
++++ src/main/java/net/minecraft/server/JsonList.java 2015-02-26 22:40:22.863608136 +0000
+@@ -83,7 +83,7 @@
+
+ public V get(K k0) {
+ this.h();
+- return (JsonListEntry) this.d.get(this.a(k0));
++ return (V) this.d.get(this.a(k0)); // CraftBukkit - fix decompile error
+ }
+
+ public void remove(K k0) {
+@@ -101,6 +101,12 @@
return (String[]) this.d.keySet().toArray(new String[this.d.size()]);
}
-+
+
+ // CraftBukkit start
-+ public Collection<JsonListEntry> getValues() {
++ public Collection<V> getValues() {
+ return this.d.values();
+ }
+ // CraftBukkit end
-
++
public boolean isEmpty() {
return this.d.size() < 1;
-@@ -122,7 +128,7 @@
- return this.d;
}
+@@ -176,7 +182,7 @@
+ JsonListEntry jsonlistentry = (JsonListEntry) iterator.next();
-- public void save() {
-+ public void save() throws IOException { // CraftBukkit - Added throws
- Collection collection = this.d.values();
- String s = this.b.toJson(collection);
- BufferedWriter bufferedwriter = null;
-@@ -136,7 +142,7 @@
+ if (jsonlistentry.getKey() != null) {
+- this.d.put(this.a(jsonlistentry.getKey()), jsonlistentry);
++ this.d.put(this.a((K) jsonlistentry.getKey()), (V) jsonlistentry); // CraftBukkit - fix decompile error
+ }
+ }
+ }
+@@ -205,11 +211,11 @@
+ }
+ }
- }
+- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
++ public JsonElement serialize(JsonListEntry<K> object, Type type, JsonSerializationContext jsonserializationcontext) { // CraftBukkit - fix decompile error
+ return this.a((JsonListEntry) object, type, jsonserializationcontext);
+ }
-- public void load() {
-+ public void load() throws IOException { // CraftBukkit - Added throws
- Collection collection = null;
- BufferedReader bufferedreader = null;
+- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
++ public JsonListEntry<K> deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - fix decompile error
+ return this.a(jsonelement, type, jsondeserializationcontext);
+ }