mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
#744: Add ability to get location from smithing inventory
This commit is contained in:
parent
39806409e7
commit
13fc33f732
@ -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 New Issue
Block a user