Modif biomes

This commit is contained in:
sys4-fr 2018-11-14 22:26:29 +01:00
parent 6120890c5d
commit 794fb251ba
6 changed files with 42 additions and 43 deletions

Binary file not shown.

Binary file not shown.

View File

@ -161,7 +161,7 @@ minetest.register_abm({
-- This finds the sapling under the grown tree. ~ LazyJ -- This finds the sapling under the grown tree. ~ LazyJ
if minetest.get_node(pos).name == "snow:sapling_pine" then if minetest.get_node(pos).name == "snow:sapling_pine" then
-- This switches the sapling to a tree trunk. ~ LazyJ -- This switches the sapling to a tree trunk. ~ LazyJ
minetest.set_node(pos, {name="default:pinetree"}) minetest.set_node(pos, {name="default:pine_tree"})
-- This is more for testing but it may be useful info to some admins when -- This is more for testing but it may be useful info to some admins when
-- grepping the server logs too. ~ LazyJ -- grepping the server logs too. ~ LazyJ
minetest.log("action", "A pine sapling grows into a tree at "..minetest.pos_to_string(pos)) minetest.log("action", "A pine sapling grows into a tree at "..minetest.pos_to_string(pos))

View File

@ -81,7 +81,7 @@ local pine_tree = {
axiom="TABff", axiom="TABff",
rules_a="[&T+f+ff+ff+ff+f]GA", rules_a="[&T+f+ff+ff+ff+f]GA",
rules_b="[&T+f+Gf+Gf+Gf]GB", rules_b="[&T+f+Gf+Gf+Gf]GB",
trunk="default:pinetree", trunk="default:pine_tree",
leaves="snow:needles", leaves="snow:needles",
angle=90, angle=90,
iterations=1, iterations=1,
@ -96,7 +96,7 @@ local xmas_tree = {
axiom="TABff", axiom="TABff",
rules_a="[&T+f+ff+ff+ff+f]GA", rules_a="[&T+f+ff+ff+ff+f]GA",
rules_b="[&T+f+Gf+Gf+Gf]GB", rules_b="[&T+f+Gf+Gf+Gf]GB",
trunk="default:pinetree", trunk="default:pine_tree",
leaves="snow:needles_decorated", leaves="snow:needles_decorated",
angle=90, angle=90,
iterations=1, iterations=1,
@ -149,7 +149,7 @@ end
function snow.voxelmanip_pine(pos,a,data) function snow.voxelmanip_pine(pos,a,data)
local c_snow = minetest.get_content_id("default:snow") local c_snow = minetest.get_content_id("default:snow")
local c_pine_needles = minetest.get_content_id("snow:needles") local c_pine_needles = minetest.get_content_id("snow:needles")
local c_pinetree = minetest.get_content_id("default:pinetree") local c_pinetree = minetest.get_content_id("default:pine_tree")
local c_air = minetest.get_content_id("air") local c_air = minetest.get_content_id("air")
local perlin1 = minetest.get_perlin(112,3, 0.5, perlin_scale) local perlin1 = minetest.get_perlin(112,3, 0.5, perlin_scale)

View File

@ -22,12 +22,26 @@ minetest.register_biome({
depth_filler = 2, depth_filler = 2,
node_riverbed = "default:sand", node_riverbed = "default:sand",
depth_riverbed = 2, depth_riverbed = 2,
y_min = 40, y_min = 2,
y_max = 31000, y_max = 31000,
heat_point = 20.0, heat_point = 20.0,
humidity_point = 70.0, humidity_point = 70.0,
}) })
minetest.register_biome({
name = "pine_forest",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 60,
y_max = 31000,
heat_point = 40,
humidity_point = 68,
})
minetest.register_biome({ minetest.register_biome({
name = "snow_biome_lush", name = "snow_biome_lush",
node_dust = "default:snow", node_dust = "default:snow",
@ -37,25 +51,25 @@ minetest.register_biome({
depth_filler = 2, depth_filler = 2,
node_riverbed = "default:sand", node_riverbed = "default:sand",
depth_riverbed = 2, depth_riverbed = 2,
y_min = 60, y_min = 2,
y_max = 31000, y_max = 31000,
heat_point = 10.0, heat_point = 10.0,
humidity_point = 70.0, humidity_point = 70.0,
}) })
--[[minetest.register_biome({ minetest.register_biome({
name = "snow_biome_alpine", name = "snow_biome_alpine",
node_top = "default:stone", node_top = "default:dirt_with_snow",
depth_top = 1, depth_top = 1,
node_filler = "default:stone", node_filler = "default:stone",
y_min = snow.min_height+60, y_min = 60,
y_max = 31000, y_max = 31000,
heat_point = 10.0, heat_point = 10.0,
humidity_point = 40.0, humidity_point = 40.0,
}) })
]]--
minetest.register_biome({ minetest.register_biome({
name = "snow_biome_sand", name = "snow_biome_sand",
@ -85,28 +99,28 @@ minetest.register_decoration({
persist = 0.7, persist = 0.7,
}, },
y_max = 31000, y_max = 31000,
y_min = 60, y_min = 4,
biomes = {"snowy_grassland", "coniferous_forest", "taiga"}, biomes = {"snowy_grassland", "coniferous_forest", "taiga", "snow_biome_alpine"},
schematic = minetest.get_modpath("snow").."/schematics/pine.mts", schematic = minetest.get_modpath("snow").."/schematics/pine.mts",
flags = "place_center_x, place_center_z", flags = "place_center_x, place_center_z",
}) })
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
place_on = "default:dirt_with_snow", place_on = {"default:dirt_with_snow", "default:dirt_with_grass"},
sidelen = 16, sidelen = 16,
noise_params = { noise_params = {
--offset = 0.036, --offset = 0.036,
offset = 0.020, offset = 0.020,
scale = 0.022, scale = 0.002,
spread = {x = 250, y = 250, z = 250}, spread = {x = 250, y = 250, z = 250},
seed = 2861, seed = 2861,
octaves = 3, octaves = 3,
persist = 0.66 persist = 0.66
}, },
y_max = 31000, y_max = 31000,
y_min = 40, y_min = 4,
biomes = {"snow_biome_forest"}, biomes = {"snow_biome_forest", "pine_forest"},
schematic = minetest.get_modpath("snow").."/schematics/pine.mts", schematic = minetest.get_modpath("snow").."/schematics/pine.mts",
flags = "place_center_x, place_center_z", flags = "place_center_x, place_center_z",
}) })
@ -117,7 +131,7 @@ minetest.register_decoration({
sidelen = 16, sidelen = 16,
fill_ratio = 0.05, fill_ratio = 0.05,
y_max = 31000, y_max = 31000,
y_min = 60, y_min = 4,
biomes = {"snow_biome_lush"}, biomes = {"snow_biome_lush"},
schematic = minetest.get_modpath("snow").."/schematics/pine.mts", schematic = minetest.get_modpath("snow").."/schematics/pine.mts",
flags = "place_center_x, place_center_z", flags = "place_center_x, place_center_z",
@ -209,7 +223,7 @@ minetest.register_decoration({
decoration = "default:snow", decoration = "default:snow",
}) })
--[[minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = "default:stone", place_on = "default:stone",
sidelen = 16, sidelen = 16,
@ -219,4 +233,3 @@ minetest.register_decoration({
biomes = {"snow_biome_alpine"}, biomes = {"snow_biome_alpine"},
decoration = "default:snow", decoration = "default:snow",
}) })
]]

