summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-10-16 10:06:34 +0200
committerGitHub <noreply@github.com>2019-10-16 10:06:34 +0200
commit221cc4ec5cb6301743e947eaabed3fecedba796f (patch)
tree4e44c8bb7523e5d1d04468fc906ae24674c10abc /src/BlockArea.h
parentFixed crash in hopper while pulling items from blockentity above itself (#4412) (diff)
downloadcuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.gz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.bz2
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.lz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.xz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.zst
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.zip
Diffstat (limited to 'src/BlockArea.h')
-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