Code tidy and biome check fixes (thanks hlqkj)

This commit is contained in:
tenplus1 2021-11-27 10:54:46 +00:00
parent 0a39f7903b
commit 74342d7b9b
15 changed files with 219 additions and 234 deletions

View File

@ -291,7 +291,7 @@ if ethereal.glacier == 1 then
}) })
end end
if ethereal.tundra and minetest.registered_nodes["default:permafrost"] then if ethereal.tundra == 1 and minetest.registered_nodes["default:permafrost"] then
minetest.register_biome({ minetest.register_biome({
name = "tundra_highland", name = "tundra_highland",

View File

@ -22,7 +22,7 @@ minetest.register_alias("ethereal:strawberry_bush", "ethereal:strawberry_7")
minetest.register_alias("ethereal:seed_strawberry", "ethereal:strawberry") minetest.register_alias("ethereal:seed_strawberry", "ethereal:strawberry")
for i = 1, 5 do for i = 1, 5 do
minetest.register_alias("ethereal:wild_onion_"..i, "ethereal:onion_"..i) minetest.register_alias("ethereal:wild_onion_" .. i, "ethereal:onion_" .. i)
end end
minetest.register_alias("ethereal:onion_7", "ethereal:onion_4") minetest.register_alias("ethereal:onion_7", "ethereal:onion_4")

View File

@ -33,6 +33,7 @@ minetest.register_craftitem("ethereal:crystal_ingot", {
wield_image = "ethereal_crystal_ingot.png" wield_image = "ethereal_crystal_ingot.png"
}) })
-- Check for builtin_item mod and add custom drop code to crystal spikes
if minetest.get_modpath("builtin_item") then if minetest.get_modpath("builtin_item") then
minetest.override_item("ethereal:crystal_spike", { minetest.override_item("ethereal:crystal_spike", {
@ -93,7 +94,7 @@ minetest.register_craft({
"default:mese_crystal", "ethereal:crystal_spike", "default:mese_crystal", "ethereal:crystal_spike",
"ethereal:crystal_spike", "default:mese_crystal", "bucket:bucket_water" "ethereal:crystal_spike", "default:mese_crystal", "bucket:bucket_water"
}, },
replacements = { {"bucket:bucket_water", "bucket:bucket_empty"} } replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
}) })
-- Crystal Block -- Crystal Block
@ -111,15 +112,13 @@ minetest.register_craft({
recipe = { recipe = {
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"}, {"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"}, {"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"}, {"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"}
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "ethereal:crystal_ingot 9", output = "ethereal:crystal_ingot 9",
recipe = { recipe = {{"ethereal:crystal_block"}}
{"ethereal:crystal_block"},
}
}) })
-- Crystal Sword (Powerful wee beastie) -- Crystal Sword (Powerful wee beastie)
@ -167,7 +166,7 @@ minetest.register_tool("ethereal:axe_crystal", {
maxlevel = 3 maxlevel = 3
} }
}, },
damage_groups = {fleshy = 7}, damage_groups = {fleshy = 7}
}, },
groups = {axe = 1}, groups = {axe = 1},
sound = {breaks = "default_tool_breaks"} sound = {breaks = "default_tool_breaks"}
@ -206,7 +205,7 @@ minetest.register_tool("ethereal:pick_crystal", {
maxlevel = 3 maxlevel = 3
} }
}, },
damage_groups = {fleshy = 6}, damage_groups = {fleshy = 6}
}, },
groups = {pickaxe = 1}, groups = {pickaxe = 1},
sound = {breaks = "default_tool_breaks"} sound = {breaks = "default_tool_breaks"}
@ -255,7 +254,7 @@ minetest.register_tool("ethereal:shovel_crystal", {
maxlevel = 3 maxlevel = 3
} }
}, },
damage_groups = {fleshy = 4}, damage_groups = {fleshy = 4}
}, },
groups = {shovel = 1}, groups = {shovel = 1},
sound = {breaks = "default_tool_breaks"} sound = {breaks = "default_tool_breaks"}

