diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch new file mode 100644 index 0000000000..0b933cd748 --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch @@ -0,0 +1,48 @@ +--- a/net/minecraft/world/item/crafting/StonecutterRecipe.java ++++ b/net/minecraft/world/item/crafting/StonecutterRecipe.java +@@ -5,21 +5,39 @@ + import net.minecraft.world.level.Level; + import net.minecraft.world.level.block.Blocks; + ++// CraftBukkit start ++import org.bukkit.NamespacedKey; ++import org.bukkit.craftbukkit.inventory.CraftItemStack; ++import org.bukkit.craftbukkit.inventory.CraftRecipe; ++import org.bukkit.craftbukkit.inventory.CraftStonecuttingRecipe; ++import org.bukkit.inventory.Recipe; ++// CraftBukkit end ++ + public class StonecutterRecipe extends SingleItemRecipe { + +- public StonecutterRecipe(String s, Ingredient ingredient, ItemStack itemstack) { +- super(RecipeType.STONECUTTING, RecipeSerializer.STONECUTTER, s, ingredient, itemstack); ++ public StonecutterRecipe(String s, Ingredient recipeitemstack, ItemStack itemstack) { ++ super(RecipeType.STONECUTTING, RecipeSerializer.STONECUTTER, s, recipeitemstack, itemstack); + } + + @Override +- @Override +- public boolean matches(Container container, Level level) { +- return this.ingredient.test(container.getItem(0)); ++ public boolean matches(Container inv, Level level) { ++ return this.ingredient.test(inv.getItem(0)); + } + + @Override +- @Override + public ItemStack getToastSymbol() { + return new ItemStack(Blocks.STONECUTTER); + } ++ ++ // CraftBukkit start ++ @Override ++ public Recipe toBukkitRecipe(NamespacedKey id) { ++ CraftItemStack result = CraftItemStack.asCraftMirror(this.result); ++ ++ CraftStonecuttingRecipe recipe = new CraftStonecuttingRecipe(id, result, CraftRecipe.toBukkit(this.ingredient)); ++ recipe.setGroup(this.group); ++ ++ return recipe; ++ } ++ // CraftBukkit end + } |