diff --git a/nms-patches/ContainerSmithing.patch b/nms-patches/ContainerSmithing.patch index 168390f113..d9dd6db03f 100644 --- a/nms-patches/ContainerSmithing.patch +++ b/nms-patches/ContainerSmithing.patch @@ -47,7 +47,7 @@ + } + + org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventorySmithing( -+ this.repairInventory, this.resultInventory); ++ containerAccess.getLocation(), this.repairInventory, this.resultInventory); + bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this); + return bukkitEntity; + } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java index 66193df7e0..d577c1754c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java @@ -1,11 +1,20 @@ package org.bukkit.craftbukkit.inventory; import net.minecraft.server.IInventory; +import org.bukkit.Location; import org.bukkit.inventory.SmithingInventory; public class CraftInventorySmithing extends CraftResultInventory implements SmithingInventory { - public CraftInventorySmithing(IInventory inventory, IInventory resultInventory) { + private final Location location; + + public CraftInventorySmithing(Location location, IInventory inventory, IInventory resultInventory) { super(inventory, resultInventory); + this.location = location; + } + + @Override + public Location getLocation() { + return location; } }