2011-01-14 20:44:11 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
|
|
|
public class Slot {
|
|
|
|
|
|
|
|
public final int a; // CraftBukkit: private -> public
|
|
|
|
public final IInventory b; // CraftBukkit: private -> public
|
|
|
|
public int c;
|
|
|
|
public int d;
|
|
|
|
public int e;
|
|
|
|
|
|
|
|
public Slot(IInventory iinventory, int i, int j, int k) {
|
2011-01-29 22:50:29 +01:00
|
|
|
this.b = iinventory;
|
|
|
|
this.a = i;
|
|
|
|
this.d = j;
|
|
|
|
this.e = k;
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void b() {
|
2011-01-29 22:50:29 +01:00
|
|
|
this.d();
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean a(ItemStack itemstack) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack c() {
|
2011-01-29 22:50:29 +01:00
|
|
|
return this.b.a(this.a);
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void b(ItemStack itemstack) {
|
2011-01-29 22:50:29 +01:00
|
|
|
this.b.a(this.a, itemstack);
|
|
|
|
this.d();
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void d() {
|
2011-01-29 22:50:29 +01:00
|
|
|
this.b.d();
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public int a() {
|
2011-01-29 22:50:29 +01:00
|
|
|
return this.b.c();
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack a(int i) {
|
2011-01-29 22:50:29 +01:00
|
|
|
return this.b.b(this.a, i);
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean a(IInventory iinventory, int i) {
|
2011-01-29 22:50:29 +01:00
|
|
|
return iinventory == this.b && i == this.a;
|
2011-01-14 20:44:11 +01:00
|
|
|
}
|
|
|
|
}
|