260
decor.lua
View File

@ -1,58 +1,62 @@
if minetest.registered_nodes["farming:cotton_wild"] then if minetest.registered_nodes["farming:cotton_wild"] then
minetest.register_decoration({
name = "farming:cotton_wild", minetest.register_decoration({
deco_type = "simple", name = "farming:cotton_wild",
place_on = {"default:dry_dirt_with_dry_grass"}, deco_type = "simple",
sidelen = 16, place_on = {"default:dry_dirt_with_dry_grass"},
noise_params = { sidelen = 16,
offset = -0.1, noise_params = {
scale = 0.1, offset = -0.1,
spread = {x = 50, y = 50, z = 50}, scale = 0.1,
seed = 4242, spread = {x = 50, y = 50, z = 50},
octaves = 3, seed = 4242,
persist = 0.7 octaves = 3,
}, persist = 0.7
biomes = {"savanna"}, },
y_max = 31000, biomes = {"savanna"},
y_min = 1, y_max = 31000,
decoration = "farming:cotton_wild", y_min = 1,
}) decoration = "farming:cotton_wild"
})
end end
-- water pools in swamp areas if 5.0 detected -- water pools in swamp areas if 5.0 detected
if minetest.registered_nodes["default:permafrost"] then if minetest.registered_nodes["default:permafrost"] then
minetest.register_decoration({
deco_type = "simple", minetest.register_decoration({
place_on = {"default:dirt_with_grass"}, deco_type = "simple",
place_offset_y = -1, place_on = {"default:dirt_with_grass"},
sidelen = 16, place_offset_y = -1,
fill_ratio = 0.01, sidelen = 16,
biomes = {"swamp"}, fill_ratio = 0.01,
y_max = 2, biomes = {"swamp"},
y_min = 1, y_max = 2,
flags = "force_placement", y_min = 1,
decoration = "default:water_source", flags = "force_placement",
spawn_by = "default:dirt_with_grass", decoration = "default:water_source",
num_spawn_by = 8, spawn_by = "default:dirt_with_grass",
}) num_spawn_by = 8
minetest.register_decoration({ })
deco_type = "simple",
place_on = {"default:dirt_with_grass"}, minetest.register_decoration({
place_offset_y = -1, deco_type = "simple",
sidelen = 16, place_on = {"default:dirt_with_grass"},
fill_ratio = 0.1, place_offset_y = -1,
biomes = {"swamp"}, sidelen = 16,
y_max = 2, fill_ratio = 0.1,
y_min = 1, biomes = {"swamp"},
flags = "force_placement", y_max = 2,
decoration = "default:water_source", y_min = 1,
spawn_by = {"default:dirt_with_grass", "default:water_source"}, flags = "force_placement",
num_spawn_by = 8, decoration = "default:water_source",
}) spawn_by = {"default:dirt_with_grass", "default:water_source"},
num_spawn_by = 8
})
end end
if minetest.registered_nodes["default:dry_dirt_with_dry_grass"] then if minetest.registered_nodes["default:dry_dirt_with_dry_grass"] then
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = {"default:dry_dirt_with_dry_grass"}, place_on = {"default:dry_dirt_with_dry_grass"},
@ -70,7 +74,7 @@ if minetest.registered_nodes["default:dry_dirt_with_dry_grass"] then
y_min = 1, y_min = 1,
decoration = "default:dry_dirt", decoration = "default:dry_dirt",
place_offset_y = -1, place_offset_y = -1,
flags = "force_placement", flags = "force_placement"
}) })
end end
@ -94,7 +98,7 @@ local add_node = function(a, b, c, d, e, f, g, h, i, j)
decoration = f, decoration = f,
height_max = g, height_max = g,
spawn_by = h, spawn_by = h,
num_spawn_by = i, num_spawn_by = i
}) })
end end
@ -197,26 +201,26 @@ local list = {
-- wild red and brown mushrooms -- wild red and brown mushrooms
for _, row in pairs(list) do for _, row in pairs(list) do
if row[3] == 1 then if row[3] == 1 then
minetest.register_decoration({
deco_type = "simple",
place_on = row[2],
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.009,
spread = {x = 200, y = 200, z = 200},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {row[1]},
y_min = 1,
y_max = 120,
decoration = {"flowers:mushroom_brown", "flowers:mushroom_red"}
})
end
minetest.register_decoration({
deco_type = "simple",
place_on = row[2],
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.009,
spread = {x = 200, y = 200, z = 200},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {row[1]},
y_min = 1,
y_max = 120,
decoration = {"flowers:mushroom_brown", "flowers:mushroom_red"}
})
end
end end
-- jungle grass -- jungle grass
@ -273,14 +277,12 @@ add_node({"ethereal:bamboo_dirt"}, 0.35, {"sakura"}, 1, 100,
-- grass on sand -- grass on sand
if minetest.registered_nodes["default:marram_grass_1"] then if minetest.registered_nodes["default:marram_grass_1"] then
add_node({"default:sand"}, 0.25, {"sandclay"}, 3, 4, {"default:marram_grass_1", add_node({"default:sand"}, 0.25, {"sandclay"}, 3, 4, {"default:marram_grass_1",
"default:marram_grass_2", "default:marram_grass_3"}, nil, nil, nil, "default:marram_grass_2", "default:marram_grass_3"}, nil, nil, nil,
ethereal.sandclay) ethereal.sandclay)
else else
add_node({"default:sand"}, 0.25, {"sandclay"}, 3, 4, {"default:grass_2",
add_node({"default:sand"}, 0.25, {"sandclay"}, 3, 4, {"default:grass_2", "default:grass_3"}, nil, nil, nil, ethereal.sandclay)
"default:grass_3"}, nil, nil, nil, ethereal.sandclay)
end end
-- ferns -- ferns
@ -537,47 +539,50 @@ minetest.register_decoration({
end end
if ethereal.desert and minetest.get_modpath("wine") then if ethereal.desert == 1 and minetest.get_modpath("wine") then
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand"},
sidelen = 16,
fill_ratio = 0.001,
biomes = {"desert"},
decoration = {"wine:blue_agave"}
})
end
if ethereal.snowy and minetest.registered_nodes["default:fern_1"] then
local function register_fern_decoration(seed, length)
minetest.register_decoration({ minetest.register_decoration({
name = "default:fern_" .. length,
deco_type = "simple", deco_type = "simple",
place_on = { place_on = {"default:desert_sand"},
"ethereal:cold_dirt", "default:dirt_with_coniferous_litter"},
sidelen = 16, sidelen = 16,
noise_params = { fill_ratio = 0.001,
offset = 0, biomes = {"desert"},
scale = 0.2, decoration = {"wine:blue_agave"}
spread = {x = 100, y = 100, z = 100},
seed = seed,
octaves = 3,
persist = 0.7
},
y_max = 31000,
y_min = 6,
decoration = "default:fern_" .. length
}) })
end end
register_fern_decoration(14936, 3)
register_fern_decoration(801, 2) if ethereal.snowy == 1 and minetest.registered_nodes["default:fern_1"] then
register_fern_decoration(5, 1)
local function register_fern_decoration(seed, length)
minetest.register_decoration({
name = "default:fern_" .. length,
deco_type = "simple",
place_on = {
"ethereal:cold_dirt", "default:dirt_with_coniferous_litter"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.2,
spread = {x = 100, y = 100, z = 100},
seed = seed,
octaves = 3,
persist = 0.7
},
y_max = 31000,
y_min = 6,
decoration = "default:fern_" .. length
})
end
register_fern_decoration(14936, 3)
register_fern_decoration(801, 2)
register_fern_decoration(5, 1)
end end
if ethereal.tundra and minetest.registered_nodes["default:permafrost"] then if ethereal.tundra == 1 and minetest.registered_nodes["default:permafrost"] then
-- Tundra moss -- Tundra moss
@ -629,28 +634,30 @@ end
if minetest.get_modpath("butterflies") then if minetest.get_modpath("butterflies") then
minetest.register_decoration({
name = "butterflies:butterfly", minetest.register_decoration({
deco_type = "simple", name = "butterflies:butterfly",
place_on = {"default:dirt_with_grass", "ethereal:prairie_dirt"}, deco_type = "simple",
place_offset_y = 2, place_on = {"default:dirt_with_grass", "ethereal:prairie_dirt"},
sidelen = 80, place_offset_y = 2,
fill_ratio = 0.005, sidelen = 80,
biomes = {"deciduous_forest", "grassytwo", "prairie", "jumble"}, fill_ratio = 0.005,
y_max = 31000, biomes = {"deciduous_forest", "grassytwo", "prairie", "jumble"},
y_min = 1, y_max = 31000,
decoration = { y_min = 1,
"butterflies:butterfly_white", decoration = {
"butterflies:butterfly_red", "butterflies:butterfly_white",
"butterflies:butterfly_violet" "butterflies:butterfly_red",
}, "butterflies:butterfly_violet"
spawn_by = "group:flower", },
num_spawn_by = 1 spawn_by = "group:flower",
}) num_spawn_by = 1
})
end end
if minetest.get_modpath("fireflies") then if minetest.get_modpath("fireflies") then
minetest.register_decoration({ minetest.register_decoration({
name = "fireflies:firefly_low", name = "fireflies:firefly_low",
deco_type = "simple", deco_type = "simple",
@ -675,6 +682,7 @@ end
-- Coral Reef (Minetest 5.0) -- Coral Reef (Minetest 5.0)
if minetest.registered_nodes["default:coral_green"] then if minetest.registered_nodes["default:coral_green"] then
minetest.register_decoration({ minetest.register_decoration({
name = "default:corals", name = "default:corals",
deco_type = "simple", deco_type = "simple",
@ -689,11 +697,7 @@ if minetest.registered_nodes["default:coral_green"] then
octaves = 3, octaves = 3,
persist = 0.7, persist = 0.7,
}, },
biomes = { biomes = {"desert_ocean", "savanna_ocean", "junglee_ocean"},
"desert_ocean",
"savanna_ocean",
"junglee_ocean",
},
y_max = -2, y_max = -2,
y_min = -8, y_min = -8,
flags = "force_placement", flags = "force_placement",

View File

@ -55,7 +55,6 @@ for n = 1, #dirts do
footstep = {name = "default_grass_footstep", gain = 0.25}, footstep = {name = "default_grass_footstep", gain = 0.25},
}), }),
}) })
end end
@ -76,8 +75,7 @@ local flower_spread = function(pos, node)
return return
end end
if num > 3 if num > 3 and node.name == "ethereal:crystalgrass" then
and node.name == "ethereal:crystalgrass" then
local grass = minetest.find_nodes_in_area_under_air( local grass = minetest.find_nodes_in_area_under_air(
pos0, pos1, {"ethereal:crystalgrass"}) pos0, pos1, {"ethereal:crystalgrass"})
@ -99,8 +97,7 @@ local flower_spread = function(pos, node)
return return
elseif num > 3 elseif num > 3 and node.name == "ethereal:dry_shrub" then
and node.name == "ethereal:dry_shrub" then
local grass = minetest.find_nodes_in_area_under_air( local grass = minetest.find_nodes_in_area_under_air(
pos0, pos1, {"ethereal:dry_shrub"}) pos0, pos1, {"ethereal:dry_shrub"})
@ -261,7 +258,6 @@ if not minetest.get_modpath("bakedclay") then
is_ground_content = ethereal.cavedirt, is_ground_content = ethereal.cavedirt,
sounds = default.node_sound_stone_defaults() sounds = default.node_sound_stone_defaults()
}) })
end end
-- Quicksand (old style, sinking inside shows black instead of yellow effect, -- Quicksand (old style, sinking inside shows black instead of yellow effect,

View File

@ -286,12 +286,12 @@ minetest.register_node("ethereal:paper_wall", {
paramtype2 = "facedir", paramtype2 = "facedir",
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, 5/11, 0.5, 0.5, 8/16 } fixed = {-0.5, -0.5, 5/11, 0.5, 0.5, 8/16}
}, },
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
{ -0.5, -0.5, 5/11, 0.5, 0.5, 8/16 } {-0.5, -0.5, 5/11, 0.5, 0.5, 8/16}
} }
} }
}) })

