diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-04-05 02:38:43 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-04-12 23:35:07 +0200 |
commit | 4cd49d7eca5f8fd53eb98577a1f218a5086704bb (patch) | |
tree | 09bf29a1d30a37445796ed70867f934435c4261f /src/BlockEntities/BeaconEntity.cpp | |
parent | Fixed generator for the Mega Taiga biome (#5129) (diff) | |
download | cuberite-4cd49d7eca5f8fd53eb98577a1f218a5086704bb.tar cuberite-4cd49d7eca5f8fd53eb98577a1f218a5086704bb.tar.gz cuberite-4cd49d7eca5f8fd53eb98577a1f218a5086704bb.tar.bz2 cuberite-4cd49d7eca5f8fd53eb98577a1f218a5086704bb.tar.lz cuberite-4cd49d7eca5f8fd53eb98577a1f218a5086704bb.tar.xz cuberite-4cd49d7eca5f8fd53eb98577a1f218a5086704bb.tar.zst cuberite-4cd49d7eca5f8fd53eb98577a1f218a5086704bb.zip |
Diffstat (limited to 'src/BlockEntities/BeaconEntity.cpp')
-rw-r--r-- | src/BlockEntities/BeaconEntity.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp index e59d31f52..6a7916dd1 100644 --- a/src/BlockEntities/BeaconEntity.cpp +++ b/src/BlockEntities/BeaconEntity.cpp @@ -296,8 +296,10 @@ void cBeaconEntity::SendTo(cClientHandle & a_Client) bool cBeaconEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { - // Update the beacon every 4 seconds - if ((GetWorld()->GetWorldAge() % 80) == 0) + using namespace std::chrono_literals; + + // Update the beacon every 4 seconds: + if ((GetWorld()->GetWorldTickAge() % 4s) == 0s) { UpdateBeacon(); GiveEffects(); |