testserver/Spigot-Server-Patches/0003-MC-Dev-fixes.patch

89 lines
3.9 KiB
Diff

From 9588a00f0ac51c242d71abc1d9b9c43f905d5f14 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index e54e7b7..47c9f69 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -87,7 +87,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 - decompile fix
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
index be4b871..5ca8125 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 - decompile fix
}
public static BiomeBase a(int i) {
diff --git a/src/main/java/net/minecraft/server/BlockStateList.java b/src/main/java/net/minecraft/server/BlockStateList.java
index 8df8b04..19ea22f 100644
--- a/src/main/java/net/minecraft/server/BlockStateList.java
+++ b/src/main/java/net/minecraft/server/BlockStateList.java
@@ -83,7 +83,7 @@ public class BlockStateList {
if (!BlockStateList.a.matcher(s).matches()) {
throw new IllegalArgumentException("Block: " + block.getClass() + " has invalidly named property: " + s);
} else {
- Iterator iterator = iblockstate.c().iterator();
+ Iterator<T> iterator = iblockstate.c().iterator(); // Paper - decompile fix
String s1;
@@ -92,7 +92,7 @@ public class BlockStateList {
return s;
}
- Comparable comparable = (Comparable) iterator.next();
+ T comparable = iterator.next(); // Paper - decompile fix
s1 = iblockstate.a(comparable);
} while (BlockStateList.a.matcher(s1).matches());
@@ -154,7 +154,7 @@ public class BlockStateList {
if (!this.b.containsKey(iblockstate)) {
throw new IllegalArgumentException("Cannot get property " + iblockstate + " as it does not exist in " + this.a.t());
} else {
- return (Comparable) iblockstate.b().cast(this.b.get(iblockstate));
+ return iblockstate.b().cast(this.b.get(iblockstate)); // Paper - decompile fix
}
}
diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java
index 156922a..f2feee5 100644
--- a/src/main/java/net/minecraft/server/CommandAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandAbstract.java
@@ -212,7 +212,7 @@ public abstract class CommandAbstract implements ICommand {
}
if (object != null && oclass.isAssignableFrom(object.getClass())) {
- return (Entity) object;
+ return (T) object; // Paper - fix decompile error
} else {
throw new ExceptionEntityNotFound();
}
@@ -551,7 +551,7 @@ public abstract class CommandAbstract implements ICommand {
return this.getCommand().compareTo(icommand.getCommand());
}
- public int compareTo(Object object) {
+ public int compareTo(ICommand object) { // Paper - fix decompile error
return this.a((ICommand) object);
}
--
2.8.0