View File

@ -59,15 +59,13 @@ minetest.register_node("ethereal:banana_bunch", {
-- Bunch to Single -- Bunch to Single
minetest.register_craft({ minetest.register_craft({
type = "shapeless",
output = "ethereal:banana 3", output = "ethereal:banana 3",
recipe = {"ethereal:banana_bunch"} recipe = {{"ethereal:banana_bunch"}}
}) })
minetest.register_craft({ minetest.register_craft({
type = "shapeless",
output = "ethereal:banana_bunch", output = "ethereal:banana_bunch",
recipe = {"ethereal:banana", "ethereal:banana", "ethereal:banana"} recipe = {{"ethereal:banana", "ethereal:banana", "ethereal:banana"}}
}) })
-- Banana Dough -- Banana Dough
@ -77,9 +75,8 @@ minetest.register_craftitem("ethereal:banana_dough", {
}) })
minetest.register_craft({ minetest.register_craft({
type = "shapeless",
output = "ethereal:banana_dough", output = "ethereal:banana_dough",
recipe = {"group:food_flour", "group:food_banana"} recipe = {{"group:food_flour", "group:food_banana"}}
}) })
minetest.register_craft({ minetest.register_craft({
@ -193,7 +190,6 @@ minetest.register_node("ethereal:golden_apple", {
leafdecay = 3,leafdecay_drop = 1 leafdecay = 3,leafdecay_drop = 1
}, },
drop = "ethereal:golden_apple", drop = "ethereal:golden_apple",
-- on_use = minetest.item_eat(20),
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
if user then if user then
user:set_hp(20) user:set_hp(20)
@ -249,9 +245,7 @@ minetest.register_craftitem("ethereal:bucket_cactus", {
minetest.register_craft({ minetest.register_craft({
output = "ethereal:bucket_cactus", output = "ethereal:bucket_cactus",
recipe = { recipe = {{"bucket:bucket_empty","default:cactus"}}
{"bucket:bucket_empty","default:cactus"},
}
}) })
@ -267,7 +261,6 @@ minetest.register_craftitem("ethereal:firethorn_jelly", {
if minetest.registered_items["farming:bowl"] then if minetest.registered_items["farming:bowl"] then
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "ethereal:firethorn_jelly", output = "ethereal:firethorn_jelly",
recipe = { recipe = {
{"farming:mortar_pestle","vessels:glass_bottle", ""}, {"farming:mortar_pestle","vessels:glass_bottle", ""},
@ -320,7 +313,6 @@ minetest.register_craftitem("ethereal:candied_lemon", {
}) })
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "ethereal:candied_lemon", output = "ethereal:candied_lemon",
recipe = { recipe = {
{"farming:baking_tray", "ethereal:lemon", "group:food_sugar"} {"farming:baking_tray", "ethereal:lemon", "group:food_sugar"}
@ -349,7 +341,6 @@ minetest.register_node("ethereal:lemonade", {
}) })
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "ethereal:lemonade", output = "ethereal:lemonade",
recipe = { recipe = {
{"ethereal:lemon", "group:food_sugar", "group:food_sugar"}, {"ethereal:lemon", "group:food_sugar", "group:food_sugar"},
@ -398,7 +389,6 @@ minetest.register_craftitem("ethereal:olive_oil", {
}) })
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "ethereal:olive_oil", output = "ethereal:olive_oil",
recipe = { recipe = {
{"ethereal:olive", "ethereal:olive", "ethereal:olive"}, {"ethereal:olive", "ethereal:olive", "ethereal:olive"},
@ -469,7 +459,6 @@ minetest.register_craftitem("ethereal:fugu", {
minetest.register_craft({ minetest.register_craft({
output = "ethereal:fugu", output = "ethereal:fugu",
-- type = "shapeless",
recipe = { recipe = {
{"group:food_cutting_board", "ethereal:fish_pufferfish", "group:food_soy_sauce"} {"group:food_cutting_board", "ethereal:fish_pufferfish", "group:food_soy_sauce"}
}, },
@ -487,7 +476,6 @@ minetest.register_craftitem("ethereal:teriyaki_chicken", {
}) })
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "ethereal:teriyaki_chicken 2", output = "ethereal:teriyaki_chicken 2",
recipe = { recipe = {
{"group:food_chicken_raw", "group:food_sugar", "group:food_soy_sauce"}, {"group:food_chicken_raw", "group:food_sugar", "group:food_soy_sauce"},
@ -507,7 +495,6 @@ minetest.register_craftitem("ethereal:teriyaki_beef", {
}) })
minetest.register_craft({ minetest.register_craft({
-- type = "shapeless",
output = "ethereal:teriyaki_beef", output = "ethereal:teriyaki_beef",
recipe = { recipe = {
{"group:food_meat_raw", "group:food_sugar", "group:food_soy_sauce"}, {"group:food_meat_raw", "group:food_sugar", "group:food_soy_sauce"},

View File

@ -9,6 +9,7 @@
]] ]]
-- DO NOT change settings below, use the settings.conf file instead -- DO NOT change settings below, use the settings.conf file instead
ethereal = { ethereal = {
version = "20210614", version = "20210614",

View File

@ -16,7 +16,7 @@ minetest.override_item("default:leaves", {
visual_scale = leafscale, visual_scale = leafscale,
inventory_image = "default_leaves.png", inventory_image = "default_leaves.png",
wield_image = "default_leaves.png", wield_image = "default_leaves.png",
walkable = ethereal.leafwalk, walkable = ethereal.leafwalk
}) })
-- ability to craft big tree sapling -- ability to craft big tree sapling
@ -31,7 +31,7 @@ minetest.override_item("default:jungleleaves", {
visual_scale = leafscale, visual_scale = leafscale,
inventory_image = "default_jungleleaves.png", inventory_image = "default_jungleleaves.png",
wield_image = "default_jungleleaves.png", wield_image = "default_jungleleaves.png",
walkable = ethereal.leafwalk, walkable = ethereal.leafwalk
}) })
-- default pine tree leaves -- default pine tree leaves
@ -48,7 +48,7 @@ minetest.override_item("default:pine_needles", {
{items = {"ethereal:pine_nuts"}, rarity = 5}, {items = {"ethereal:pine_nuts"}, rarity = 5},
{items = {"default:pine_needles"}} {items = {"default:pine_needles"}}
} }
}, }
}) })
-- default acacia tree leaves -- default acacia tree leaves
@ -57,7 +57,7 @@ minetest.override_item("default:acacia_leaves", {
inventory_image = "default_acacia_leaves.png", inventory_image = "default_acacia_leaves.png",
wield_image = "default_acacia_leaves.png", wield_image = "default_acacia_leaves.png",
visual_scale = leafscale, visual_scale = leafscale,
walkable = ethereal.leafwalk, walkable = ethereal.leafwalk
}) })
-- default aspen tree leaves -- default aspen tree leaves
@ -66,7 +66,7 @@ minetest.override_item("default:aspen_leaves", {
inventory_image = "default_aspen_leaves.png", inventory_image = "default_aspen_leaves.png",
wield_image = "default_aspen_leaves.png", wield_image = "default_aspen_leaves.png",
visual_scale = leafscale, visual_scale = leafscale,
walkable = ethereal.leafwalk, walkable = ethereal.leafwalk
}) })
-- willow twig -- willow twig

View File

@ -10,7 +10,7 @@ minetest.register_craftitem("ethereal:wild_onion_plant", {
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:wild_onion_1") return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:wild_onion_1")
end, end,
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2)
}) })
-- Define Onion growth stages -- Define Onion growth stages

