Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/InventoryCraftResult.patch

50 Zeilen
1.4 KiB
Diff

2015-02-26 23:41:06 +01:00
--- /home/matt/mc-dev-private//net/minecraft/server/InventoryCraftResult.java 2015-02-26 22:40:22.767608137 +0000
+++ src/main/java/net/minecraft/server/InventoryCraftResult.java 2015-02-26 22:40:22.767608137 +0000
@@ -1,9 +1,37 @@
package net.minecraft.server;
+// CraftBukkit start
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.entity.HumanEntity;
+// CraftBukkit end
+
public class InventoryCraftResult implements IInventory {
private ItemStack[] items = new ItemStack[1];
2015-02-26 23:41:06 +01:00
+ // CraftBukkit start
+ private int maxStack = MAX_STACK;
+
+ public 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;
+ }
2015-02-26 23:41:06 +01:00
+ // CraftBukkit end
+
public InventoryCraftResult() {}
2015-02-26 23:41:06 +01:00
public int getSize() {
@@ -53,7 +81,7 @@
}
public int getMaxStackSize() {
- return 64;
+ return maxStack; // CraftBukkit
}
public void update() {}