From 6bdd130aab51b630918ed664c4389cf33bcb2e06 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 29 Jul 2020 19:30:38 +0100 Subject: OnBroken/OnPlaced are for entity actions * Call OnPlaced/OnBroken in PlaceBlock/DigBlock - Remove unused Placing/Breaking handlers * Have the blockhandler's Check handle neighbour updating, instead of QueueTickBlockNeighbors --- src/Blocks/ChunkInterface.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Blocks/ChunkInterface.h') diff --git a/src/Blocks/ChunkInterface.h b/src/Blocks/ChunkInterface.h index 345fca4d2..6ee54b17f 100644 --- a/src/Blocks/ChunkInterface.h +++ b/src/Blocks/ChunkInterface.h @@ -2,12 +2,14 @@ #pragma once #include "../ForEachChunkProvider.h" +#include "../FunctionRef.h" // fwd: class cItem; +class cChunk; class cChunkMap; class cWorldInterface; class cPlayer; @@ -23,6 +25,8 @@ public: cChunkInterface(cChunkMap * a_ChunkMap) : m_ChunkMap(a_ChunkMap) {} + bool DoWithChunkAt(Vector3i a_BlockPos, cFunctionRef a_Callback); + BLOCKTYPE GetBlock(Vector3i a_Pos); NIBBLETYPE GetBlockMeta(Vector3i a_Pos); -- cgit v1.2.3