From c2d041425599cdb55a5983cf9951f419d00595a1 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 26 Jan 2018 19:37:00 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20crash=20when=20obj=20tele's=20Nether?= =?UTF-8?q?=E2=86=92Overworld=20@=20rain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mods/CORE/mcl_worlds/init.lua | 1 + mods/ENVIRONMENT/mcl_weather/weather_core.lua | 2 +- mods/ITEMS/mcl_portals/portal_nether.lua | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/CORE/mcl_worlds/init.lua b/mods/CORE/mcl_worlds/init.lua index 2020042e1..d032426db 100644 --- a/mods/CORE/mcl_worlds/init.lua +++ b/mods/CORE/mcl_worlds/init.lua @@ -104,6 +104,7 @@ local last_dimension = {} -- Notifies this mod about a dimension change of a player. -- * player: Player who changed the dimension +-- * dimension: New dimension ("overworld", "nether", "end", "void") function mcl_worlds.dimension_change(player, dimension) for i=1, #mcl_worlds.registered_on_dimension_change do mcl_worlds.registered_on_dimension_change[i](player, dimension) diff --git a/mods/ENVIRONMENT/mcl_weather/weather_core.lua b/mods/ENVIRONMENT/mcl_weather/weather_core.lua index f4f22cffc..ec1621177 100644 --- a/mods/ENVIRONMENT/mcl_weather/weather_core.lua +++ b/mods/ENVIRONMENT/mcl_weather/weather_core.lua @@ -91,7 +91,7 @@ end -- it is costly to generate many particles around player so goal is focus mainly on front view. mcl_weather.get_random_pos_by_player_look_dir = function(player) local look_dir = player:get_look_dir() - local player_pos = player:getpos() + local player_pos = player:get_pos() local random_pos_x = 0 local random_pos_y = 0 diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index cd47ff8ac..637c0e856 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -434,8 +434,8 @@ minetest.register_abm({ -- Teleport obj:set_pos(target) - mcl_worlds.dimension_change(obj, mcl_worlds.pos_to_dimension(target)) if obj:is_player() then + mcl_worlds.dimension_change(obj, mcl_worlds.pos_to_dimension(target)) minetest.sound_play("mcl_portals_teleport", {pos=target, gain=0.5, max_hear_distance = 16}) end