Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 53 lines 1.0 kB view raw
1package net.minecraft.server; 2 3public class InventoryCraftResult implements IInventory { 4 5 private ItemStack[] items = new ItemStack[1]; 6 7 // CraftBukkit start 8 public ItemStack[] getContents() { 9 return this.items; 10 } 11 // CraftBukkit end 12 13 public InventoryCraftResult() { 14 } 15 16 public int getSize() { 17 return 1; 18 } 19 20 public ItemStack getItem(int i) { 21 return this.items[i]; 22 } 23 24 public String getName() { 25 return "Result"; 26 } 27 28 public ItemStack splitStack(int i, int j) { 29 if (this.items[i] != null) { 30 ItemStack itemstack = this.items[i]; 31 32 this.items[i] = null; 33 return itemstack; 34 } else { 35 return null; 36 } 37 } 38 39 public void setItem(int i, ItemStack itemstack) { 40 this.items[i] = itemstack; 41 } 42 43 public int getMaxStackSize() { 44 return 64; 45 } 46 47 public void update() { 48 } 49 50 public boolean a_(EntityHuman entityhuman) { 51 return true; 52 } 53}