mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 03:17:36 +01:00
58 lines
1.5 KiB
Diff
58 lines
1.5 KiB
Diff
--- a/net/minecraft/server/InventoryCraftResult.java
|
|
+++ b/net/minecraft/server/InventoryCraftResult.java
|
|
@@ -2,12 +2,45 @@
|
|
|
|
import java.util.Iterator;
|
|
import javax.annotation.Nullable;
|
|
+// CraftBukkit start
|
|
+import org.bukkit.Location;
|
|
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
|
+import org.bukkit.entity.HumanEntity;
|
|
+// CraftBukkit end
|
|
|
|
public class InventoryCraftResult implements IInventory {
|
|
|
|
private final NonNullList<ItemStack> items;
|
|
private IRecipe b;
|
|
|
|
+ // CraftBukkit start
|
|
+ private int maxStack = MAX_STACK;
|
|
+
|
|
+ public java.util.List<ItemStack> getContents() {
|
|
+ return this.items;
|
|
+ }
|
|
+
|
|
+ public org.bukkit.inventory.InventoryHolder getOwner() {
|
|
+ return null; // Result slots don't get an owner
|
|
+ }
|
|
+
|
|
+ // Don't need a transaction; the InventoryCrafting keeps track of it for us
|
|
+ public void onOpen(CraftHumanEntity who) {}
|
|
+ public void onClose(CraftHumanEntity who) {}
|
|
+ public java.util.List<HumanEntity> getViewers() {
|
|
+ return new java.util.ArrayList<HumanEntity>();
|
|
+ }
|
|
+
|
|
+ public void setMaxStackSize(int size) {
|
|
+ maxStack = size;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Location getLocation() {
|
|
+ return null;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public InventoryCraftResult() {
|
|
this.items = NonNullList.a(1, ItemStack.a);
|
|
}
|
|
@@ -61,7 +94,7 @@
|
|
}
|
|
|
|
public int getMaxStackSize() {
|
|
- return 64;
|
|
+ return maxStack; // CraftBukkit
|
|
}
|
|
|
|
public void update() {}
|