Skip to content

Commit

Permalink
Fix deprecation warnings (#44)
Browse files Browse the repository at this point in the history
Co-authored-by: sys4 <bricassa@sys4.fr>
  • Loading branch information
sys4-fr and sys4 committed Apr 18, 2021
1 parent fb3c358 commit fb6b666
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mapgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ end

mapgen.getCavePerlinAt = function(pos)
cavePointPerlin = cavePointPerlin or minetest.get_perlin(mapgen.np_cave)
return cavePointPerlin:get3d(pos)
return cavePointPerlin:get_3d(pos)
end


Expand Down Expand Up @@ -485,7 +485,7 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
local maxp = {x = maxp_schem.x, y = 0, z = maxp_schem.z}

for y = start_y, math_max(NETHER_FLOOR + BLEND, start_y - 4096), -1 do
local nval_cave = nobj_cave_point:get3d({x = target_x, y = y, z = target_z})
local nval_cave = nobj_cave_point:get_3d({x = target_x, y = y, z = target_z})

if nval_cave > TCAVE then -- Cavern
air = air + 1
Expand All @@ -509,4 +509,4 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
return math_max(start_y, NETHER_FLOOR + BLEND) -- Fallback
end

minetest.register_on_generated(on_generated)
minetest.register_on_generated(on_generated)
2 changes: 1 addition & 1 deletion mapgen_mantle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ mapgen.add_basalt_columns = function(data, area, minp, maxp)
if basaltNoise > 0 then
-- a basalt column is here

local abs_sealevel_cave_noise = math_abs(cavePerlin:get3d({x = x, y = nearest_sea_level, z = z}))
local abs_sealevel_cave_noise = math_abs(cavePerlin:get_3d({x = x, y = nearest_sea_level, z = z}))

-- Add Some quick deterministic noise to the column heights
-- This is probably not good noise, but it doesn't have to be.
Expand Down
2 changes: 1 addition & 1 deletion mapgen_nobiomes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
local maxp = {x = maxp_schem.x, y = 0, z = maxp_schem.z}

for y = start_y, math.max(NETHER_FLOOR + BLEND, start_y - 4096), -1 do
local nval_cave = nobj_cave_point:get3d({x = target_x, y = y, z = target_z})
local nval_cave = nobj_cave_point:get_3d({x = target_x, y = y, z = target_z})

if nval_cave > TCAVE then -- Cavern
air = air + 1
Expand Down
4 changes: 2 additions & 2 deletions portal_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2007,15 +2007,15 @@ local wormhole_nodedef_default = {
a = 160, r = 128, g = 0, b = 80
},
sunlight_propagates = true,
use_texture_alpha = true,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes
and "blend" or true,
walkable = false,
diggable = false,
pointable = false,
buildable_to = false,
is_ground_content = false,
drop = "",
light_source = 5,
alpha = 192,
node_box = {
type = "fixed",
fixed = {
Expand Down

0 comments on commit fb6b666

Please sign in to comment.