Add missed files

This commit is contained in:
teknomunk 2024-11-17 07:08:41 -06:00
parent 49bf10b6c7
commit cb5869f4fb
2 changed files with 11 additions and 5 deletions

View file

@ -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

View file

@ -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()