From ea386eaab12206e585e01720808dc37585569535 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Fri, 27 Mar 2020 13:03:28 +0100 Subject: Lock hopper when powered by redstone (#4347) * Lock hopper when powered by redstone * Add to manual bindings * Add hopper API documentation Co-authored-by: Mat --- src/ChunkMap.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ChunkMap.h') diff --git a/src/ChunkMap.h b/src/ChunkMap.h index 3623400c8..5c0aa7688 100644 --- a/src/ChunkMap.h +++ b/src/ChunkMap.h @@ -29,6 +29,7 @@ class cDispenserEntity; class cDropperEntity; class cDropSpenserEntity; class cFurnaceEntity; +class cHopperEntity; class cNoteEntity; class cCommandBlockEntity; class cMobHeadEntity; @@ -53,6 +54,7 @@ using cDispenserCallback = cFunctionRef; using cDropperCallback = cFunctionRef; using cDropSpenserCallback = cFunctionRef; using cFurnaceCallback = cFunctionRef; +using cHopperCallback = cFunctionRef; using cNoteBlockCallback = cFunctionRef; using cCommandBlockCallback = cFunctionRef; using cMobHeadCallback = cFunctionRef; @@ -302,6 +304,10 @@ public: Returns false if there's no furnace at those coords or callback returns true, returns true if found. */ bool DoWithFurnaceAt(int a_BlockX, int a_BlockY, int a_BlockZ, cFurnaceCallback a_Callback); // Lua-accessible + /** Calls the callback for the hopper at the specified coords. + Returns false if there's no hopper at those coords or callback returns true, returns true if found. */ + bool DoWithHopperAt(int a_BlockX, int a_BlockY, int a_BlockZ, cHopperCallback a_Callback); // Lua-accessible + /** Calls the callback for the noteblock at the specified coords. Returns false if there's no noteblock at those coords or callback returns true, returns true if found. */ bool DoWithNoteBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cNoteBlockCallback a_Callback); // Lua-accessible -- cgit v1.2.3