mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 11:25:55 +03:00
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/inventory/InventoryCraftResult.java
|
|
+++ ../src-work/minecraft/net/minecraft/inventory/InventoryCraftResult.java
|
|
@@ -7,8 +7,43 @@
|
|
import net.minecraft.util.text.TextComponentString;
|
|
import net.minecraft.util.text.TextComponentTranslation;
|
|
|
|
+import org.bukkit.Location;
|
|
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
|
+import org.bukkit.entity.HumanEntity;
|
|
+
|
|
+//CraftBukkit start
|
|
+
|
|
+// CraftBukkit end
|
|
+
|
|
public class InventoryCraftResult implements IInventory
|
|
{
|
|
+ // CraftBukkit start
|
|
+ private int maxStack = MAX_STACK;
|
|
+
|
|
+ public ItemStack[] getContents() {
|
|
+ return this.stackResult;
|
|
+ }
|
|
+
|
|
+ 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
|
|
private final ItemStack[] stackResult = new ItemStack[1];
|
|
|
|
public int getSizeInventory()
|