summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/BlockArea.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/BlockArea.h b/src/BlockArea.h
index 8f57c8e5e..b7bfded9a 100644
--- a/src/BlockArea.h
+++ b/src/BlockArea.h
@@ -24,6 +24,7 @@
// fwd:
class cCuboid;
+class cItems;
using cBlockEntityCallback = cFunctionRef<bool(cBlockEntity &)>;
@@ -421,6 +422,9 @@ public:
/** Direct read-only access to block entities. */
const cBlockEntities & GetBlockEntities(void) const { ASSERT(HasBlockEntities()); return *m_BlockEntities; }
+ /** Returns the pickups that would result if the block at the specified position was mined by a_Digger, using a_Tool. */
+ cItems PickupsFromBlock(Vector3i a_AbsPos, const cEntity * a_Digger = nullptr, const cItem * a_Tool = nullptr);
+
protected:
@@ -520,6 +524,9 @@ protected:
/** Removes from m_BlockEntities those BEs that no longer match the blocktype at their coords. */
void RemoveNonMatchingBlockEntities(void);
+ /** Returns the cBlockEntity at the specified coords, or nullptr if none. */
+ cBlockEntity * GetBlockEntityRel(Vector3i a_RelPos);
+
// tolua_begin
} ;
// tolua_end