From 3138daa1f8902a9e57d8ff2aa2951a194808b8ae Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 28 May 2013 18:50:44 +0000 Subject: Block entities now receive the cChunk param in their Tick() function They can safely access that chunk and any of its neighbors during ticking. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1526 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/DropSpenserEntity.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/DropSpenserEntity.h') diff --git a/source/DropSpenserEntity.h b/source/DropSpenserEntity.h index d58f74f04..4918f8dfe 100644 --- a/source/DropSpenserEntity.h +++ b/source/DropSpenserEntity.h @@ -53,7 +53,7 @@ public: // cBlockEntity overrides: virtual void SaveToJson(Json::Value & a_Value) override; - virtual bool Tick(float a_Dt) override; + virtual bool Tick(float a_Dt, cChunk & a_Chunk) override; virtual void SendTo(cClientHandle & a_Client) override; virtual void UsedBy(cPlayer * a_Player) override; @@ -75,13 +75,13 @@ protected: bool m_IsPowered; ///< Set to true when the dropspenser receives redstone power. /// Does the actual work on dropspensing an item. Chooses the slot, calls DropSpenseFromSlot() and handles smoke / sound effects - void DropSpense(void); + void DropSpense(cChunk & a_Chunk); /// Override this function to provide the specific behavior for item dropspensing (drop / shoot / pour / ...) - virtual void DropSpenseFromSlot(int a_SlotNum) = 0; + virtual void DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) = 0; /// Helper function, drops one item from the specified slot (like a dropper) - void DropFromSlot(int a_SlotNum); + void DropFromSlot(cChunk & a_Chunk, int a_SlotNum); } ; // tolua_export -- cgit v1.2.3