aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch
new file mode 100644
index 0000000000..1a0059accf
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch
@@ -0,0 +1,58 @@
+--- a/net/minecraft/world/inventory/ResultContainer.java
++++ b/net/minecraft/world/inventory/ResultContainer.java
+@@ -8,12 +9,55 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.crafting.RecipeHolder;
+
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.entity.HumanEntity;
++// CraftBukkit end
++
+ public class ResultContainer implements Container, RecipeCraftingHolder {
+ private final NonNullList<ItemStack> itemStacks = NonNullList.withSize(1, ItemStack.EMPTY);
+ @Nullable
+ private RecipeHolder<?> recipeUsed;
+
++ // CraftBukkit start
++ private int maxStack = MAX_STACK;
++
++ public java.util.List<ItemStack> getContents() {
++ return this.itemStacks;
++ }
++
++ 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>();
++ }
++
+ @Override
++ public int getMaxStackSize() {
++ return maxStack;
++ }
++
++ public void setMaxStackSize(int size) {
++ maxStack = size;
++ }
++
++ @Override
++ public Location getLocation() {
++ return null;
++ }
++ // CraftBukkit end
++
++ public ResultContainer() {
++ this.itemStacks = NonNullList.withSize(1, ItemStack.EMPTY);
++ }
++
++ @Override
+ public int getContainerSize() {
+ return 1;
+ }