summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortoastedtruth <brammero@gmail.com>2013-12-01 23:19:14 +0000
committerNate Mortensen <nate.richard.mortensen@gmail.com>2013-12-02 21:03:56 -0700
commit803268867ebdabf9d1ed69c0a487899821a3cefc (patch)
tree430b69837ca65cfce271a0ce18b9705144c60cff
parent579b203347caee0cfc981ec885bc5a07d6188efc (diff)
downloadcraftbukkit-803268867ebdabf9d1ed69c0a487899821a3cefc.tar
craftbukkit-803268867ebdabf9d1ed69c0a487899821a3cefc.tar.gz
craftbukkit-803268867ebdabf9d1ed69c0a487899821a3cefc.tar.lz
craftbukkit-803268867ebdabf9d1ed69c0a487899821a3cefc.tar.xz
craftbukkit-803268867ebdabf9d1ed69c0a487899821a3cefc.zip
Fix written books crashing the server. Fixes BUKKIT-4945
CraftBukkit modifies the IRecipe interface, adding new methods, so all classes that implement IRecipe need to be imported and modified to add the new methods. Extending ShapelessRecipes implements the added methods and allows RecipeBookClone to work with the Recipes API in a way that is consistent with similar recipes, even if the recipe information present in the API isn't technically correct.
-rw-r--r--src/main/java/net/minecraft/server/RecipeBookClone.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/RecipeBookClone.java b/src/main/java/net/minecraft/server/RecipeBookClone.java
index 473ed4e6..8182a5fd 100644
--- a/src/main/java/net/minecraft/server/RecipeBookClone.java
+++ b/src/main/java/net/minecraft/server/RecipeBookClone.java
@@ -1,6 +1,12 @@
package net.minecraft.server;
-public class RecipeBookClone implements IRecipe {
+public class RecipeBookClone extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
+
+ // CraftBukkit start - Delegate to new parent class
+ public RecipeBookClone() {
+ super(new ItemStack(Items.WRITTEN_BOOK, 0, -1), java.util.Arrays.asList(new ItemStack(Items.BOOK_AND_QUILL, 0, 0)));
+ }
+ // CraftBukkit end
public boolean a(InventoryCrafting inventoryCrafting, World paramWorld) {
int i = 0;