mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 23:57:43 +01:00
#744: Add ability to get location from smithing inventory
This commit is contained in:
parent
39806409e7
commit
13fc33f732
2 changed files with 11 additions and 2 deletions
|
@ -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;
|
||||
+ }
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue