From a89524d5330ffbdbaea1d38421dabe8d8f62999e Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 17 Jun 2014 01:15:38 +0200 Subject: Add DoWithBlockEntityAt() to WorldInterface.h --- src/Blocks/WorldInterface.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Blocks/WorldInterface.h') diff --git a/src/Blocks/WorldInterface.h b/src/Blocks/WorldInterface.h index bfbb053d9..650a216c0 100644 --- a/src/Blocks/WorldInterface.h +++ b/src/Blocks/WorldInterface.h @@ -6,6 +6,12 @@ class cItems; +typedef cItemCallback cBlockEntityCallback; + + + + + class cWorldInterface { public: @@ -29,6 +35,9 @@ public: /** Spawns a mob of the specified type. Returns the mob's EntityID if recognized and spawned, <0 otherwise */ virtual int SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eType a_MonsterType) = 0; + /** Calls the callback for the block entity at the specified coords; returns false if there's no block entity at those coords, true if found */ + virtual bool DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBlockEntityCallback & a_Callback) = 0; + /** Sends the block on those coords to the player */ virtual void SendBlockTo(int a_BlockX, int a_BlockY, int a_BlockZ, cPlayer * a_Player) = 0; -- cgit v1.2.3 From 19caba5125e457a9663102989ea717898e3c2827 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 2 Jul 2014 18:46:00 +0100 Subject: Redstone simulator is alerted to lever unpowering * Fixed the "fix" that broke the fix for #535, thereby fixing said issue * Fixed #535 --- src/Blocks/WorldInterface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Blocks/WorldInterface.h') diff --git a/src/Blocks/WorldInterface.h b/src/Blocks/WorldInterface.h index 650a216c0..251b28d03 100644 --- a/src/Blocks/WorldInterface.h +++ b/src/Blocks/WorldInterface.h @@ -46,4 +46,7 @@ public: virtual void SetTimeOfDay(Int64 a_TimeOfDay) = 0; + /** Wakes up the simulators for the specified block */ + virtual void WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ) = 0; + }; -- cgit v1.2.3