-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
patches/api/0482-Move-CraftComplexRecipe-to-extend-CraftingRecipe.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Bjarne Koll <lynxplay101@gmail.com> | ||
Date: Fri, 19 Jul 2024 19:09:21 +0200 | ||
Subject: [PATCH] Move CraftComplexRecipe to extend CraftingRecipe | ||
|
||
A craft complex recipe wraps a CustomRecipe, which itself is a | ||
CraftingRecipe. | ||
As such, this complex recipe should also be a crafting recipe. | ||
|
||
diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java | ||
index 37024b4736dd3897490ca51d08cf07901b01d59f..afa3de9ab78d01c448d450d8afbc7b1e7e62754c 100644 | ||
--- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java | ||
+++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java | ||
@@ -11,8 +11,11 @@ import org.jetbrains.annotations.NotNull; | ||
* Represents a shaped or shapeless crafting recipe. | ||
*/ | ||
public abstract class CraftingRecipe implements Recipe, Keyed { | ||
- private final NamespacedKey key; | ||
- private final ItemStack output; | ||
+ // Paper - make CraftComplexRecipe extend CraftingRecipe - start | ||
+ protected NamespacedKey key; | ||
+ protected ItemStack output; | ||
+ protected CraftingRecipe() {} | ||
+ // Paper - make CraftComplexRecipe extend CraftingRecipe - end | ||
private String group = ""; | ||
private CraftingBookCategory category = CraftingBookCategory.MISC; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters