diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index 825e3931d..3928232b4 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -86,11 +86,17 @@ local PLAYER_COOLOFF, MOB_COOLOFF = 3, 14 -- for this many seconds they won't te local TOUCH_CHATTER_TIME = 1 -- prevent multiple teleportation attempts caused by multiple portal touches, for this number of seconds local CHATTER_US = TOUCH_CHATTER_TIME * 1000000 -local nether_portal_creative_delay = vl_tuning.setting("gamerule:playersNetherPortalCreativeDelay", "number", { +local nether_portal_creative_delay = 0 +vl_tuning.setting("gamerule:playersNetherPortalCreativeDelay", "number", { default = 0, + set = function(val) nether_portal_creative_delay = val end, + get = function() return nether_portal_creative_delay end, }) -local nether_portal_survival_delay = vl_tuning.setting("gamerule:playersNetherPortalDefaultDelay", "number", { +local nether_portal_survival_delay = 4 +vl_tuning.setting("gamerule:playersNetherPortalDefaultDelay", "number", { default = 4, + set = function(val) nether_portal_survival_delay = val end, + get = function() return nether_portal_survive_delay end, }) -- Speeds up the search by allowing some non-air nodes to be replaced when @@ -1484,9 +1490,9 @@ local function teleport(obj, portal_pos) if cooloff[obj] then return end - local delay = math.max(0, nether_portal_survival_delay[1] - 1) + local delay = math.max(0, nether_portal_survival_delay - 1) if minetest.is_creative_enabled(name) then - delay = math.max(0, nether_portal_creative_delay[1] - 1) + delay = math.max(0, nether_portal_creative_delay - 1) end if delay == 0 then diff --git a/mods/ITEMS/mcl_potions/tipped_arrow.lua b/mods/ITEMS/mcl_potions/tipped_arrow.lua index 1833e7169..394866f53 100644 --- a/mods/ITEMS/mcl_potions/tipped_arrow.lua +++ b/mods/ITEMS/mcl_potions/tipped_arrow.lua @@ -148,7 +148,7 @@ function mcl_potions.register_arrow(name, desc, color, def) local node = minetest.get_node(dpos) if self._stuck then - self._stucktimer = self._stucktimer + dtime + self._stucktimer = self._stucktimer or 0 + dtime self._stuckrechecktimer = self._stuckrechecktimer + dtime if self._stucktimer > ARROW_TIMEOUT then self.object:remove()