Fix decompile errors in mc-dev imports patch

This commit is contained in:
Byteflux 2016-03-24 19:57:01 -07:00
parent a897a66edf
commit 2f0866fef0
5 changed files with 35 additions and 74 deletions

View File

@ -1,4 +1,4 @@
From 98d8a98bd712d19cfaaf81e9facc1979ca9b86cb Mon Sep 17 00:00:00 2001
From fd9c172a1694ccc0b0116a1595490ae4ab28fdd9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:09:10 -0600
Subject: [PATCH] mc-dev imports
@ -6,7 +6,7 @@ Subject: [PATCH] mc-dev imports
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
new file mode 100644
index 0000000..e54e7b7
index 0000000..fa95e8f
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -0,0 +1,93 @@
@ -99,13 +99,13 @@ index 0000000..e54e7b7
+ return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
+ }
+
+ public int compareTo(Object object) {
+ public int compareTo(BaseBlockPosition object) { // Paper - correct decompile error
+ return this.i((BaseBlockPosition) object);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
new file mode 100644
index 0000000..be4b871
index 0000000..bc83bb7
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -0,0 +1,463 @@
@ -158,7 +158,7 @@ index 0000000..be4b871
+ protected List<BiomeBase.BiomeMeta> x;
+
+ public static int a(BiomeBase biomebase) {
+ return BiomeBase.REGISTRY_ID.a((Object) biomebase);
+ return BiomeBase.REGISTRY_ID.a(biomebase); // Paper - Fix compile
+ }
+
+ public static BiomeBase a(int i) {
@ -4463,10 +4463,10 @@ index 0000000..871535c
+}
diff --git a/src/main/java/net/minecraft/server/CommandWhitelist.java b/src/main/java/net/minecraft/server/CommandWhitelist.java
new file mode 100644
index 0000000..b52bf74
index 0000000..fdc9210
--- /dev/null
+++ b/src/main/java/net/minecraft/server/CommandWhitelist.java
@@ -0,0 +1,91 @@
@@ -0,0 +1,98 @@
+package net.minecraft.server;
+
+import com.mojang.authlib.GameProfile;
@ -4557,6 +4557,13 @@ index 0000000..b52bf74
+ return Collections.emptyList();
+ }
+ }
+
+ // Paper start - Fix decompiler error
+ @Override
+ public int compareTo(ICommand o) {
+ return a((ICommand) o);
+ }
+ // Paper end
+}
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
new file mode 100644
@ -5039,7 +5046,7 @@ index 0000000..30ca225
+}
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
new file mode 100644
index 0000000..e9c2a23
index 0000000..49c0ca8
--- /dev/null
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -0,0 +1,34 @@
@ -5074,12 +5081,12 @@ index 0000000..e9c2a23
+ }
+
+ public void a(PacketListenerPlayOut packetlistenerplayout) {
+ packetlistenerplayout.a(this);
+ packetlistenerplayout.a((IChatBaseComponent) this); // Paper - Fix decompile error
+ }
+}
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
new file mode 100644
index 0000000..2286c9e
index 0000000..a27ad50
--- /dev/null
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
@@ -0,0 +1,99 @@
@ -5142,7 +5149,7 @@ index 0000000..2286c9e
+ }
+
+ public void a(PacketListenerPlayOut packetlistenerplayout) {
+ packetlistenerplayout.a(this);
+ packetlistenerplayout.a((IChatBaseComponent) this); // Paper - Fix decompile error
+ }
+
+ public static enum EnumTitleAction {
@ -5620,5 +5627,5 @@ index 0000000..e454622
+ }
+}
--
2.7.4.windows.1
2.7.1.windows.2

View File

