From 0cc179acc6b04c14589921a81c570491bb41db5e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 27 Jul 2020 07:46:11 +0200 Subject: [PATCH] Add warning about bed velocity --- mods/ITEMS/mcl_beds/functions.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index 3bfe9e578..de2b75662 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -83,6 +83,9 @@ local function lay_down(player, pos, bed_pos, state, skip) end -- No sleeping while moving. Slightly different behaviour than in MC. + -- FIXME: Velocity threshold should be 0.01 but Minetest 5.3.0 + -- sometimes reports incorrect Y speed. A velocity threshold + -- of 0.125 still seems good enough. if vector.length(player:get_player_velocity()) > 0.125 then minetest.chat_send_player(name, S("You have to stop moving before going to bed!")) return false