mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
101 lines
4.9 KiB
Diff
101 lines
4.9 KiB
Diff
From 6c59912ddf9adcda60b7bd1f59ac2624b4674946 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);
|
|
}
|
|
|
|
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
|
|
index f5bcbdb..3190cad 100644
|
|
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
|
|
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
|
|
@@ -20,7 +20,7 @@ public class ItemFactoryTest extends AbstractTestingBase {
|
|
|
|
@Test
|
|
public void testKnownAttributes() throws Throwable {
|
|
- final ZipInputStream nmsZipStream = new ZipInputStream(CommandAbstract.class/* Magic class that isn't imported! */.getProtectionDomain().getCodeSource().getLocation().openStream());
|
|
+ final ZipInputStream nmsZipStream = new ZipInputStream(net.minecraft.server.HttpUtilities.class/* Magic class that isn't imported! */.getProtectionDomain().getCodeSource().getLocation().openStream()); // Paper
|
|
final Collection<String> names = new HashSet<String>();
|
|
for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) {
|
|
final String entryName = clazzEntry.getName();
|
|
--
|
|
2.8.0
|
|
|