2015-05-25 20:37:24 +10:00
|
|
|
--- a/net/minecraft/server/InventoryCraftResult.java
|
|
|
|
+++ b/net/minecraft/server/InventoryCraftResult.java
|
2019-04-23 12:00:00 +10:00
|
|
|
@@ -2,12 +2,50 @@
|
2014-11-26 08:32:16 +11:00
|
|
|
|
2016-11-17 12:41:03 +11:00
|
|
|
import java.util.Iterator;
|
2017-05-14 12:00:00 +10:00
|
|
|
import javax.annotation.Nullable;
|
2014-11-26 08:32:16 +11:00
|
|
|
+// CraftBukkit start
|
2016-03-01 08:32:46 +11:00
|
|
|
+import org.bukkit.Location;
|
2014-11-26 08:32:16 +11:00
|
|
|
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
|
|
|
+import org.bukkit.entity.HumanEntity;
|
|
|
|
+// CraftBukkit end
|
2016-05-10 21:47:39 +10:00
|
|
|
|
2018-07-15 10:00:00 +10:00
|
|
|
public class InventoryCraftResult implements IInventory, RecipeHolder {
|
2014-11-26 08:32:16 +11:00
|
|
|
|
2016-11-17 12:41:03 +11:00
|
|
|
private final NonNullList<ItemStack> items;
|
2019-04-23 12:00:00 +10:00
|
|
|
private IRecipe<?> b;
|
2015-02-26 22:41:06 +00:00
|
|
|
|
2014-11-26 08:32:16 +11:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ private int maxStack = MAX_STACK;
|
|
|
|
+
|
2016-11-17 12:41:03 +11:00
|
|
|
+ public java.util.List<ItemStack> getContents() {
|
2014-11-26 08:32:16 +11:00
|
|
|
+ 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>();
|
|
|
|
+ }
|
|
|
|
+
|
2019-04-23 12:00:00 +10:00
|
|
|
+ @Override
|
|
|
|
+ public int getMaxStackSize() {
|
|
|
|
+ return maxStack;
|
|
|
|
+ }
|
|
|
|
+
|
2014-11-26 08:32:16 +11:00
|
|
|
+ public void setMaxStackSize(int size) {
|
|
|
|
+ maxStack = size;
|
|
|
|
+ }
|
2016-03-01 08:32:46 +11:00
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Location getLocation() {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
2015-02-26 22:41:06 +00:00
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
2016-11-17 12:41:03 +11:00
|
|
|
public InventoryCraftResult() {
|
2020-06-25 10:00:00 +10:00
|
|
|
this.items = NonNullList.a(1, ItemStack.b);
|
2016-11-17 12:41:03 +11:00
|
|
|
}
|