13
0
geforkt von Mirrors/Paper

Include anvil result in inventory size. Fixes BUKKIT-3741

By: Travis Watkins <amaranth@ubuntu.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2013-03-30 02:51:26 -05:00
Ursprung 504a6af6e8
Commit cd79fecc90

Datei anzeigen

@ -4,7 +4,23 @@ import net.minecraft.server.IInventory;
import org.bukkit.inventory.AnvilInventory;
public class CraftInventoryAnvil extends CraftInventory implements AnvilInventory {
public CraftInventoryAnvil(IInventory anvil) {
super(anvil);
private final IInventory resultInventory;
public CraftInventoryAnvil(IInventory inventory, IInventory resultInventory) {
super(inventory);
this.resultInventory = resultInventory;
}
public IInventory getResultInventory() {
return resultInventory;
}
public IInventory getIngredientsInventory() {
return inventory;
}
@Override
public int getSize() {
return getResultInventory().getSize() + getIngredientsInventory().getSize();
}
}