Re-registered FOV mods using new API version

This commit is contained in:
the-real-herowl 2023-12-10 00:14:16 +01:00 committed by the-real-herowl
parent a650f8b368
commit 3a007e3bb1
2 changed files with 13 additions and 2 deletions

View File

@ -34,7 +34,12 @@ local bow_load = {}
local bow_index = {} local bow_index = {}
-- define FOV modifier(s) -- define FOV modifier(s)
mcl_fovapi.register_modifier("bowcomplete", 0.8, 1, true, false, nil, nil) mcl_fovapi.register_modifier({
name = "bowcomplete",
fov_factor = 0.8,
time = 1,
is_multiplier = true,
})
function mcl_bows.shoot_arrow(arrow_item, pos, dir, yaw, shooter, power, damage, is_critical, bow_stack, collectable) function mcl_bows.shoot_arrow(arrow_item, pos, dir, yaw, shooter, power, damage, is_critical, bow_stack, collectable)
local obj = minetest.add_entity({x=pos.x,y=pos.y,z=pos.z}, arrow_item.."_entity") local obj = minetest.add_entity({x=pos.x,y=pos.y,z=pos.z}, arrow_item.."_entity")

View File

@ -17,7 +17,13 @@ minetest.register_craft({
} }
}) })
mcl_fovapi.register_modifier("spyglass", 8, 0.1,false, true, nil, nil) mcl_fovapi.register_modifier({
name = "spyglass",
fov_factor = 8,
time = 0.1,
is_multiplier = false,
exclusive = true,
})
local spyglass_scope = {} local spyglass_scope = {}