#744: Add ability to get location from smithing inventory

This commit is contained in:
Phoenix616 2020-09-03 08:18:30 +10:00 committed by md_5
parent 39806409e7
commit 13fc33f732
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
2 changed files with 11 additions and 2 deletions

View File

@ -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;
+ }

View File

@ -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;
}
}