summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/HopperEntity.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-29 14:59:24 +0200
committerGitHub <noreply@github.com>2019-09-29 14:59:24 +0200
commit365cbc6e1cea96741e26c9ce912b003f8fd2c62c (patch)
treef23682c47928597791c53f3a300b03494ffde417 /src/BlockEntities/HopperEntity.h
parentCactus can now grow and will be dropped if there is no place to grow. (diff)
downloadcuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.gz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.bz2
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.lz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.xz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.zst
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.zip
Diffstat (limited to 'src/BlockEntities/HopperEntity.h')
-rw-r--r--src/BlockEntities/HopperEntity.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/BlockEntities/HopperEntity.h b/src/BlockEntities/HopperEntity.h
index e11b2cc4d..c57dce672 100644
--- a/src/BlockEntities/HopperEntity.h
+++ b/src/BlockEntities/HopperEntity.h
@@ -19,7 +19,11 @@
class cHopperEntity :
public cBlockEntityWithItems
{
- typedef cBlockEntityWithItems Super;
+ // tolua_end
+
+ using super = cBlockEntityWithItems;
+
+ // tolua_begin
public:
enum
@@ -34,12 +38,12 @@ public:
BLOCKENTITY_PROTODEF(cHopperEntity)
/** Constructor used for normal operation */
- cHopperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
+ cHopperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
/** Returns the block coords of the block receiving the output items, based on the meta
- Returns false if unattached.
+ Returns <false, undefined> if unattached.
Exported in ManualBindings.cpp. */
- bool GetOutputBlockPos(NIBBLETYPE a_BlockMeta, int & a_OutputX, int & a_OutputY, int & a_OutputZ);
+ std::pair<bool, Vector3i> GetOutputBlockPos(NIBBLETYPE a_BlockMeta);
protected:
@@ -76,11 +80,11 @@ protected:
/** Moves one piece from the specified itemstack into this hopper. Returns true if contents have changed. Doesn't change the itemstack. */
bool MoveItemsFromSlot(cBlockEntityWithItems & a_Entity, int a_SrcSlotNum);
- /** 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 chest at the specified absolute coords. Returns true if contents have changed */
+ bool MoveItemsToChest(cChunk & a_Chunk, Vector3i a_Coords);
- /** 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 furnace at the specified absolute coords. Returns true if contents have changed */
+ bool MoveItemsToFurnace(cChunk & a_Chunk, Vector3i a_Coords, NIBBLETYPE a_HopperMeta);
/** Moves items to the specified ItemGrid. Returns true if contents have changed */
bool MoveItemsToGrid(cBlockEntityWithItems & a_Entity);