2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/item/crafting/ShapelessRecipes.java
|
|
|
|
+++ b/net/minecraft/world/item/crafting/ShapelessRecipes.java
|
|
|
|
@@ -14,6 +14,12 @@
|
|
|
|
import net.minecraft.world.item.ItemStack;
|
|
|
|
import net.minecraft.world.level.World;
|
2021-03-08 22:47:33 +01:00
|
|
|
|
2014-11-25 22:32:16 +01:00
|
|
|
+// CraftBukkit start
|
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
2019-01-02 05:56:21 +01:00
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
2014-11-25 22:32:16 +01:00
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftShapelessRecipe;
|
|
|
|
+// CraftBukkit end
|
2021-03-08 22:47:33 +01:00
|
|
|
+
|
2019-04-23 04:00:00 +02:00
|
|
|
public class ShapelessRecipes implements RecipeCrafting {
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
private final MinecraftKey id;
|
2021-03-15 23:00:00 +01:00
|
|
|
@@ -28,6 +34,20 @@
|
2017-05-14 04:00:00 +02:00
|
|
|
this.ingredients = nonnulllist;
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
2015-02-26 23:41:06 +01:00
|
|
|
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
+ public org.bukkit.inventory.ShapelessRecipe toBukkitRecipe() {
|
|
|
|
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
|
|
|
|
+ CraftShapelessRecipe recipe = new CraftShapelessRecipe(result, this);
|
2018-08-26 04:00:00 +02:00
|
|
|
+ recipe.setGroup(this.group);
|
2018-08-17 12:40:54 +02:00
|
|
|
+
|
2017-05-14 04:00:00 +02:00
|
|
|
+ for (RecipeItemStack list : this.ingredients) {
|
2019-01-02 05:56:21 +01:00
|
|
|
+ recipe.addIngredient(CraftRecipe.toBukkit(list));
|
2014-11-25 22:32:16 +01:00
|
|
|
+ }
|
|
|
|
+ return recipe;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2015-02-26 23:41:06 +01:00
|
|
|
+
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2018-07-15 02:00:00 +02:00
|
|
|
public MinecraftKey getKey() {
|
2021-06-11 07:00:00 +02:00
|
|
|
return this.id;
|