changed get_look_yaw() to get_look_hotizontal()

changed get_look_yaw() to get_look_horizontal()
This commit is contained in:
Ralf Weinert 2019-03-26 17:49:49 +01:00 committed by Alexander Weber
parent c5a6e43b86
commit cdfb09d451

View File

@ -106,7 +106,7 @@ end
local function get_compass_stack(player, stack)
local target = get_destination(player, stack)
local pos = player:getpos()
local dir = player:get_look_yaw()
local dir = player:get_look_horizontal() --changed because get_look_yaw() is decreped
local angle_north = math.deg(math.atan2(target.x - pos.x, target.z - pos.z))
if angle_north < 0 then
angle_north = angle_north + 360