summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/Slot.java
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-01-09 18:27:46 +0100
committerErik Broes <erikbroes@grum.nl>2011-01-09 18:28:46 +0100
commite8a565e6cfd2bc326a1207e17165916f7a830497 (patch)
tree561bfaf2b3e83ed0c43b632816de64cf5f5415fb /src/main/java/net/minecraft/server/Slot.java
parentb72dad0a61d11c01c498a7e58b3e4a7389533488 (diff)
downloadcraftbukkit-e8a565e6cfd2bc326a1207e17165916f7a830497.tar
craftbukkit-e8a565e6cfd2bc326a1207e17165916f7a830497.tar.gz
craftbukkit-e8a565e6cfd2bc326a1207e17165916f7a830497.tar.lz
craftbukkit-e8a565e6cfd2bc326a1207e17165916f7a830497.tar.xz
craftbukkit-e8a565e6cfd2bc326a1207e17165916f7a830497.zip
Added getContents() to IInventory and implemented it.
Implemented Inventory and PlayerInventory and updated StorageMinecart and Slot. Added getMaxStackSize to CraftItemStack.
Diffstat (limited to 'src/main/java/net/minecraft/server/Slot.java')
-rw-r--r--src/main/java/net/minecraft/server/Slot.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/Slot.java b/src/main/java/net/minecraft/server/Slot.java
new file mode 100644
index 00000000..63234dd4
--- /dev/null
+++ b/src/main/java/net/minecraft/server/Slot.java
@@ -0,0 +1,51 @@
+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) {
+ b = iinventory;
+ a = i;
+ d = j;
+ e = k;
+ }
+
+ public void b() {
+ d();
+ }
+
+ public boolean a(ItemStack itemstack) {
+ return true;
+ }
+
+ public ItemStack c() {
+ return b.a(a);
+ }
+
+ public void b(ItemStack itemstack) {
+ b.a(a, itemstack);
+ d();
+ }
+
+ public void d() {
+ b.d();
+ }
+
+ public int a() {
+ return b.c();
+ }
+
+ public ItemStack a(int i) {
+ return b.a(a, i);
+ }
+
+ public boolean a(IInventory iinventory, int i) {
+ return iinventory == b && i == a;
+ }
+}