--- a/net/minecraft/world/inventory/SmithingMenu.java
+++ b/net/minecraft/world/inventory/SmithingMenu.java
@@ -10,12 +10,17 @@
 import net.minecraft.world.level.Level;
 import net.minecraft.world.level.block.Blocks;
 import net.minecraft.world.level.block.state.BlockState;
+import org.bukkit.craftbukkit.v1_19_R2.inventory.CraftInventoryView; // CraftBukkit
 
 public class SmithingMenu extends ItemCombinerMenu {
+
     private final Level level;
     @Nullable
     private UpgradeRecipe selectedRecipe;
     private final List<UpgradeRecipe> recipes;
+    // CraftBukkit start
+    private CraftInventoryView bukkitEntity;
+    // CraftBukkit end
 
     public SmithingMenu(int syncId, Inventory playerInventory) {
         this(syncId, playerInventory, ContainerLevelAccess.NULL);
@@ -43,38 +48,44 @@
         this.resultSlots.awardUsedRecipes(player);
         this.shrinkStackInSlot(0);
         this.shrinkStackInSlot(1);
-        this.access.execute((world, pos) -> {
-            world.levelEvent(1044, pos, 0);
+        this.access.execute((world, blockposition) -> {
+            world.levelEvent(1044, blockposition, 0);
         });
     }
 
     private void shrinkStackInSlot(int slot) {
-        ItemStack itemStack = this.inputSlots.getItem(slot);
-        itemStack.shrink(1);
-        this.inputSlots.setItem(slot, itemStack);
+        ItemStack itemstack = this.inputSlots.getItem(slot);
+
+        itemstack.shrink(1);
+        this.inputSlots.setItem(slot, itemstack);
     }
 
     @Override
     public void createResult() {
         List<UpgradeRecipe> list = this.level.getRecipeManager().getRecipesFor(RecipeType.SMITHING, this.inputSlots, this.level);
+
         if (list.isEmpty()) {
-            this.resultSlots.setItem(0, ItemStack.EMPTY);
+            org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callPrepareSmithingEvent(this.getBukkitView(), ItemStack.EMPTY); // CraftBukkit
         } else {
-            UpgradeRecipe upgradeRecipe = list.get(0);
-            ItemStack itemStack = upgradeRecipe.assemble(this.inputSlots);
-            if (itemStack.isItemEnabled(this.level.enabledFeatures())) {
-                this.selectedRecipe = upgradeRecipe;
-                this.resultSlots.setRecipeUsed(upgradeRecipe);
-                this.resultSlots.setItem(0, itemStack);
+            UpgradeRecipe recipesmithing = (UpgradeRecipe) list.get(0);
+            ItemStack itemstack = recipesmithing.assemble(this.inputSlots);
+
+            if (itemstack.isItemEnabled(this.level.enabledFeatures())) {
+                this.selectedRecipe = recipesmithing;
+                this.resultSlots.setRecipeUsed(recipesmithing);
+                // CraftBukkit start
+                org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callPrepareSmithingEvent(this.getBukkitView(), itemstack);
+                // CraftBukkit end
             }
         }
 
+        org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callPrepareResultEvent(this, RESULT_SLOT); // Paper
     }
 
     @Override
     protected boolean shouldQuickMoveToAdditionalSlot(ItemStack stack) {
-        return this.recipes.stream().anyMatch((recipe) -> {
-            return recipe.isAdditionIngredient(stack);
+        return this.recipes.stream().anyMatch((recipesmithing) -> {
+            return recipesmithing.isAdditionIngredient(stack);
         });
     }
 
@@ -82,4 +93,18 @@
     public boolean canTakeItemForPickAll(ItemStack stack, Slot slot) {
         return slot.container != this.resultSlots && super.canTakeItemForPickAll(stack, slot);
     }
+
+    // CraftBukkit start
+    @Override
+    public CraftInventoryView getBukkitView() {
+        if (this.bukkitEntity != null) {
+            return this.bukkitEntity;
+        }
+
+        org.bukkit.craftbukkit.v1_19_R2.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.v1_19_R2.inventory.CraftInventorySmithing(
+                access.getLocation(), this.inputSlots, this.resultSlots);
+        this.bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
+        return this.bukkitEntity;
+    }
+    // CraftBukkit end
 }
