summaryrefslogtreecommitdiffstats
path: root/source/ItemGrid.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-25 13:59:13 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-25 13:59:13 +0200
commitc640e9346c5e6c72b62b1beeaf5ec6de9cdc6924 (patch)
tree567565c41bab4e0fbab4eee5e3d2e647a896772c /source/ItemGrid.h
parentFixed the cWorld:DoWithChestAt(), DoWithDispenserAt() and DoWithFurnaceAt() callbacks binding. (diff)
downloadcuberite-c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924.tar
cuberite-c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924.tar.gz
cuberite-c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924.tar.bz2
cuberite-c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924.tar.lz
cuberite-c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924.tar.xz
cuberite-c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924.tar.zst
cuberite-c640e9346c5e6c72b62b1beeaf5ec6de9cdc6924.zip
Diffstat (limited to '')
-rw-r--r--source/ItemGrid.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/ItemGrid.h b/source/ItemGrid.h
index de8be059a..22d64f076 100644
--- a/source/ItemGrid.h
+++ b/source/ItemGrid.h
@@ -107,12 +107,21 @@ public:
/// Returns the index of the first empty slot; -1 if all full
int GetFirstEmptySlot(void) const;
+ /// Returns the index of the first non-empty slot; -1 if all empty
+ int GetFirstUsedSlot(void) const;
+
/// Returns the index of the last empty slot; -1 if all full
int GetLastEmptySlot(void) const;
+ /// Returns the index of the last used slot; -1 if all empty
+ int GetLastUsedSlot(void) const;
+
/// Returns the index of the first empty slot following a_StartFrom (a_StartFrom is not checked)
int GetNextEmptySlot(int a_StartFrom) const;
+ /// Returns the index of the first used slot following a_StartFrom (a_StartFrom is not checked)
+ int GetNextUsedSlot(int a_StartFrom) const;
+
/// Copies the contents into a cItems object; preserves the original a_Items contents
void CopyToItems(cItems & a_Items) const;