View File

@ -1,15 +1,14 @@
-- NODES -- NODES
-- Pine Needles -- Pine Needles
--[[local nodedef = { local nodedef = {
description = "Pine Needles", description = "Snow Pine Needles",
drawtype = "allfaces_optional", drawtype = "allfaces_optional",
visual_scale = 1.3, visual_scale = 1.3,
tiles = {"snow_needles.png"}, tiles = {"snow_needles.png"},
waving = 1, waving = 1,
paramtype = "light", paramtype = "light",
groups = {snappy=3}, groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
furnace_burntime = 1,
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
@ -24,23 +23,9 @@
} }
}, },
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
} }
]]--
local nodedef = table.copy(minetest.registered_nodes["default:pine_needles"])
nodedef.tiles = {"snow_needles.png"}
nodedef.drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'snow:sapling_pine'},
rarity = 20,
},
{
items = {'snow:needles'},
}
}
}
--[[ --[[
If christmas_content is enabled, then this next part will override the pine needles' drop code If christmas_content is enabled, then this next part will override the pine needles' drop code
(in the code section above) and adds Xmas tree saplings to the items that are dropped. (in the code section above) and adds Xmas tree saplings to the items that are dropped.
@ -60,7 +45,7 @@ minetest.register_node("snow:needles", table.copy(nodedef))
default.register_leafdecay{ default.register_leafdecay{
trunks = {"default:pine_tree"}, trunks = {"default:pine_tree"},
leaves = {"default:pine_needles", "snow:needles"}, leaves = {"snow:needles", "default:pine_needles"},
radius = 2, radius = 2,
} }
@ -114,10 +99,11 @@ nodedef = {
inventory_image = "snow_sapling_pine.png", inventory_image = "snow_sapling_pine.png",
wield_image = "snow_sapling_pine.png", wield_image = "snow_sapling_pine.png",
paramtype = "light", paramtype = "light",
sunlight_propagates = true,
walkable = false, walkable = false,
groups = {snappy=2,dig_immediate=3}, groups = {snappy=2,dig_immediate=3, flammable = 3,
furnace_burntime = 10, attached_node = 1, sapling = 1},
sounds = default.node_sound_defaults(), sounds = default.node_sound_leaves_defaults(),
} }
-- Pine Sapling -- Pine Sapling