@ -1,4 +1,4 @@
From 5ea4fba695f5844e3f0b69dc14fb186a1c53f8c6 Mon Sep 17 00:00:00 2001
From 3153e0896d31da822d29c355ceff0c42cca4c543 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 02:17:54 -0600
Subject: [PATCH] Generator Settings
@ -38,18 +38,9 @@ index 1b88731..7154d31 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index be4b871..854bbb4 100644
index bc83bb7..854bbb4 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -47,7 +47,7 @@ public abstract class BiomeBase {
protected List<BiomeBase.BiomeMeta> x;
public static int a(BiomeBase biomebase) {
- return BiomeBase.REGISTRY_ID.a((Object) biomebase);
+ return BiomeBase.REGISTRY_ID.a(biomebase); // Paper - Fix compile
}
public static BiomeBase a(int i) {
@@ -174,7 +174,7 @@ public abstract class BiomeBase {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
@ -274,5 +265,5 @@ index 22d96e9..83d9509 100644
Iterator iterator = this.c.values().iterator();
--
2.7.3
2.7.1.windows.2

View File

@ -1,11 +1,11 @@
From fb30bddc521a4f713e03a4b909e08c04088c9bdb Mon Sep 17 00:00:00 2001
From a24aa65271bbecaf9e427402a1b3979a241839e2 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 02:32:10 -0600
Subject: [PATCH] Player Tab List and Title APIs
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
index e9c2a23..3431b12 100644
index 49c0ca8..38252b0 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -1,14 +1,11 @@
@ -47,18 +47,8 @@ index e9c2a23..3431b12 100644
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {
@@ -28,7 +36,8 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet<PacketListene
packetdataserializer.a(this.b);
}
+ // PaperSpigot - Fix compile error
public void a(PacketListenerPlayOut packetlistenerplayout) {
- packetlistenerplayout.a(this);
+ packetlistenerplayout.a((IChatBaseComponent) this);
}
}
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
index 2286c9e..8cc2efb 100644
index a27ad50..ecadb81 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
@@ -10,6 +10,18 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
@ -95,17 +85,6 @@ index 2286c9e..8cc2efb 100644
}
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
@@ -56,8 +74,9 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
}
+ // Paper - Fix compile error
public void a(PacketListenerPlayOut packetlistenerplayout) {
- packetlistenerplayout.a(this);
+ packetlistenerplayout.a((IChatBaseComponent) this);
}
public static enum EnumTitleAction {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 10bf160..f5afeeb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@ -202,5 +181,5 @@ index 10bf160..f5afeeb 100644
@Override
--
2.7.4.windows.1
2.7.1.windows.2

View File

@ -1,4 +1,4 @@
From ca6e5670f428fcd927301216402c2e65715815b0 Mon Sep 17 00:00:00 2001
From 415f22549d10633d475506ae3a4d4e7ec6179f79 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Mon, 7 Mar 2016 12:51:01 -0700
Subject: [PATCH] Speedup BlockPos by fixing inlining
@ -21,7 +21,7 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index e54e7b7..f0908a2 100644
index fa95e8f..f0908a2 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -5,9 +5,11 @@ import com.google.common.base.Objects;
@ -62,15 +62,6 @@ index e54e7b7..f0908a2 100644
public BaseBlockPosition d(BaseBlockPosition baseblockposition) {
return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX());
@@ -87,7 +91,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
}
- public int compareTo(Object object) {
+ public int compareTo(BaseBlockPosition object) { // Paper - correct decompile error
return this.i((BaseBlockPosition) object);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index e7a95f3..2d56f02 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
@ -228,5 +219,5 @@ index e7a95f3..2d56f02 100644
public BlockPosition h() {
--
2.7.2
2.7.1.windows.2

View File

@ -1,11 +1,11 @@
From c754d5f8ddbf381e0ec90ed54852ea9dee491c52 Mon Sep 17 00:00:00 2001
From 9f5c81eeb1c9cef943c5e1a32e5661d7bdef40bd Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 21 Mar 2016 00:19:18 -0500
Subject: [PATCH] Support offline mode in whitelist command as well
diff --git a/src/main/java/net/minecraft/server/CommandWhitelist.java b/src/main/java/net/minecraft/server/CommandWhitelist.java
index b52bf74..2d08a36 100644
index fdc9210..49e9ce1 100644
--- a/src/main/java/net/minecraft/server/CommandWhitelist.java
+++ b/src/main/java/net/minecraft/server/CommandWhitelist.java
@@ -43,24 +43,35 @@ public class CommandWhitelist extends CommandAbstract {
@ -44,10 +44,10 @@ index b52bf74..2d08a36 100644
a(icommandlistener, (ICommand) this, "commands.whitelist.remove.success", new Object[] { astring[1]});
} else if (astring[0].equals("reload")) {
minecraftserver.getPlayerList().reloadWhitelist();
@@ -88,4 +99,48 @@ public class CommandWhitelist extends CommandAbstract {
return Collections.emptyList();
}
@@ -95,4 +106,41 @@ public class CommandWhitelist extends CommandAbstract {
return a((ICommand) o);
}
// Paper end
+
+ /**
+ * Paper - Adds or removes a player from the game whitelist
@ -85,14 +85,7 @@ index b52bf74..2d08a36 100644
+ }
+ }
+ }
+
+ // Paper start - Fix decompiler error
+ @Override
+ public int compareTo(ICommand o) {
+ return a((ICommand) o);
+ }
+ // Paper end
}
--
2.7.4.windows.1
2.7.1.windows.2