View File

@ -64,9 +64,7 @@ minetest.register_craftitem("ethereal:fire_dust", {
minetest.register_craft({ minetest.register_craft({
output = "ethereal:fire_dust 2", output = "ethereal:fire_dust 2",
recipe = { recipe = {{"ethereal:fire_flower"}}
{"ethereal:fire_flower"}
}
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -138,6 +138,7 @@ function ethereal.grow_birch_tree(pos)
end end
function ethereal.grow_sakura_tree(pos) function ethereal.grow_sakura_tree(pos)
if math.random(10) == 1 then if math.random(10) == 1 then
add_tree(pos, 4, 0, 3, ethereal.sakura_tree, add_tree(pos, 4, 0, 3, ethereal.sakura_tree,
{{"ethereal:sakura_leaves", "ethereal:sakura_leaves2"}}) {{"ethereal:sakura_leaves", "ethereal:sakura_leaves2"}})

View File

@ -163,25 +163,25 @@ add_schem({"ethereal:grove_dirt"}, 0.002, {"mediterranean"}, 5, 35,
-- default large cactus -- default large cactus
if ethereal.desert == 1 then if ethereal.desert == 1 then
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = {"default:desert_sand"}, place_on = {"default:desert_sand"},
sidelen = 80, sidelen = 80,
noise_params = { noise_params = {
offset = -0.0005, offset = -0.0005,
scale = 0.0015, scale = 0.0015,
spread = {x = 200, y = 200, z = 200}, spread = {x = 200, y = 200, z = 200},
seed = 230, seed = 230,
octaves = 3, octaves = 3,
persist = 0.6 persist = 0.6
}, },
biomes = {"desert"}, biomes = {"desert"},
y_min = 5, y_min = 5,
y_max = 31000, y_max = 31000,
schematic = dpath .. "large_cactus.mts", schematic = dpath .. "large_cactus.mts",
flags = "place_center_x", flags = "place_center_x",
rotation = "random", rotation = "random",
}) })
end end
@ -230,6 +230,7 @@ minetest.register_decoration({
-- default pine bush -- default pine bush
if minetest.registered_nodes["default:pine_bush"] then if minetest.registered_nodes["default:pine_bush"] then
minetest.register_decoration({ minetest.register_decoration({
name = "default:pine_bush", name = "default:pine_bush",
deco_type = "schematic", deco_type = "schematic",
@ -254,27 +255,28 @@ end
-- default blueberry bush -- default blueberry bush
if minetest.registered_nodes["default:blueberry_bush_leaves"] then if minetest.registered_nodes["default:blueberry_bush_leaves"] then
minetest.register_decoration({
name = "default:blueberry_bush", minetest.register_decoration({
deco_type = "schematic", name = "default:blueberry_bush",
place_on = { deco_type = "schematic",
"default:dirt_with_coniferous_litter", "default:dirt_with_snow"}, place_on = {
sidelen = 16, "default:dirt_with_coniferous_litter", "default:dirt_with_snow"},
noise_params = { sidelen = 16,
offset = -0.004, noise_params = {
scale = 0.01, offset = -0.004,
spread = {x = 100, y = 100, z = 100}, scale = 0.01,
seed = 697, spread = {x = 100, y = 100, z = 100},
octaves = 3, seed = 697,
persist = 0.7, octaves = 3,
}, persist = 0.7,
biomes = {"coniferous_forest", "taiga"}, },
y_max = 31000, biomes = {"coniferous_forest", "taiga"},
y_min = 1, y_max = 31000,
place_offset_y = 1, y_min = 1,
schematic = dpath .. "blueberry_bush.mts", place_offset_y = 1,
flags = "place_center_x, place_center_z" schematic = dpath .. "blueberry_bush.mts",
}) flags = "place_center_x, place_center_z"
})
end end
@ -303,10 +305,10 @@ minetest.register_decoration({
-- coral reef -- coral reef
if ethereal.reefs == 1 then if ethereal.reefs == 1 then
-- override corals so crystal shovel can pick them up intact -- override corals so crystal shovel can pick them up intact
minetest.override_item("default:coral_skeleton", {groups = {crumbly = 3}}) minetest.override_item("default:coral_skeleton", {groups = {crumbly = 3}})
minetest.override_item("default:coral_orange", {groups = {crumbly = 3}}) minetest.override_item("default:coral_orange", {groups = {crumbly = 3}})
minetest.override_item("default:coral_brown", {groups = {crumbly = 3}}) minetest.override_item("default:coral_brown", {groups = {crumbly = 3}})
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",

View File

@ -68,9 +68,8 @@ minetest.register_node("ethereal:coral2", {
}) })
minetest.register_craft( { minetest.register_craft( {
type = "shapeless",
output = "dye:cyan 3", output = "dye:cyan 3",
recipe = {"ethereal:coral2"} recipe = {{"ethereal:coral2"}}
}) })
-- Orange Coral -- Orange Coral
@ -91,9 +90,8 @@ minetest.register_node("ethereal:coral3", {
}) })
minetest.register_craft( { minetest.register_craft( {
type = "shapeless",
output = "dye:orange 3", output = "dye:orange 3",
recipe = {"ethereal:coral3"} recipe = {{"ethereal:coral3"}}
}) })
-- Pink Coral -- Pink Coral
@ -114,9 +112,8 @@ minetest.register_node("ethereal:coral4", {
}) })
minetest.register_craft( { minetest.register_craft( {
type = "shapeless",
output = "dye:pink 3", output = "dye:pink 3",
recipe = {"ethereal:coral4"} recipe = {{"ethereal:coral4"}}
}) })
-- Green Coral -- Green Coral
@ -137,9 +134,8 @@ minetest.register_node("ethereal:coral5", {
}) })
minetest.register_craft( { minetest.register_craft( {
type = "shapeless",
output = "dye:green 3", output = "dye:green 3",
recipe = {"ethereal:coral5"} recipe = {{"ethereal:coral5"}}
}) })
-- Undersea Sand -- Undersea Sand
@ -156,6 +152,7 @@ minetest.register_node("ethereal:sandy", {
-- randomly generate coral or seaweed and have seaweed grow up to 14 high -- randomly generate coral or seaweed and have seaweed grow up to 14 high
if ethereal.sealife == 1 then if ethereal.sealife == 1 then
minetest.register_abm({ minetest.register_abm({
label = "Grow coral/seaweed", label = "Grow coral/seaweed",
nodenames = {"ethereal:sandy"}, nodenames = {"ethereal:sandy"},

View File

@ -12,7 +12,7 @@ minetest.register_node("ethereal:sakura_trunk", {
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
-- sakura wood -- sakura wood
@ -23,7 +23,7 @@ minetest.register_node("ethereal:sakura_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -53,7 +53,7 @@ minetest.register_node("ethereal:willow_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -83,7 +83,7 @@ minetest.register_node("ethereal:redwood_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -113,7 +113,7 @@ minetest.register_node("ethereal:frost_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -143,7 +143,7 @@ minetest.register_node("ethereal:yellow_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -173,7 +173,7 @@ minetest.register_node("ethereal:palm_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -203,7 +203,7 @@ minetest.register_node("ethereal:banana_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -270,7 +270,7 @@ minetest.register_node("ethereal:birch_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({
@ -327,7 +327,7 @@ minetest.register_node("ethereal:olive_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir", paramtype2 = "facedir",
on_place = minetest.rotate_node, on_place = minetest.rotate_node
}) })
minetest.register_craft({ minetest.register_craft({