mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 22:14:40 +01:00
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
|
--- a/net/minecraft/server/RecipeStonecutting.java
|
||
|
+++ b/net/minecraft/server/RecipeStonecutting.java
|
||
|
@@ -1,5 +1,13 @@
|
||
|
package net.minecraft.server;
|
||
|
|
||
|
+// CraftBukkit start
|
||
|
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||
|
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
||
|
+import org.bukkit.craftbukkit.inventory.CraftStonecuttingRecipe;
|
||
|
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||
|
+import org.bukkit.inventory.Recipe;
|
||
|
+// CraftBukkit end
|
||
|
+
|
||
|
public class RecipeStonecutting extends RecipeSingleItem {
|
||
|
|
||
|
public RecipeStonecutting(MinecraftKey minecraftkey, String s, RecipeItemStack recipeitemstack, ItemStack itemstack) {
|
||
|
@@ -10,4 +18,16 @@
|
||
|
public boolean a(IInventory iinventory, World world) {
|
||
|
return this.ingredient.test(iinventory.getItem(0));
|
||
|
}
|
||
|
+
|
||
|
+ // CraftBukkit start
|
||
|
+ @Override
|
||
|
+ public Recipe toBukkitRecipe() {
|
||
|
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
|
||
|
+
|
||
|
+ CraftStonecuttingRecipe recipe = new CraftStonecuttingRecipe(CraftNamespacedKey.fromMinecraft(this.key), result, CraftRecipe.toBukkit(this.ingredient));
|
||
|
+ recipe.setGroup(this.group);
|
||
|
+
|
||
|
+ return recipe;
|
||
|
+ }
|
||
|
+ // CraftBukkit end
|
||
|
}
|