From 4cd49d7eca5f8fd53eb98577a1f218a5086704bb Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 5 Apr 2021 01:38:43 +0100 Subject: Fix sending incorrect date values on world change Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge. --- src/BlockEntities/HopperEntity.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/BlockEntities/HopperEntity.h') diff --git a/src/BlockEntities/HopperEntity.h b/src/BlockEntities/HopperEntity.h index 366eb8e9e..8eb0196a3 100644 --- a/src/BlockEntities/HopperEntity.h +++ b/src/BlockEntities/HopperEntity.h @@ -30,8 +30,7 @@ public: enum { ContentsHeight = 1, - ContentsWidth = 5, - TICKS_PER_TRANSFER = 8, ///< How many ticks at minimum between two item transfers to or from the hopper + ContentsWidth = 5 } ; // tolua_end @@ -48,8 +47,8 @@ public: protected: - Int64 m_LastMoveItemsInTick; - Int64 m_LastMoveItemsOutTick; + cTickTimeLong m_LastMoveItemsInTick; + cTickTimeLong m_LastMoveItemsOutTick; // cBlockEntity overrides: virtual void CopyFrom(const cBlockEntity & a_Src) override; @@ -61,13 +60,13 @@ protected: void OpenNewWindow(void); /** Moves items from the container above it into this hopper. Returns true if the contents have changed. */ - bool MoveItemsIn(cChunk & a_Chunk, Int64 a_CurrentTick); + bool MoveItemsIn(cChunk & a_Chunk, cTickTimeLong a_CurrentTick); /** Moves pickups from above this hopper into it. Returns true if the contents have changed. */ - bool MovePickupsIn(cChunk & a_Chunk, Int64 a_CurrentTick); + bool MovePickupsIn(cChunk & a_Chunk); /** Moves items out from this hopper into the destination. Returns true if the contents have changed. */ - bool MoveItemsOut(cChunk & a_Chunk, Int64 a_CurrentTick); + bool MoveItemsOut(cChunk & a_Chunk, cTickTimeLong a_CurrentTick); /** Moves items from a chest (dblchest) above the hopper into this hopper. Returns true if contents have changed. */ bool MoveItemsFromChest(cChunk & a_Chunk); -- cgit v1.2.3