mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
99 lines
No EOL
5.2 KiB
Diff
99 lines
No EOL
5.2 KiB
Diff
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
|
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/BiomeBase.java
|
|
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
|
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockStateList.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockStateList.java
|
|
@@ -0,0 +0,0 @@ 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;
|
|
|
|
@@ -0,0 +0,0 @@ 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());
|
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/CommandAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/CommandAbstract.java
|
|
@@ -0,0 +0,0 @@ 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();
|
|
}
|
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
|
|
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
|
|
@@ -0,0 +0,0 @@ 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();
|
|
--
|