mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
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.
This commit is contained in:
parent
579b203347
commit
803268867e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user