diff options
author | Mattes D <github@xoft.cz> | 2019-10-16 10:06:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 10:06:34 +0200 |
commit | 221cc4ec5cb6301743e947eaabed3fecedba796f (patch) | |
tree | 4e44c8bb7523e5d1d04468fc906ae24674c10abc /src/BlockArea.h | |
parent | Fixed crash in hopper while pulling items from blockentity above itself (#4412) (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/BlockArea.h | 7 |
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 |