summaryrefslogtreecommitdiffstats
path: root/source/BlockEntities/HopperEntity.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-20 13:02:09 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-20 13:02:09 +0200
commit512c342782c2bed639b59cbaaa6f689d30bca7b6 (patch)
treee9b2080dc734a5a4bd0102bb5d5c9dfc8b49f6c9 /source/BlockEntities/HopperEntity.h
parentFixed a crash when placing new furnaces (diff)
downloadcuberite-512c342782c2bed639b59cbaaa6f689d30bca7b6.tar
cuberite-512c342782c2bed639b59cbaaa6f689d30bca7b6.tar.gz
cuberite-512c342782c2bed639b59cbaaa6f689d30bca7b6.tar.bz2
cuberite-512c342782c2bed639b59cbaaa6f689d30bca7b6.tar.lz
cuberite-512c342782c2bed639b59cbaaa6f689d30bca7b6.tar.xz
cuberite-512c342782c2bed639b59cbaaa6f689d30bca7b6.tar.zst
cuberite-512c342782c2bed639b59cbaaa6f689d30bca7b6.zip
Diffstat (limited to '')
-rw-r--r--source/BlockEntities/HopperEntity.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/source/BlockEntities/HopperEntity.h b/source/BlockEntities/HopperEntity.h
index 73c2a536c..7f5eb23d1 100644
--- a/source/BlockEntities/HopperEntity.h
+++ b/source/BlockEntities/HopperEntity.h
@@ -38,6 +38,15 @@ public:
/// Constructor used for normal operation
cHopperEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
+ // tolua_begin
+
+ /** Returns the block coords of the block receiving the output items, based on the meta
+ Returns false if unattached
+ */
+ bool GetOutputBlockPos(NIBBLETYPE a_BlockMeta, int & a_OutputX, int & a_OutputY, int & a_OutputZ);
+
+ // tolua_end
+
static const char * GetClassStatic(void) { return "cHopperEntity"; }
protected:
@@ -72,8 +81,20 @@ protected:
/// Moves items from the specified ItemGrid into this hopper. Returns true if contents have changed.
bool MoveItemsFromGrid(cItemGrid & a_Grid);
- /// Moves one of the specified itemstack into this hopper. Returns true if contents have changed. Doesn't change the itemstack.
+ /// Moves one piece from the specified itemstack into this hopper. Returns true if contents have changed. Doesn't change the itemstack.
bool MoveItemsFromSlot(const cItem & a_ItemStack, bool a_AllowNewStacks);
+
+ /// Moves items to the chest at the specified coords. Returns true if contents have changed
+ bool MoveItemsToChest(cChunk & a_Chunk, int a_BlockX, int a_BlockY, int a_BlockZ);
+
+ /// Moves items to the furnace at the specified coords. Returns true if contents have changed
+ bool MoveItemsToFurnace(cChunk & a_Chunk, int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_HopperMeta);
+
+ /// Moves items to the specified ItemGrid. Returns true if contents have changed
+ bool MoveItemsToGrid(cItemGrid & a_ItemGrid);
+
+ /// Moves one piece to the specified ItemGrid's slot. Returns true if contents have changed.
+ bool MoveItemsToSlot(cItemGrid & a_ItemGrid, int a_DestSlotNum);
} ;