Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 54 lines 1.2 kB view raw
1package net.minecraft.server; 2 3public class Slot { 4 5 public final int index; // CraftBukkit - private -> public 6 public final IInventory inventory; // CraftBukkit - private -> public 7 public int a; 8 public int b; 9 public int c; 10 11 public Slot(IInventory iinventory, int i, int j, int k) { 12 this.inventory = iinventory; 13 this.index = i; 14 this.b = j; 15 this.c = k; 16 } 17 18 public void a(ItemStack itemstack) { 19 this.c(); 20 } 21 22 public boolean isAllowed(ItemStack itemstack) { 23 return true; 24 } 25 26 public ItemStack getItem() { 27 return this.inventory.getItem(this.index); 28 } 29 30 public boolean b() { 31 return this.getItem() != null; 32 } 33 34 public void c(ItemStack itemstack) { 35 this.inventory.setItem(this.index, itemstack); 36 this.c(); 37 } 38 39 public void c() { 40 this.inventory.update(); 41 } 42 43 public int d() { 44 return this.inventory.getMaxStackSize(); 45 } 46 47 public ItemStack a(int i) { 48 return this.inventory.splitStack(this.index, i); 49 } 50 51 public boolean a(IInventory iinventory, int i) { 52 return iinventory == this.inventory && i == this.index; 53 } 54}