diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch new file mode 100644 index 0000000000..76f0416155 --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ResultContainer.java.patch @@ -0,0 +1,54 @@ +--- a/net/minecraft/world/inventory/ResultContainer.java ++++ b/net/minecraft/world/inventory/ResultContainer.java +@@ -9,12 +9,51 @@ + 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; + @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); + } |