mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 03:07:32 +01:00
Fix broken compass and clocks
This commit is contained in:
parent
6cd6a525d8
commit
0ff6cb2837
@ -398,7 +398,7 @@ end
|
|||||||
function mcl_util.compass_works(pos)
|
function mcl_util.compass_works(pos)
|
||||||
-- It doesn't work in Nether and the End, but it works in the Overworld and in the high part of the void below
|
-- It doesn't work in Nether and the End, but it works in the Overworld and in the high part of the void below
|
||||||
local _, dim = mcl_util.y_to_layer(pos.y)
|
local _, dim = mcl_util.y_to_layer(pos.y)
|
||||||
if dim ~= "nether" or dim ~= "end" then
|
if dim == "nether" or dim == "end" then
|
||||||
return false
|
return false
|
||||||
elseif dim == "void" then
|
elseif dim == "void" then
|
||||||
return pos.y <= mcl_vars.mg_overworld_max and pos.y >= mcl_vars.mg_overworld_min - 64
|
return pos.y <= mcl_vars.mg_overworld_max and pos.y >= mcl_vars.mg_overworld_min - 64
|
||||||
|
@ -32,7 +32,7 @@ minetest.register_globalstep(function(dtime)
|
|||||||
local _, dim = mcl_util.y_to_layer(pos.y)
|
local _, dim = mcl_util.y_to_layer(pos.y)
|
||||||
local compass_image
|
local compass_image
|
||||||
-- Compasses do not work in certain zones
|
-- Compasses do not work in certain zones
|
||||||
if not mcl_util.compass_works(player:getpos()) then
|
if not mcl_util.compass_works(pos) then
|
||||||
compass_image = random_frame
|
compass_image = random_frame
|
||||||
else
|
else
|
||||||
local spawn = {x=0,y=0,z=0}
|
local spawn = {x=0,y=0,z=0}
|
||||||
|
Loading…
Reference in New Issue
Block a user