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:
Ursprung
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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren