3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +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.
Dieser Commit ist enthalten in:
toastedtruth 2013-12-01 23:19:14 +00:00 committet von Nate Mortensen
Ursprung 579b203347
Commit 803268867e

Datei anzeigen

@ -1,6 +1,12 @@
package net.minecraft.server; 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) { public boolean a(InventoryCrafting inventoryCrafting, World paramWorld) {
int i = 0; int i = 0;