summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockBed.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-04-05 02:38:43 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2021-04-12 23:35:07 +0200
commit4cd49d7eca5f8fd53eb98577a1f218a5086704bb (patch)
tree09bf29a1d30a37445796ed70867f934435c4261f /src/Blocks/BlockBed.cpp
parentFixed generator for the Mega Taiga biome (#5129) (diff)
downloadcuberite-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 '')
-rw-r--r--src/Blocks/BlockBed.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp
index 531f88345..4fe22dffd 100644
--- a/src/Blocks/BlockBed.cpp
+++ b/src/Blocks/BlockBed.cpp
@@ -75,7 +75,7 @@ bool cBlockBedHandler::OnUse(
// Sleeping is allowed only during night and thunderstorms:
if (
- !(((a_WorldInterface.GetTimeOfDay() > 12541) && (a_WorldInterface.GetTimeOfDay() < 23458)) ||
+ !(((a_WorldInterface.GetTimeOfDay() > 12541_tick) && (a_WorldInterface.GetTimeOfDay() < 23458_tick)) ||
(a_Player.GetWorld()->GetWeather() == wThunderstorm))
) // Source: https://minecraft.gamepedia.com/Bed#Sleeping
{
@@ -146,7 +146,7 @@ bool cBlockBedHandler::OnUse(
return false;
}
);
- a_WorldInterface.SetTimeOfDay(0);
+ a_WorldInterface.SetTimeOfDay(0_tick);
a_ChunkInterface.SetBlockMeta(a_BlockPos, Meta & 0x0b); // Clear the "occupied" bit of the bed's block
}
return true;