From 512c342782c2bed639b59cbaaa6f689d30bca7b6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 20 Jun 2013 11:02:09 +0000 Subject: Implemented hopper output git-svn-id: http://mc-server.googlecode.com/svn/trunk@1611 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockEntities/HopperEntity.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'source/BlockEntities/HopperEntity.h') 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); } ; -- cgit v1.2.3