Add files via upload
parent
f9c5878441
commit
b46626d21a
|
@ -0,0 +1,25 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Skandarella
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
Textures and Models by Liil/Wilhelmine/ under (MIT) License (c) 2022
|
||||
|
|
@ -0,0 +1,558 @@
|
|||
minetest.register_node("naturalbiomes:alderswamp_litter", {
|
||||
description = ("Alder Swamp dirt with Grass"),
|
||||
tiles = {"naturalbiomes_alderswamp_litter.png", "naturalbiomes_alderswamp_dirt.png",
|
||||
{name = "naturalbiomes_alderswamp_dirt.png^naturalbiomes_alderswamp_litter_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "naturalbiomes:alderswamp_dirt",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_dirt", {
|
||||
description = ("Alder Swamp Dirt"),
|
||||
tiles = {"naturalbiomes_alderswamp_dirt.png"},
|
||||
groups = {crumbly = 3, soil = 1, falling_node = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "naturalbiomes:alderswamp",
|
||||
node_top = "naturalbiomes:alderswamp_litter",
|
||||
depth_top = 1,
|
||||
node_filler = "naturalbiomes:alderswamp_dirt",
|
||||
depth_filler = 3,
|
||||
node_riverbed = "naturalbiomes:alderswamp_dirt",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "default:cobble",
|
||||
node_dungeon_alt = "default:mossycobble",
|
||||
node_dungeon_stair = "stairs:stair_cobble",
|
||||
y_max = 5,
|
||||
y_min = 0,
|
||||
heat_point = 55,
|
||||
humidity_point = 70,
|
||||
})
|
||||
|
||||
-- alder trunk
|
||||
minetest.register_node("naturalbiomes:alder_trunk", {
|
||||
description = ("Alder Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_alderswamp_alder_trunk_top.png",
|
||||
"naturalbiomes_alderswamp_alder_trunk_top.png",
|
||||
"naturalbiomes_alderswamp_alder_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- alder wood
|
||||
minetest.register_node("naturalbiomes:alder_wood", {
|
||||
description = ("Alder Wood"),
|
||||
tiles = {"naturalbiomes_alderswamp_alder_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:alder_wood 4",
|
||||
recipe = {{"naturalbiomes:alder_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alder_leaves", {
|
||||
description = ("Alder Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_alderswamp_alder_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_alderswamp_alder_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:alder_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:alder_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alder_sapling", {
|
||||
description = ("Alder Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alderswamp_sapling.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_sapling.png",
|
||||
wield_image = "naturalbiomes_alderswamp_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Alder sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:alder_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New alder tree
|
||||
|
||||
function default.grow_new_alder_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_aldertree_0_270.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alderswamp_alder_wood",
|
||||
"naturalbiomes:alder_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_alderswamp_alder_wood.png"},
|
||||
("Alder Stair"),
|
||||
("Alder Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alderswamp_alder_trunk",
|
||||
"naturalbiomes:alder_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_alderswamp_alder_trunk_top.png", "naturalbiomes_alderswamp_alder_trunk_top.png", "naturalbiomes_alderswamp_alder_trunk.png"},
|
||||
("Alder Trunk Stair"),
|
||||
("Alder Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_alder_wood",
|
||||
{
|
||||
description = ("Alder Wood Fence Gate"),
|
||||
texture = "naturalbiomes_alderswamp_alder_wood.png",
|
||||
material = "naturalbiomes:alder_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_alder_wood",
|
||||
{
|
||||
description = ("Alder Fence"),
|
||||
texture = "naturalbiomes_adler_fence_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_alderswamp_alder_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_alderswamp_alder_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:alder_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_alder_wood",
|
||||
{
|
||||
description = ("Alder Fence Rail"),
|
||||
texture = "naturalbiomes_adler_fence_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_alderswamp_alder_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_alderswamp_alder_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:alder_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alder_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.02115,
|
||||
biomes = {"naturalbiomes:alderswamp"},
|
||||
y_max = 5,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_aldertree_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_reed", {
|
||||
description = "Alderswamp reed",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_alderswamp_reeds.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_reeds.png",
|
||||
wield_image = "naturalbiomes_alderswamp_reeds.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alderswamp_reed",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 6,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alderswamp_reed",
|
||||
spawn_by = "naturalbiomes:alderswamp_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_reed", {
|
||||
description = "Alderswamp reed",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_alderswamp_reeds.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_reeds.png",
|
||||
wield_image = "naturalbiomes_alderswamp_reeds.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alderswamp_reed2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 8,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alderswamp_reed2",
|
||||
spawn_by = "naturalbiomes:alderswamp_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_reed2", {
|
||||
description = "Alderswamp reed",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_alderswamp_reeds2.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_reeds2.png",
|
||||
wield_image = "naturalbiomes_alderswamp_reeds2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alderswamp_reed3",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 7,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alderswamp_reed3",
|
||||
spawn_by = "naturalbiomes:alderswamp_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_reed3", {
|
||||
description = "Alderswamp reed",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_alderswamp_reeds3.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_reeds3.png",
|
||||
wield_image = "naturalbiomes_alderswamp_reeds3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alder_log",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0012,
|
||||
scale = 0.0007,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"naturalbiomes:alderswamp"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_alder_log_0_90.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
spawn_by = "naturalbiomes:alderswamp_litter",
|
||||
num_spawn_by = 8,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alder_swamppit",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
place_offset_y = -1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0012,
|
||||
scale = 0.0007,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 3,
|
||||
persist = 2,
|
||||
},
|
||||
biomes = {"naturalbiomes:alderswamp"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_alderswamp_spwamphole_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
spawn_by = "naturalbiomes:alderswamp_litter",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:waterlily",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.12,
|
||||
scale = 0.3,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 33,
|
||||
octaves = 3,
|
||||
persist = 0.7
|
||||
},
|
||||
y_max = 0,
|
||||
y_min = 0,
|
||||
decoration = "naturalbiomes:waterlily",
|
||||
param2 = 0,
|
||||
param2_max = 3,
|
||||
place_offset_y = 1,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:waterlily", {
|
||||
description = ("Waterlily"),
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"naturalbiomes_alderswamp_waterlily.png", "naturalbiomes_alderswamp_waterlily_bottom.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_waterlily.png",
|
||||
wield_image = "naturalbiomes_alderswamp_waterlily.png",
|
||||
use_texture_alpha = "clip",
|
||||
liquids_pointable = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
floodable = true,
|
||||
groups = {snappy = 3, flower = 1, flammable = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
node_placement_prediction = "",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -31 / 64, -0.5, 0.5, -15 / 32, 0.5}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, -15 / 32, 7 / 16}
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
|
||||
if def and def.on_rightclick then
|
||||
return def.on_rightclick(pointed_thing.under, node, placer, itemstack,
|
||||
pointed_thing)
|
||||
end
|
||||
|
||||
if def and def.liquidtype == "source" and
|
||||
minetest.get_item_group(node.name, "water") > 0 then
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
if not minetest.is_protected(pos, player_name) then
|
||||
minetest.set_node(pos, {name = "naturalbiomes:waterlily",
|
||||
param2 = math.random(0, 3)})
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(player_name)) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name, ("Node is protected."))
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
end
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alderswamp_yellowflower",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 7,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alderswamp_yellowflower",
|
||||
spawn_by = "naturalbiomes:alderswamp_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_yellowflower", {
|
||||
description = "Alderswamp flower",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_adler_yellowflower.png"},
|
||||
inventory_image = "naturalbiomes_adler_yellowflower.png",
|
||||
wield_image = "naturalbiomes_adler_yellowflower.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alderswamp_brownreed",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alderswamp_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.1,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 7,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 1,
|
||||
y_min = 0,
|
||||
decoration = "naturalbiomes:alderswamp_brownreed",
|
||||
spawn_by = "naturalbiomes:alderswamp_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_brownreed", {
|
||||
description = "Alderswamp reed",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_alderswamp_reedbrown.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_reedbrown.png",
|
||||
wield_image = "naturalbiomes_alderswamp_reedbrown.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
|
@ -0,0 +1,787 @@
|
|||
minetest.register_node("naturalbiomes:alpine_litter", {
|
||||
description = ("Dirt with Alpine Grass"),
|
||||
tiles = {"naturalbiomes_alpine_litter.png", "naturalbiomes_alpine_rock.png",
|
||||
{name = "naturalbiomes_alpine_rock.png^naturalbiomes_alpine_litter_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "naturalbiomes:alpine_rock",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_rock", {
|
||||
description = ("Alpine Rock"),
|
||||
tiles = {"naturalbiomes_alpine_rock.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = "naturalbiomes:alpine_rock",
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "naturalbiomes:alpine",
|
||||
node_top = "naturalbiomes:alpine_litter",
|
||||
depth_top = 1,
|
||||
node_filler = "naturalbiomes:alpine_rock",
|
||||
depth_filler = 50,
|
||||
node_riverbed = "default:gravel",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "default:stone",
|
||||
node_dungeon_alt = "default:mossycobble",
|
||||
node_dungeon_stair = "stairs:stair_cobble",
|
||||
y_max = 31000,
|
||||
y_min = 40,
|
||||
heat_point = 56,
|
||||
humidity_point = 61,
|
||||
})
|
||||
|
||||
-- Pine1 trunk
|
||||
minetest.register_node("naturalbiomes:alppine1_trunk", {
|
||||
description = ("Pine Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_alpine_pine1_trunk_top.png",
|
||||
"naturalbiomes_alpine_pine1_trunk_top.png",
|
||||
"naturalbiomes_alpine_pine1_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- Pine wood
|
||||
minetest.register_node("naturalbiomes:alppine1_wood", {
|
||||
description = ("Pine Wood"),
|
||||
tiles = {"naturalbiomes_alpine_pine1_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:alppine1_wood 4",
|
||||
recipe = {{"naturalbiomes:allpine1_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alppine1_leaves", {
|
||||
description = ("Pine Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_alpine_pine1_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_alpine_pine1_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:alppine1_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:alppine1_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alppine1_sapling", {
|
||||
description = ("Pine Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_pine1_sapling.png"},
|
||||
inventory_image = "naturalbiomes_alpine_pine1_sapling.png",
|
||||
wield_image = "naturalbiomes_alpine_pine1_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Pine sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:alppine1_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New pine tree
|
||||
|
||||
function default.grow_new_alppine1_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_alpine_pine1_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alpine_pine1_wood",
|
||||
"naturalbiomes:allpine1_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_alpine_pine1_wood.png"},
|
||||
("Pine Stair"),
|
||||
("Pine Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alpine_pine1_trunk",
|
||||
"naturalbiomes:alppine1_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_alpine_pine1_trunk_top.png", "naturalbiomes_alpine_pine1_trunk_top.png", "naturalbiomes_alpine_pine1_trunk.png"},
|
||||
("Pine Trunk Stair"),
|
||||
("Pine Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_alppine1_wood",
|
||||
{
|
||||
description = ("Pine Wood Fence Gate"),
|
||||
texture = "naturalbiomes_alpine_pine1_wood.png",
|
||||
material = "naturalbiomes:alppine1_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_alppine1_wood",
|
||||
{
|
||||
description = ("Pine Fence"),
|
||||
texture = "naturalbiomes_pine_fence_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_alpine_pine1_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_alpine_pine1_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:alppine1_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_alppine1_wood",
|
||||
{
|
||||
description = ("Pine Fence Rail"),
|
||||
texture = "naturalbiomes_pine_fence_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_alpine_pine1_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_alpine_pine1_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:alppine1_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alppine1_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00315,
|
||||
biomes = {"naturalbiomes:alpine"},
|
||||
y_max = 31000,
|
||||
y_min = 40,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_alpine_pine1_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Pine2 trunk
|
||||
minetest.register_node("naturalbiomes:alppine2_trunk", {
|
||||
description = ("Pine Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_alpine_pine2_trunk_top.png",
|
||||
"naturalbiomes_alpine_pine2_trunk_top.png",
|
||||
"naturalbiomes_alpine_pine2_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- Pine2 wood
|
||||
minetest.register_node("naturalbiomes:alppine2_wood", {
|
||||
description = ("Pine Wood"),
|
||||
tiles = {"naturalbiomes_alpine_pine2_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:alppine2_wood 4",
|
||||
recipe = {{"naturalbiomes:alppine2_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alppine2_leaves", {
|
||||
description = ("Pine Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_alpine_pine2_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_alpine_pine2_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:alppine2_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:alppine2_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alppine2_sapling", {
|
||||
description = ("Pine Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_pine2_sapling.png"},
|
||||
inventory_image = "naturalbiomes_alpine_pine2_sapling.png",
|
||||
wield_image = "naturalbiomes_alpine_pine2_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Pine sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:alppine2_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New alppine2 tree
|
||||
|
||||
function default.grow_new_alppine2_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_alpine_pine2_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alpine_pine2_wood",
|
||||
"naturalbiomes:alppine2_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_alpine_pine2_wood.png"},
|
||||
("Pine Stair"),
|
||||
("Pine Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alpine_pine2_trunk",
|
||||
"naturalbiomes:alppine2_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_alpine_pine2_trunk_top.png", "naturalbiomes_alpine_pine2_trunk_top.png", "naturalbiomes_alpine_pine2_trunk.png"},
|
||||
("Pine Trunk Stair"),
|
||||
("Pine Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_alppine2_wood",
|
||||
{
|
||||
description = ("Pine Wood Fence Gate"),
|
||||
texture = "naturalbiomes_alpine_pine2_wood.png",
|
||||
material = "naturalbiomes:alppine2_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_pine2_wood",
|
||||
{
|
||||
description = ("Pine Fence"),
|
||||
texture = "naturalbiomes_pine2_fence_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_alpine_pine2_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_alpine_pine2_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:alppine2_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_pine2_wood",
|
||||
{
|
||||
description = ("Pine Fence Rail"),
|
||||
texture = "naturalbiomes_pine2_fence_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_alpine_pine2_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_alpine_pine2_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:alppine2_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alppine2_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00715,
|
||||
biomes = {"naturalbiomes:alpine"},
|
||||
y_max = 31000,
|
||||
y_min = 40,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_alpine_pine2_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Alpine bush
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_bush",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.01,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 697,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:alpine"},
|
||||
y_max = 31000,
|
||||
y_min = 40,
|
||||
place_offset_y = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_alpine_berrybush_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_bush_leaves_with_berries", {
|
||||
description = ("Alpine Bush Leaves with Berries"),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"default_blueberry_bush_leaves.png^default_blueberry_overlay.png"},
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 3},
|
||||
drop = "default:blueberries",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
node_dig_prediction = "default:blueberry_bush_leaves",
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
minetest.set_node(pos, {name = "default:blueberry_bush_leaves"})
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_bush_leaves", {
|
||||
description = ("Alpine Bush Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"default_blueberry_bush_leaves.png"},
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"default:blueberry_bush_sapling"}, rarity = 5},
|
||||
{items = {"default:blueberry_bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
if minetest.get_node_light(pos) < 11 then
|
||||
minetest.get_node_timer(pos):start(200)
|
||||
else
|
||||
minetest.set_node(pos, {name = "default:blueberry_bush_leaves_with_berries"})
|
||||
end
|
||||
end,
|
||||
|
||||
after_place_node = after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_bush_sapling", {
|
||||
description = ("Alpine Bush Sapling"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"default_blueberry_bush_sapling.png"},
|
||||
inventory_image = "default_blueberry_bush_sapling.png",
|
||||
wield_image = "default_blueberry_bush_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"default:alpine_bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_mushroom",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.04,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 7133,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 40,
|
||||
decoration = "naturalbiomes:alpine_mushroom",
|
||||
spawn_by = "naturalbiomes:alpine_litter",
|
||||
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_mushroom", {
|
||||
description = ("Alpine Mushroom"),
|
||||
tiles = {"naturalbiomes_alpine_mushroom.png"},
|
||||
inventory_image = "naturalbiomes_alpine_mushroom.png",
|
||||
wield_image = "naturalbiomes_alpine_mushroom.png",
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {mushroom = 1, food_mushroom = 1, snappy = 3, attached_node = 1, flammable = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_use = minetest.item_eat(1),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, -2 / 16, 3 / 16},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_grass1",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 6,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alpine_grass1",
|
||||
spawn_by = "naturalbiomes:alpine_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_grass1", {
|
||||
description = "Alpine Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_grass1.png"},
|
||||
inventory_image = "naturalbiomes_alpine_grass1.png",
|
||||
wield_image = "naturalbiomes_alpine_grass1.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_grass2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 8,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alpine_grass2",
|
||||
spawn_by = "naturalbiomes:alpine_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_grass2", {
|
||||
description = "Alpine Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_grass2.png"},
|
||||
inventory_image = "naturalbiomes_alpine_grass2.png",
|
||||
wield_image = "naturalbiomes_alpine_grass2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_grass3",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 7,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alpine_grass3",
|
||||
spawn_by = "naturalbiomes:alpine_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_grass3", {
|
||||
description = "Alpine Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_grass3.png"},
|
||||
inventory_image = "naturalbiomes_alpine_grass3.png",
|
||||
wield_image = "naturalbiomes_alpine_grass3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_dandelion",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 6,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alpine_dandelion",
|
||||
spawn_by = "naturalbiomes:alpine_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_dandelion", {
|
||||
description = "Alpine Dandelion Flower",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_dandelion.png"},
|
||||
inventory_image = "naturalbiomes_alpine_dandelion.png",
|
||||
wield_image = "naturalbiomes_alpine_dandelion.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_edelweiss",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 8,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:alpine_edelweiss",
|
||||
spawn_by = "naturalbiomes:mediterran_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_edelweiss", {
|
||||
description = "Edelweiss Flower",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_edelweiss.png"},
|
||||
inventory_image = "naturalbiomes_alpine_edelweiss.png",
|
||||
wield_image = "naturalbiomes_alpine_edelweiss.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_log",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0012,
|
||||
scale = 0.0007,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"naturalbiomes:alpine"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes__alpine_pine1_log_0_90.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
spawn_by = "naturalbiomes:alpine_litter",
|
||||
num_spawn_by = 4,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:alpine_log2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:alpine_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0012,
|
||||
scale = 0.0007,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"naturalbiomes:alpine"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_alpine_pine2_log_0_90.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
spawn_by = "naturalbiomes:alpine_litter",
|
||||
num_spawn_by = 4,
|
||||
})
|
|
@ -0,0 +1,538 @@
|
|||
minetest.register_node("naturalbiomes:bambooforest_litter", {
|
||||
description = ("Bamboo Forest Litter"),
|
||||
tiles = {"naturalbiomes_bambooforest_litter.png", "naturalbiomes_bambooforest_rock.png",
|
||||
{name = "naturalbiomes_bambooforest_rock.png^naturalbiomes_bambooforest_litter_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "naturalbiomes:bambooforest_rock",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "bambooforest",
|
||||
node_top = "naturalbiomes:bambooforest_litter",
|
||||
depth_top = 2,
|
||||
node_filler = "naturalbiomes:bambooforest_rock",
|
||||
depth_filler = 70,
|
||||
node_riverbed = "default:clay",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "default:cobble",
|
||||
node_dungeon_alt = "default:mossycobble",
|
||||
node_dungeon_stair = "stairs:stair_cobble",
|
||||
y_max = 31000,
|
||||
y_min = 5,
|
||||
heat_point = 89,
|
||||
humidity_point = 77,
|
||||
})
|
||||
|
||||
-- bamboo trunk
|
||||
minetest.register_node("naturalbiomes:bamboo_trunk", {
|
||||
description = ("Bamboo Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_bambooforest_bamboo_trunk_top.png",
|
||||
"naturalbiomes_bambooforest_bamboo_trunk_top.png",
|
||||
"naturalbiomes_bambooforest_bamboo_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- bamboo wood
|
||||
minetest.register_node("naturalbiomes:bamboo_wood", {
|
||||
description = ("Bamboo Wood"),
|
||||
tiles = {"naturalbiomes_bambooforest_bamboo_wood2.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:bamboo_wood 4",
|
||||
recipe = {{"naturalbiomes:bamboo_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:bamboo_leaves", {
|
||||
description = ("Bamboo Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_Bambooforest_bamboo_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_Bambooforest_bamboo_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:bamboo_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:bamboo_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:bamboo_sapling", {
|
||||
description = ("Bamboo Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_bambooforest_bamboo_sapling.png"},
|
||||
inventory_image = "naturalbiomes_bambooforest_bamboo_sapling.png",
|
||||
wield_image = "naturalbiomes_bambooforest_bamboo_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Alder sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:bamboo_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New bamboo tree
|
||||
|
||||
function default.grow_new_bamboo_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_bambootree_large_0_270.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_bambooforest_bamboo_wood2",
|
||||
"naturalbiomes:bamboo_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_bambooforest_bamboo_wood2.png"},
|
||||
("Alder Stair"),
|
||||
("Alder Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_bambooforest_bamboo_trunk",
|
||||
"naturalbiomes:bamboo_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_bambooforest_bamboo_trunk_top.png", "naturalbiomes_bambooforest_bamboo_trunk_top.png", "naturalbiomes_bambooforest_bamboo_trunk.png"},
|
||||
("Bamboo Trunk Stair"),
|
||||
("Bamboo Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_bamboo_wood",
|
||||
{
|
||||
description = ("Bamboo Wood Fence Gate"),
|
||||
texture = "naturalbiomes_bambooforest_bamboo_wood2.png",
|
||||
material = "naturalbiomes:bamboo_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_bamboo_wood",
|
||||
{
|
||||
description = ("Bamboo Fence"),
|
||||
texture = "naturalbiomes_bamboo_fence_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_bambooforest_bamboo_wood2.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_bambooforest_bamboo_wood2.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:bamboo_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_bamboo_wood",
|
||||
{
|
||||
description = ("Bamboo Fence Rail"),
|
||||
texture = "naturalbiomes_bamboo_fence_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_bambooforest_bamboo_wood2.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_bambooforest_bamboo_wood2.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:bamboo_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:bamboo_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:bambooforest_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.02115,
|
||||
biomes = {"naturalbiomes:bambooforest"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_bambootree_large_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:bamboo_tree2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:bambooforest_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.02115,
|
||||
biomes = {"naturalbiomes:bambooforest"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_bambootree_small_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:smallbamboo",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:bambooforest_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.05,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 936,
|
||||
octaves = 3,
|
||||
persist = 0.7
|
||||
},
|
||||
biomes = {"naturalbiomes:bambooforest"},
|
||||
y_max = 31000,
|
||||
y_min = 0,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_bambootree_small_micro_0_270.mts",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:smallbamboo", {
|
||||
description = ("Small Bamboo Grass"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_bambooforest_bamboo_trunksmall.png"},
|
||||
inventory_image = "naturalbiomes_bambooforest_bamboo_trunksmall.png",
|
||||
wield_image = "naturalbiomes_bambooforest_bamboo_trunksmall.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
default.dig_up(pos, node, digger)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:bambooforest_rock", {
|
||||
description = ("Forest Rock"),
|
||||
tiles = {"naturalbiomes_bambooforest_rock.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = "naturalbiomes:bambooforest_rock",
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:bambooforest_groundgrass",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:bambooforest_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 7,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:bambooforest_groundgrass",
|
||||
spawn_by = "naturalbiomes:bambooforest_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:bambooforest_groundgrass", {
|
||||
description = "Babmooforest Gorund Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_bambooforest_groundgrass.png"},
|
||||
inventory_image = "naturalbiomes_bambooforest_groundgrass.png",
|
||||
wield_image = "naturalbiomes_bambooforest_groundgrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:bambooforest_groundgrass2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:bambooforest_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 7,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:bambooforest_groundgrass2",
|
||||
spawn_by = "naturalbiomes:bambooforest_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:bambooforest_groundgrass2", {
|
||||
description = "Babmooforest Gorund Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_bambooforest_groundgrass2.png"},
|
||||
inventory_image = "naturalbiomes_bambooforest_groundgrass2.png",
|
||||
wield_image = "naturalbiomes_bambooforest_groundgrass2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
-- banana trunk
|
||||
minetest.register_node("naturalbiomes:banana_trunk", {
|
||||
description = ("Banana Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes__banana_trunk_top.png",
|
||||
"naturalbiomes__banana_trunk_top.png",
|
||||
"naturalbiomes__banana_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- banana wood
|
||||
minetest.register_node("naturalbiomes:banana_wood", {
|
||||
description = ("Banana Wood"),
|
||||
tiles = {"naturalbiomes__banana_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:banana_wood 4",
|
||||
recipe = {{"naturalbiomes:banana_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:banana_leaves", {
|
||||
description = ("Banana Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes__banana_leaf.png"},
|
||||
special_tiles = {"naturalbiomes__banana_leaf.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:banana_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:banana_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:banana_sapling", {
|
||||
description = ("Banana Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes__banana_tree_sapling.png"},
|
||||
inventory_image = "naturalbiomes__banana_tree_sapling.png",
|
||||
wield_image = "naturalbiomes__banana_tree_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Banana sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:banana_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New banana tree
|
||||
|
||||
function default.grow_new_banana_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_banana_palm_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_banana_wood",
|
||||
"naturalbiomes:banana_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_banana_wood.png"},
|
||||
("Banana Stair"),
|
||||
("Banana Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_banana_trunk",
|
||||
"naturalbiomes:banana_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_banana_trunk_top.png", "naturalbiomes_banana_trunk_top.png", "naturalbiomes_banana_trunk.png"},
|
||||
("Banana Trunk Stair"),
|
||||
("Banana Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_banana_wood",
|
||||
{
|
||||
description = ("Banana Wood Fence Gate"),
|
||||
texture = "naturalbiomes_banana_wood.png",
|
||||
material = "naturalbiomes:banana_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_banana_wood",
|
||||
{
|
||||
description = ("Banana Fence"),
|
||||
texture = "naturalbiomes_banana_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_banana_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_banana_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:banana_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_banana_wood",
|
||||
{
|
||||
description = ("Banana Fence Rail"),
|
||||
texture = "naturalbiomes_banana_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_banana_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_banana_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:banana_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:banana_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:bambooforest_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00515,
|
||||
biomes = {"naturalbiomes:bambooforest"},
|
||||
y_max = 31000,
|
||||
y_min = 5,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_banana_palm_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
|
@ -0,0 +1,199 @@
|
|||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_adler_reed_bundle",
|
||||
"naturalbiomes:reed_bundle",
|
||||
{snappy = 3, oddly_breakable_by_hand = 0, flammable = 0},
|
||||
{"naturalbiomes_adler_reed_bundle.png"},
|
||||
("Reed Bundle Stair"),
|
||||
("Reed Bundle Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alpine_rock_brick",
|
||||
"naturalbiomes:alpine_brick",
|
||||
{cracky = 1, oddly_breakable_by_hand = 0, flammable = 0},
|
||||
{"naturalbiomes_alpine_rock_brick.png"},
|
||||
("Alpine Brick Stair"),
|
||||
("Alpine Brick Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_bambooforest_rock_brick",
|
||||
"naturalbiomes:bamboo_brick",
|
||||
{cracky = 1, oddly_breakable_by_hand = 0, flammable = 0},
|
||||
{"naturalbiomes_bambooforest_rock_brick.png"},
|
||||
("Bamboo Brick Stair"),
|
||||
("Bamboo Brick Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_beach_rock_brick",
|
||||
"naturalbiomes:beach_brick",
|
||||
{cracky = 1, oddly_breakable_by_hand = 0, flammable = 0},
|
||||
{"naturalbiomes_beach_rock_brick.png"},
|
||||
("Beach Brick Stair"),
|
||||
("Beach Brick Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_mediterran_rock_brick",
|
||||
"naturalbiomes:med_brick",
|
||||
{cracky = 1, oddly_breakable_by_hand = 0, flammable = 0},
|
||||
{"naturalbiomes_mediterran_rock_brick.png"},
|
||||
("Med Brick Stair"),
|
||||
("Med Brick Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_outback_rock_brick",
|
||||
"naturalbiomes:outback_brick",
|
||||
{cracky = 1, oddly_breakable_by_hand = 0, flammable = 0},
|
||||
{"naturalbiomes_outback_rock_brick.png"},
|
||||
("Outback Brick Stair"),
|
||||
("Outback Brick Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
walls.register(":naturalbiomes:alpine_brick_wall", "Alpine Brick Wall", "naturalbiomes_alpine_rock_brick.png",
|
||||
"naturalbiomes:alpine_brick_wall", default.node_sound_stone_defaults())
|
||||
|
||||
walls.register(":naturalbiomes:bamboo_brick_wall", "Bambooforest Wall", "naturalbiomes_bambooforest_rock_brick.png",
|
||||
"naturalbiomes:bamboo_brick_wall", default.node_sound_stone_defaults())
|
||||
|
||||
walls.register(":naturalbiomes:med_brick_wall", "Mediterranean Wall", "naturalbiomes_mediterran_rock_brick.png",
|
||||
"naturalbiomes:med_brick_wall", default.node_sound_stone_defaults())
|
||||
|
||||
walls.register(":naturalbiomes:outback_brick_wall", "Outback Wall", "naturalbiomes_outback_rock_brick.png",
|
||||
"naturalbiomes:outback_brick_wall", default.node_sound_stone_defaults())
|
||||
|
||||
walls.register(":naturalbiomes:beach_brick_wall", "Palmbeach Wall", "naturalbiomes_beach_rock_brick.png",
|
||||
"naturalbiomes:beach_brick_wall", default.node_sound_stone_defaults())
|
||||
|
||||
minetest.register_node("naturalbiomes:reed_bundle", {
|
||||
description = ("Reed Bundle"),
|
||||
tiles = {
|
||||
"naturalbiomes_adler_reed_bundle_top.png",
|
||||
"naturalbiomes_adler_reed_bundle_top.png",
|
||||
"naturalbiomes_adler_reed_bundle.png"
|
||||
},
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_brick", {
|
||||
description = ("Alpine Brick"),
|
||||
tiles = {"naturalbiomes_alpine_rock_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:bamboo_brick", {
|
||||
description = ("Bambooforest Brick"),
|
||||
tiles = {"naturalbiomes_bambooforest_rock_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:beach_brick", {
|
||||
description = ("Beach Brick"),
|
||||
tiles = {"naturalbiomes_beach_rock_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_brick", {
|
||||
description = ("Meditteranean Brick"),
|
||||
tiles = {"naturalbiomes_mediterran_rock_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_brick", {
|
||||
description = ("Outback Brick"),
|
||||
tiles = {"naturalbiomes_outback_rock_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:reed_bundle",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:alderswamp_reed", "naturalbiomes:alderswamp_reed", "naturalbiomes:alderswamp_reed", "naturalbiomes:alderswamp_reed"}
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:reed_bundle",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:alderswamp_reed2", "naturalbiomes:alderswamp_reed2", "naturalbiomes:alderswamp_reed2", "naturalbiomes:alderswamp_reed2"}
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:reed_bundle",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:alderswamp_reed3", "naturalbiomes:alderswamp_reed3", "naturalbiomes:alderswamp_reed3", "naturalbiomes:alderswamp_reed3"}
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:alpine_brick",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:alpine_rock", "naturalbiomes:alpine_rock", "naturalbiomes:alpine_rock", "naturalbiomes:alpine_rock"}
|
||||
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:bamboo_brick",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:bambooforest_rock", "naturalbiomes:bambooforest_rock", "naturalbiomes:bambooforest_rock", "naturalbiomes:bambooforest_rock"}
|
||||
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:beach_brick",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:palmbeach_rock", "naturalbiomes:palmbeach_rock", "naturalbiomes:palmbeach_rock", "naturalbiomes:palmbeach_rock"}
|
||||
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:med_brick",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:mediterran_rock", "naturalbiomes:mediterran_rock", "naturalbiomes:mediterran_rock", "naturalbiomes:mediterran_rock"}
|
||||
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:outback_brick",
|
||||
type = "shapeless",
|
||||
recipe =
|
||||
{"naturalbiomes:outback_rock", "naturalbiomes:outback_rock", "naturalbiomes:outback_rock", "naturalbiomes:outback_rock"}
|
||||
|
||||
|
||||
})
|
|
@ -0,0 +1,4 @@
|
|||
default
|
||||
stairs
|
||||
doors
|
||||
hunger_ng?
|
|
@ -0,0 +1 @@
|
|||
Adds 7 new biomes to your Minetest Game world.
|
|
@ -0,0 +1,26 @@
|
|||
if minetest.get_modpath("hunger_ng") ~= nil then
|
||||
hunger_ng.add_hunger_data('naturalbiomes:alpine_mushroom', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
|
||||
hunger_ng.add_hunger_data('naturalbiomes:olives', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
|
||||
hunger_ng.add_hunger_data('naturalbiomes:coconut', {
|
||||
satiates = 3.0,
|
||||
})
|
||||
|
||||
hunger_ng.add_hunger_data('naturalbiomes:coconut_slice', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
|
||||
hunger_ng.add_hunger_data('naturalbiomes:banana', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
|
||||
hunger_ng.add_hunger_data('naturalbiomes:banana_bunch', {
|
||||
satiates = 5.0,
|
||||
})
|
||||
|
||||
end
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
|
||||
local S = minetest.get_translator and minetest.get_translator("naturalbiomes") or
|
||||
dofile(path .. "intllib.lua")
|
||||
|
||||
|
||||
-- biomes
|
||||
|
||||
dofile(path .. "wetsavanna.lua") --
|
||||
dofile(path .. "alderswamp.lua") --
|
||||
dofile(path .. "alpine.lua") --
|
||||
dofile(path .. "bambooforest.lua") --
|
||||
dofile(path .. "palmbeach.lua") --
|
||||
dofile(path .. "outback.lua") --
|
||||
dofile(path .. "mediterranean.lua") --
|
||||
dofile(path .. "crafting.lua") --
|
||||
dofile(path .. "hunger.lua") --
|
|
@ -0,0 +1,3 @@
|
|||
-- Support for the old multi-load method
|
||||
dofile(minetest.get_modpath("intllib").."/init.lua")
|
||||
|
|
@ -0,0 +1,815 @@
|
|||
minetest.register_node("naturalbiomes:mediterran_litter", {
|
||||
description = ("Mediterranean litter with grass"),
|
||||
tiles = {"naturalbiomes_mediterran_litter.png", "default_dirt.png",
|
||||
{name = "default_dirt.png^naturalbiomes_mediterran_litte_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:mediterran_rock", {
|
||||
description = ("Mediterranean Rock"),
|
||||
tiles = {"naturalbiomes_mediterran_rock.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:mediterran_ruin", {
|
||||
description = ("Mediterranean Ruin"),
|
||||
tiles = {"naturalbiomes_mediterran_ruins.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:mediterran_ruin2", {
|
||||
description = ("Mediterranean Ruin Column"),
|
||||
tiles = {"naturalbiomes_mediterran_ruins2.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "naturalbiomes:mediterranean",
|
||||
node_top = "naturalbiomes:mediterran_litter",
|
||||
depth_top = 1,
|
||||
node_filler = "naturalbiomes:mediterran_rock",
|
||||
depth_filler = 50,
|
||||
node_riverbed = "default:gravel",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "default:sandstone",
|
||||
node_dungeon_alt = "default:desert_stonebrick",
|
||||
node_dungeon_stair = "stairs:stair_desert_stone",
|
||||
y_max = 100,
|
||||
y_min = 5,
|
||||
heat_point = 58,
|
||||
humidity_point = 30,
|
||||
})
|
||||
|
||||
-- olive trunk
|
||||
minetest.register_node("naturalbiomes:olive_trunk", {
|
||||
description = ("Olive Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_mediterran_olive_trunk_top.png",
|
||||
"naturalbiomes_mediterran_olive_trunk_top.png",
|
||||
"naturalbiomes_mediterran_olive_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- olive wood
|
||||
minetest.register_node("naturalbiomes:olive_wood", {
|
||||
description = ("Olive Wood"),
|
||||
tiles = {"naturalbiomes_mediterran_olive_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:olive_wood 4",
|
||||
recipe = {{"naturalbiomes:olive_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:olive_leaves", {
|
||||
description = ("Olive Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_mediterran_olive_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_mediterran_olive_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:olive_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:olive_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:olive_sapling", {
|
||||
description = ("Olive Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_olive_sapling.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_olive_sapling.png",
|
||||
wield_image = "naturalbiomes_mediterran_olive_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Olive sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:olive_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New olive tree
|
||||
|
||||
function default.grow_new_olive_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_olive_tree_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_mediterran_olive_wood",
|
||||
"naturalbiomes:olive_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_mediterran_olive_wood.png"},
|
||||
("Olive Stair"),
|
||||
("Olive Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_mediterran_olive_trunk",
|
||||
"naturalbiomes:olive_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_mediterran_olive_trunk_top.png", "naturalbiomes_mediterran_olive_trunk_top.png", "naturalbiomes_mediterran_olive_trunk.png"},
|
||||
("Alder Trunk Stair"),
|
||||
("Alder Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_olive_wood",
|
||||
{
|
||||
description = ("Olive Wood Fence Gate"),
|
||||
texture = "naturalbiomes_mediterran_olive_wood.png",
|
||||
material = "naturalbiomes:olive_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_olive_wood",
|
||||
{
|
||||
description = ("Olive Fence"),
|
||||
texture = "naturalbiomes_olive_fence_woode.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_mediterran_olive_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_mediterran_olive_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:olive_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_olive_wood",
|
||||
{
|
||||
description = ("Olive Fence Rail"),
|
||||
texture = "naturalbiomes_olive_fence_woode.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_mediterran_olive_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_mediterran_olive_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:olive_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:olive_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
place_offset_y = -2,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00105,
|
||||
biomes = {"naturalbiomes:mediterranean"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_olive_tree_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
-- pine trunk
|
||||
minetest.register_node("naturalbiomes:pine_trunk", {
|
||||
description = ("Pine Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_mediterran_pine_trunk_top.png",
|
||||
"naturalbiomes_mediterran_pine_trunk_top.png",
|
||||
"naturalbiomes_mediterran_pine_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- pine wood
|
||||
minetest.register_node("naturalbiomes:pine_wood", {
|
||||
description = ("Pine Wood"),
|
||||
tiles = {"naturalbiomes_mediterran_pine_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:pine_wood 4",
|
||||
recipe = {{"naturalbiomes:pine_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:pine_leaves", {
|
||||
description = ("Pine Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_mediterran_pine_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_mediterran_pine_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:pine_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:pine_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:pine_sapling", {
|
||||
description = ("Pine Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_pine_sapling.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_pine_sapling.png",
|
||||
wield_image = "naturalbiomes_mediterran_pine_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Pine sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:pine_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New pine tree
|
||||
|
||||
function default.grow_new_pine_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_med_pinetree_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_mediterran_pine_wood",
|
||||
"naturalbiomes:pine_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_mediterran_pine_wood.png"},
|
||||
("Pine Stair"),
|
||||
("Pine Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_mediterran_pine_trunk",
|
||||
"naturalbiomes:pine_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_mediterran_pine_trunk_top.png", "naturalbiomes_mediterran_pine_trunk_top.png", "naturalbiomes_mediterran_pine_wood.png"},
|
||||
("Pine Trunk Stair"),
|
||||
("Pine Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_pine_wood",
|
||||
{
|
||||
description = ("Pine Wood Fence Gate"),
|
||||
texture = "naturalbiomes_mediterran_pine_wood.png",
|
||||
material = "naturalbiomes:pine_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_pine_wood",
|
||||
{
|
||||
description = ("Pine Fence"),
|
||||
texture = "naturalbiomes_medpine_fence_woode.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_mediterran_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_mediterran_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:pine_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_pine_wood",
|
||||
{
|
||||
description = ("Pine Fence Rail"),
|
||||
texture = "naturalbiomes_medpine_fence_woode.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_mediterran_pine_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_mediterran_pine_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:pine_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:pine_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00115,
|
||||
biomes = {"naturalbiomes:mediterranean"},
|
||||
y_max = 31,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_med_pinetree_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:pine_treesmall",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00105,
|
||||
biomes = {"naturalbiomes:mediterranean"},
|
||||
y_max = 31,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_med_pinetree_small_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Cypress Bush
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_bush",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.02,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3876,
|
||||
octaves = 3,
|
||||
persist = 0.4,
|
||||
},
|
||||
biomes = {"naturalbiomes:mediterranean"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_cypress_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_bush_stem", {
|
||||
description = ("Cypress Bush Stem"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.41,
|
||||
tiles = {"naturalbiomes_mediterran_cypress_stem.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_cypress_stem.png",
|
||||
wield_image = "naturalbiomes_mediterran_cypress_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_bush_leaves", {
|
||||
description = ("Cypress Bush Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"naturalbiomes_mediterran_cypress_leavese.png"},
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"naturalbiomes:med_bush_sapling"}, rarity = 5},
|
||||
{items = {"naturalbiomes:med_bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_bush_sapling", {
|
||||
description = ("Cypress Bush Sapling"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_mediterran_cypress_stem.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_cypress_stem.png",
|
||||
wield_image = "naturalbiomes_mediterran_cypress_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:med_bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_flower1",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:mediterranean_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 6,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:med_flower1",
|
||||
spawn_by = "naturalbiomes:mediterran_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_flower1", {
|
||||
description = "Mediterranean Flower",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_flower1.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_flower1.png",
|
||||
wield_image = "naturalbiomes_mediterran_flower1.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_flower2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 8,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:med_flower2",
|
||||
spawn_by = "naturalbiomes:mediterran_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_flower2", {
|
||||
description = "Mediterranean Flower",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_flower2.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_flower2.png",
|
||||
wield_image = "naturalbiomes_mediterran_flower2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_flower3",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 7,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:med_flower3",
|
||||
spawn_by = "naturalbiomes:mediterran_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_flower3", {
|
||||
description = "Mediterranean Flower",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_flower3.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_flower3.png",
|
||||
wield_image = "naturalbiomes_mediterran_flower3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_grass1",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.15,
|
||||
spread = {x = 300, y = 300, z = 300},
|
||||
seed = 4602,
|
||||
octaves = 6,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:med_grass1",
|
||||
spawn_by = "naturalbiomes:mediterran_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_grass1", {
|
||||
description = "Mediterranean Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_grass.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_grass.png",
|
||||
wield_image = "naturalbiomes_mediterran_grass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_grass2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.15,
|
||||
spread = {x = 300, y = 300, z = 300},
|
||||
seed = 4602,
|
||||
octaves = 8,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:med_grass2",
|
||||
spawn_by = "naturalbiomes:mediterran_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:med_grass2", {
|
||||
description = "Mediterranean Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_grass2.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_grass2.png",
|
||||
wield_image = "naturalbiomes_mediterran_grass2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_ruin1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.008,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 1,
|
||||
persist = 0.1,
|
||||
},
|
||||
biomes = {"naturalbiomes:mediterranean"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_medruin1_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_ruin2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.008,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 1,
|
||||
persist = 0.1,
|
||||
},
|
||||
biomes = {"naturalbiomes:mediterranean"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_medruin2_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_ruin3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:mediterran_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.008,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 1,
|
||||
persist = 0.1,
|
||||
},
|
||||
biomes = {"naturalbiomes:mediterranean"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_medruin3_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Olives
|
||||
minetest.register_node("naturalbiomes:olives", {
|
||||
description = ("Fresh Olives"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes__fresholives.png"},
|
||||
inventory_image = "naturalbiomes__fresholives.png",
|
||||
wield_image = "naturalbiomes__fresholives.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
|
||||
},
|
||||
groups = {
|
||||
fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 1, leafdecay_drop = 1
|
||||
},
|
||||
drop = "naturalbiomes:olives",
|
||||
on_use = minetest.item_eat(6),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "naturalbiomes:olives", param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
|
@ -0,0 +1,680 @@
|
|||
minetest.register_node("naturalbiomes:outback_litter", {
|
||||
description = ("Outback ground with grass"),
|
||||
tiles = {"naturalbiomes_outbacklitter.png", "naturalbiomes_outback_ground.png",
|
||||
{name = "naturalbiomes_outback_ground.png^naturalbiomes_outbacklitter_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "naturalbiomes:outback_ground",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_rock", {
|
||||
description = ("Outback Rock"),
|
||||
tiles = {"naturalbiomes_outback_rock.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_ground", {
|
||||
description = ("Outback Ground Sand"),
|
||||
tiles = {"naturalbiomes_outback_ground.png"},
|
||||
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "naturalbiomes:outback",
|
||||
node_top = "naturalbiomes:outback_litter",
|
||||
depth_top = 1,
|
||||
node_filler = "naturalbiomes:outback_ground",
|
||||
depth_filler = 50,
|
||||
node_riverbed = "default:clay",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "default:sandstone",
|
||||
node_dungeon_alt = "default:desert_stonebrick",
|
||||
node_dungeon_stair = "stairs:stair_desert_stone",
|
||||
y_max = 40,
|
||||
y_min = 3,
|
||||
heat_point = 82,
|
||||
humidity_point = 32,
|
||||
})
|
||||
|
||||
-- outback trunk
|
||||
minetest.register_node("naturalbiomes:outback_trunk", {
|
||||
description = ("Outback Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_outbackeukalyptus_trunk_top.png",
|
||||
"naturalbiomes_outbackeukalyptus_trunk_top.png",
|
||||
"naturalbiomes_outbackeucalyptus_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- outback wood
|
||||
minetest.register_node("naturalbiomes:outback_wood", {
|
||||
description = ("Outback Wood"),
|
||||
tiles = {"naturalbiomes_outback_eukalyptus_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:outback_wood 4",
|
||||
recipe = {{"naturalbiomes:outback_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_leaves", {
|
||||
description = ("Outback Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_outbackeukalyptus_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_outbackeukalyptus_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:outback_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:outback_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_sapling", {
|
||||
description = ("Outback Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_outbackeukaplyptus_sapling.png"},
|
||||
inventory_image = "naturalbiomes_outbackeukaplyptus_sapling.png",
|
||||
wield_image = "naturalbiomes_outbackeukaplyptus_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Alder sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:outback_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New outback tree
|
||||
|
||||
function default.grow_new_outback_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_outback_tree1_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_outback_eukalyptus_wood",
|
||||
"naturalbiomes:outback_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_outback_eukalyptus_wood.png"},
|
||||
("Outback Stair"),
|
||||
("Outback Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_outbackeucalyptus_trunk",
|
||||
"naturalbiomes:outback_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_outbackeukalyptus_trunk_top.png", "naturalbiomes_outbackeukalyptus_trunk_top.png", "naturalbiomes_outbackeucalyptus_trunk.png"},
|
||||
("Alder Trunk Stair"),
|
||||
("Alder Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_outback_wood",
|
||||
{
|
||||
description = ("Outback Wood Fence Gate"),
|
||||
texture = "naturalbiomes_outback_eukalyptus_wood.png",
|
||||
material = "naturalbiomes:outback_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_outback_wood",
|
||||
{
|
||||
description = ("Outback Fence"),
|
||||
texture = "naturalbiomes_eukalyptus_fence_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_outback_eukalyptus_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_outback_eukalyptus_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:outback_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_outback_wood",
|
||||
{
|
||||
description = ("Outback Fence Rail"),
|
||||
texture = "naturalbiomes_eukalyptus_fence_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_outback_eukalyptus_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_outback_eukalyptus_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:outback_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00115,
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_outback_tree1_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_tree2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00115,
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_outback_tree2_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_log",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0002,
|
||||
scale = 0.0005,
|
||||
spread = {x = 550, y = 550, z = 550},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
persist = 0.36
|
||||
},
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_outback_log_0_90.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
spawn_by = "naturalbiomes:outback_litter",
|
||||
num_spawn_by = 2,
|
||||
})
|
||||
|
||||
-- Outback Bush
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_bush",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.01,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 391,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_outback_bush_small2_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_bush_stem", {
|
||||
description = ("Outback Bush Stem"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.41,
|
||||
tiles = {"naturalbiomes_outback_bush_stem.png"},
|
||||
inventory_image = "naturalbiomes_outback_bush_stem.png",
|
||||
wield_image = "naturalbiomes_outback_bush_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_bush_leaves", {
|
||||
description = ("Outback Bush Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"naturalbiomes_outbackbush_leaves.png"},
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"naturalbiomes:outback_bush_sapling"}, rarity = 5},
|
||||
{items = {"naturalbiomes:outback_bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_bush_sapling", {
|
||||
description = ("Outback Bush Sapling"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_outback_bush_stem.png"},
|
||||
inventory_image = "naturalbiomes_outback_bush_stem.png",
|
||||
wield_image = "naturalbiomes_outback_bush_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:outback_bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_grass",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 8,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:outback_grass",
|
||||
spawn_by = "naturalbiomes:outback_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_grass", {
|
||||
description = "Outback Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_outbackgrass.png"},
|
||||
inventory_image = "naturalbiomes_outbackgrass.png",
|
||||
wield_image = "naturalbiomes_outbackgrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_grass2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 500, y = 500, z = 500},
|
||||
seed = 687,
|
||||
octaves = 3,
|
||||
persist = 2,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:outback_grass2",
|
||||
spawn_by = "naturalbiomes:outback_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_grass2", {
|
||||
description = "Outback Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_outbackgrass2.png"},
|
||||
inventory_image = "naturalbiomes_outbackgrass2.png",
|
||||
wield_image = "naturalbiomes_outbackgrass2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_grass3",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 500, y = 500, z = 500},
|
||||
seed = 6072,
|
||||
octaves = 2,
|
||||
persist = 3,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:outback_grass3",
|
||||
spawn_by = "naturalbiomes:outback_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_grass3", {
|
||||
description = "Outback Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_outbackgrass3.png"},
|
||||
inventory_image = "naturalbiomes_outbackgrass3.png",
|
||||
wield_image = "naturalbiomes_outbackgrass3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_grass4",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.15,
|
||||
spread = {x = 500, y = 500, z = 500},
|
||||
seed = 457,
|
||||
octaves = 3,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:outback_grass4",
|
||||
spawn_by = "naturalbiomes:outback_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_grass4", {
|
||||
description = "Outback Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_outbackgrass4.png"},
|
||||
inventory_image = "naturalbiomes_outbackgrass4.png",
|
||||
wield_image = "naturalbiomes_outbackgrass4.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_grass5",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 4602,
|
||||
octaves = 6,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:outback_grass5",
|
||||
spawn_by = "naturalbiomes:outback_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_grass5", {
|
||||
description = "Outback Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.15,
|
||||
spread = {x = 500, y = 500, z = 500},
|
||||
seed = 457,
|
||||
octaves = 3,
|
||||
persist = 1,
|
||||
},
|
||||
tiles = {"naturalbiomes_outbackgrass5.png"},
|
||||
inventory_image = "naturalbiomes_outbackgrass5.png",
|
||||
wield_image = "naturalbiomes_outbackgrass5.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_grass6",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 5,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:outback_grass6",
|
||||
spawn_by = "naturalbiomes:outback_litter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_grass6", {
|
||||
description = "Outback Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_outbackgrass6.png"},
|
||||
inventory_image = "naturalbiomes_outbackgrass6.png",
|
||||
wield_image = "naturalbiomes_outbackgrass6.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_rockformation1", {
|
||||
description = ("Outback Rock Formation"),
|
||||
tiles = {"naturalbiomes_beach_rock.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = "naturalbiomes:palmbeach_rock",
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_rockformation1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = -1,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_outback_rock1_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_rockformation2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = -2,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_outback_rock2_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_rockformation3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = -3,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00005,
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_outback_rock3_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
-- Outback Bush 3
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_bush2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:outback_litter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.01,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 391,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:outback"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_outback_bush2_0_90.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
|
@ -0,0 +1,652 @@
|
|||
minetest.register_node("naturalbiomes:palmbeach_sand", {
|
||||
description = ("Beach Sand"),
|
||||
tiles = {"naturalbiomes_beach_sand.png"},
|
||||
groups = {crumbly = 3, soil = 1, falling_node = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "naturalbiomes:palmbeach",
|
||||
node_top = "naturalbiomes:palmbeach_sand",
|
||||
depth_top = 3,
|
||||
node_filler = "default:sandstone",
|
||||
depth_filler = 5,
|
||||
node_riverbed = "naturalbiomes:palmbeach_sand",
|
||||
depth_riverbed = 3,
|
||||
node_dungeon = "default:cobble",
|
||||
node_dungeon_alt = "default:sandstonebrick",
|
||||
node_dungeon_stair = "stairs:stair_sandstone",
|
||||
y_max = 5,
|
||||
y_min = -1,
|
||||
heat_point = 86,
|
||||
humidity_point = 78,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:palmbeach_rock", {
|
||||
description = ("Beach Rock"),
|
||||
tiles = {"naturalbiomes_beach_rock.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = "naturalbiomes:palmbeach_rock",
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:beach_rock",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
place_offset_y = -1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.02,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:palmbeach"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_beachrock_large_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:beach_rock2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.02,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:palmbeach"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_beachrock_small_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
flags = "force_placement",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:beach_rock3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
place_offset_y = -2,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.02,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:palmbeach"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_beachrock_medium2_0_180.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:beach_rock4",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
place_offset_y = -2,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.02,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:palmbeach"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_beachrock_medium_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
|
||||
-- palm trunk
|
||||
minetest.register_node("naturalbiomes:palm_trunk", {
|
||||
description = ("Palm Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_savannapalm_trunk_top.png",
|
||||
"naturalbiomes_savannapalm_trunk_top.png",
|
||||
"naturalbiomes_savannapalm_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- palm wood
|
||||
minetest.register_node("naturalbiomes:palm_wood", {
|
||||
description = ("Palm Wood"),
|
||||
tiles = {"naturalbiomes_savannapalm_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:palm_wood 4",
|
||||
recipe = {{"naturalbiomes:palm_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:palm_leaves", {
|
||||
description = ("Palm Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_savannapalm_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_savannapalm_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:palm_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:palm_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:palm_sapling", {
|
||||
description = ("Palm Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_savannapalm_sapling.png"},
|
||||
inventory_image = "naturalbiomes_savannapalm_sapling.png",
|
||||
wield_image = "naturalbiomes_savannapalm_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Palm sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:palm_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New palm tree
|
||||
|
||||
function default.grow_new_palm_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_cocopalm_tree_0_270.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_savannapalm_wood",
|
||||
"naturalbiomes:palm_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_savannapalm_wood.png"},
|
||||
("Palm Stair"),
|
||||
("Palm Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_savannapalm_trunk",
|
||||
"naturalbiomes:palm_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_savannapalm_trunk_top.png", "naturalbiomes_savannapalm_trunk_top.png", "naturalbiomes_savannapalm_trunk.png"},
|
||||
("Palm Trunk Stair"),
|
||||
("Palm Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_palm_wood",
|
||||
{
|
||||
description = ("Palm Wood Fence Gate"),
|
||||
texture = "naturalbiomes_savannapalm_wood.png",
|
||||
material = "naturalbiomes:palm_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_palm_wood",
|
||||
{
|
||||
description = ("Palm Fence"),
|
||||
texture = "naturalbiomes_palm_fence_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_savannapalm_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_savannapalm_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:palm_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_palm_wood",
|
||||
{
|
||||
description = ("Palm Fence Rail"),
|
||||
texture = "naturalbiomes_palm_fence_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_savannapalm_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_savannapalm_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:palm_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:palm_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.01115,
|
||||
biomes = {"naturalbiomes:palmbeach"},
|
||||
y_max = 5,
|
||||
y_min = 2,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_cocopalm_tree_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Beach Bush
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:beach_bush",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.06,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"naturalbiomes:palmbeach"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_beach_bush_0_270.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:beach_bush_stem", {
|
||||
description = ("Beach Bush Stem"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.41,
|
||||
tiles = {"naturalbiomes_beach_bush_stem.png"},
|
||||
inventory_image = "naturalbiomes_beach_bush_stem.png",
|
||||
wield_image = "naturalbiomes_beach_bush_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:beach_bush_leaves", {
|
||||
description = ("Beach Bush Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"naturalbiomes_beach_bush_leaves.png"},
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"naturalbiomes:beach_bush_sapling"}, rarity = 5},
|
||||
{items = {"naturalbiomes:beach_bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:beach_bush_sapling", {
|
||||
description = ("Beach Bush Sapling"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_beach_bush_stem.png"},
|
||||
inventory_image = "naturalbiomes_beach_bush_stem.png",
|
||||
wield_image = "naturalbiomes_beach_bush_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:beach_bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:palmbeach_grass1",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 1987,
|
||||
octaves = 3,
|
||||
persist = 2,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 2,
|
||||
decoration = "naturalbiomes:palmbeach_grass1",
|
||||
spawn_by = "naturalbiomes:palmbeach_sand"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:palmbeach_grass1", {
|
||||
description = "Palmbeach Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_beach_grass.png"},
|
||||
inventory_image = "naturalbiomes_beach_grass.png",
|
||||
wield_image = "naturalbiomes_beach_grass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:palmbeach_grass2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 834,
|
||||
octaves = 3,
|
||||
persist = 2,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 2,
|
||||
decoration = "naturalbiomes:palmbeach_grass2",
|
||||
spawn_by = "naturalbiomes:palmbeach_sand"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:palmbeach_grass2", {
|
||||
description = "Palmbeach Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_beach_grass2.png"},
|
||||
inventory_image = "naturalbiomes_beach_grass2.png",
|
||||
wield_image = "naturalbiomes_beach_grass2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:palmbeach_grass3",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:palmbeach_sand"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 834,
|
||||
octaves = 3,
|
||||
persist = 2,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 2,
|
||||
decoration = "naturalbiomes:palmbeach_grass3",
|
||||
spawn_by = "naturalbiomes:palmbeach:_sand"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:palmbeach_grass3", {
|
||||
description = "Palmbeach Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_beach_grass3.png"},
|
||||
inventory_image = "naturalbiomes_beach_grass3.png",
|
||||
wield_image = "naturalbiomes_beach_grass3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
-- Banana Bunch
|
||||
minetest.register_node("naturalbiomes:banana_bunch", {
|
||||
description = ("Banana Bunch"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_banana_bunch.png"},
|
||||
inventory_image = "naturalbiomes_banana_bunch.png",
|
||||
wield_image = "naturalbiomes_banana_bunch.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
|
||||
},
|
||||
groups = {
|
||||
fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 1, leafdecay_drop = 1
|
||||
},
|
||||
drop = "naturalbiomes:banana_bunch",
|
||||
on_use = minetest.item_eat(6),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "naturalbiomes:banana_bunch", param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Bunch to Single
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "naturalbiomes:banana 3",
|
||||
recipe = {"naturalbiomes:banana_bunch"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "naturalbiomes:banana_bunch",
|
||||
recipe = {"naturalbiomes:banana", "naturalbiomes:banana", "naturalbiomes:banana"}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:banana", {
|
||||
description = ("Banana"),
|
||||
drawtype = "torchlike",
|
||||
tiles = {"naturalbiomes_banana_single.png"},
|
||||
inventory_image = "naturalbiomes_banana_single.png",
|
||||
wield_image = "naturalbiomes_banana_single.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
|
||||
},
|
||||
groups = {
|
||||
food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 1, leafdecay_drop = 1
|
||||
},
|
||||
drop = "naturalbiomes:banana",
|
||||
on_use = minetest.item_eat(2),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "naturalbiomes:banana", param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:coconut_slice", {
|
||||
description = ("Coconut Slice"),
|
||||
drawtype = "torchlike",
|
||||
tiles = {"naturalbiomes_coconut_slice.png"},
|
||||
inventory_image = "naturalbiomes_coconut_slice.png",
|
||||
wield_image = "naturalbiomes_coconut_slice.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
|
||||
},
|
||||
groups = {
|
||||
food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 1, leafdecay_drop = 1
|
||||
},
|
||||
drop = "naturalbiomes:naturalbiomes:coconut_slice",
|
||||
on_use = minetest.item_eat(2),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "naturalbiomes:coconut_slice", param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Coco
|
||||
minetest.register_node("naturalbiomes:coconut", {
|
||||
description = ("Coconut"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_coconut.png"},
|
||||
inventory_image = "naturalbiomes_coconut.png",
|
||||
wield_image = "naturalbiomes_coconut.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
|
||||
},
|
||||
groups = {
|
||||
fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 1, leafdecay_drop = 1
|
||||
},
|
||||
drop = "naturalbiomes:coconut",
|
||||
on_use = minetest.item_eat(6),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "naturalbiomes:coconut", param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Bunch to Single
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "naturalbiomes:coconut_bunch",
|
||||
recipe = {"naturalbiomes:coconut_slice", "naturalbiomes:coconut_slice", "naturalbiomes:coconut_slice"}
|
||||
})
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 899 KiB |
|
@ -0,0 +1,431 @@
|
|||
minetest.register_node("naturalbiomes:savannalitter", {
|
||||
description = ("Wet Savanna dirt with Grass"),
|
||||
tiles = {"naturalbiomes_savannalitter.png", "default_dirt.png",
|
||||
{name = "default_dirt.png^naturalbiomes_savannalitter_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "naturalbiomes:wetsavanna",
|
||||
node_top = "naturalbiomes:savannalitter",
|
||||
depth_top = 1,
|
||||
node_filler = "default:dirt",
|
||||
depth_filler = 3,
|
||||
node_riverbed = "default:clay",
|
||||
depth_riverbed = 2,
|
||||
node_dungeon = "default:cobble",
|
||||
node_dungeon_alt = "default:mossycobble",
|
||||
node_dungeon_stair = "stairs:stair_cobble",
|
||||
y_max = 31000,
|
||||
y_min = 5,
|
||||
heat_point = 65,
|
||||
humidity_point = 40,
|
||||
})
|
||||
|
||||
-- acacia trunk
|
||||
minetest.register_node("naturalbiomes:acacia_trunk", {
|
||||
description = ("Acacia Trunk"),
|
||||
tiles = {
|
||||
"naturalbiomes_savannaacaia_trunk_top.png",
|
||||
"naturalbiomes_savannaacaia_trunk_top.png",
|
||||
"naturalbiomes_savannaacacia_trunk.png"
|
||||
},
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
-- acacia wood
|
||||
minetest.register_node("naturalbiomes:acacia_wood", {
|
||||
description = ("Acacia Wood"),
|
||||
tiles = {"naturalbiomes_savannaacacia_wood.png"},
|
||||
is_ground_content = false,
|
||||
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "naturalbiomes:acacia_wood 4",
|
||||
recipe = {{"naturalbiomes:acacia_trunk"}}
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:acacia_leaves", {
|
||||
description = ("Acacia Leaves"),
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"naturalbiomes_savannaacacia_leaves.png"},
|
||||
special_tiles = {"naturalbiomes_savannaacacia_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/50 chance
|
||||
items = {'naturalbiomes:acacia_sapling'},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'naturalbiomes:acacia_leaves'},
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:acacia_sapling", {
|
||||
description = ("Acacia Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_savannaacaia_sapling.png"},
|
||||
inventory_image = "naturalbiomes_savannaacaia_sapling.png",
|
||||
wield_image = "naturalbiomes_savannaacaia_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Acacia sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:acacia_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New acacia tree
|
||||
|
||||
function default.grow_new_acacia_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_acaciatree_0_180.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_savannaacacia_wood",
|
||||
"naturalbiomes:acacia_wood",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_savannaacacia_wood.png"},
|
||||
("Acacia Stair"),
|
||||
("Acacia Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_savannaacacia_trunk",
|
||||
"naturalbiomes:acacia_trunk",
|
||||
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
||||
{"naturalbiomes_savannaacaia_trunk_top.png", "naturalbiomes_savannaacaia_trunk_top.png", "naturalbiomes_savannaacacia_trunk.png"},
|
||||
("Acacia Trunk Stair"),
|
||||
("Acacia Trunk Slab"),
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
doors.register_fencegate(
|
||||
"naturalbiomes:gate_acacia_wood",
|
||||
{
|
||||
description = ("Acacia Wood Fence Gate"),
|
||||
texture = "naturalbiomes_savannaacacia_wood.png",
|
||||
material = "naturalbiomes:acacia_wood",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
default.register_fence(
|
||||
"naturalbiomes:fence_acacia_wood",
|
||||
{
|
||||
description = ("Acacia Fence"),
|
||||
texture = "naturalbiomes_acacia_fence_wood.png",
|
||||
inventory_image = "default_fence_overlay.png^naturalbiomes_savannaacacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_overlay.png^naturalbiomes_savannaacacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:acacia_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
default.register_fence_rail(
|
||||
"naturalbiomes:fence_rail_acacia_wood",
|
||||
{
|
||||
description = ("Acacia Fence Rail"),
|
||||
texture = "naturalbiomes_acacia_fence_wood.png",
|
||||
inventory_image = "default_fence_rail_overlay.png^naturalbiomes_savannaacacia_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
wield_image = "default_fence_rail_overlay.png^naturalbiomes_savannaacacia_wood.png^" ..
|
||||
"default_fence_rail_overlay.png^[makealpha:255,126,126",
|
||||
material = "naturalbiomes:acacia_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:acacia_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:savannalitter"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00215,
|
||||
biomes = {"naturalbiomes:wetsavanna"},
|
||||
y_max = 31000,
|
||||
y_min = 2,
|
||||
schematic = minetest.get_modpath("naturalbiomes").."/schematics/naturalbiomes_acaciatree_0_180.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:savannagras",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:savannalitter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.006,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 436,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"naturalbiomes:wetsavanna"},
|
||||
y_max = 31000,
|
||||
y_min = 0,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_savannagrass1_0_90.mts",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:savannagrass", {
|
||||
description = ("Savanna Grass"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_savannagrass.png"},
|
||||
inventory_image = "naturalbiomes_savannagrass.png",
|
||||
wield_image = "naturalbiomes_savannagrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
default.dig_up(pos, node, digger)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:savannagrassmall",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:savannalitter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.006,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 436,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"naturalbiomes:wetsavanna"},
|
||||
y_max = 31000,
|
||||
y_min = 0,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_savannagrass2_0_90.mts",
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:savannagrasssmall", {
|
||||
description = ("Savanna Grass"),
|
||||
drawtype = "plantlike",
|
||||
tiles = {"naturalbiomes_savannagrass.png"},
|
||||
inventory_image = "naturalbiomes_savannagrass.png",
|
||||
wield_image = "naturalbiomes_savannagrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
default.dig_up(pos, node, digger)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:savanna_flowergrass",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:savannalitter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 3602,
|
||||
octaves = 5,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:savanna_flowergrass",
|
||||
spawn_by = "naturalbiomes:savannalitter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:savanna_flowergrass", {
|
||||
description = "Savanna Flowergrass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 2.0,
|
||||
tiles = {"naturalbiomes_savannagrasssmall.png"},
|
||||
inventory_image = "naturalbiomes_savannagrasssmall.png",
|
||||
wield_image = "naturalbiomes_savannagrasssmall.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:savanna_grass2",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:savannalitter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 1987,
|
||||
octaves = 3,
|
||||
persist = 2,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:savanna_grass2",
|
||||
spawn_by = "naturalbiomes:savannalitter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:savanna_grass2", {
|
||||
description = "Savanna Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_savannagrass2.png"},
|
||||
inventory_image = "naturalbiomes_savannagrass2.png",
|
||||
wield_image = "naturalbiomes_savannagrass2.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:savanna_grass3",
|
||||
deco_type = "simple",
|
||||
place_on = {"naturalbiomes:savannalitter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.03,
|
||||
scale = 0.1,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 834,
|
||||
octaves = 3,
|
||||
persist = 2,
|
||||
},
|
||||
y_max = 30000,
|
||||
y_min = 1,
|
||||
decoration = "naturalbiomes:savanna_grass3",
|
||||
spawn_by = "naturalbiomes:savannalitter"
|
||||
})
|
||||
|
||||
minetest.register_node("naturalbiomes:savanna_grass3", {
|
||||
description = "Savanna Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_savannagrass3.png"},
|
||||
inventory_image = "naturalbiomes_savannagrass3.png",
|
||||
wield_image = "naturalbiomes_savannagrass3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flower = 1, flora = 1, attached_node = 1, flammable = 1, beautiflowers = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0.0, 4 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:acacia_log",
|
||||
deco_type = "schematic",
|
||||
place_on = {"naturalbiomes:savannalitter"},
|
||||
place_offset_y = 1,
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.0012,
|
||||
scale = 0.0007,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 2,
|
||||
octaves = 3,
|
||||
persist = 0.66
|
||||
},
|
||||
biomes = {"naturalbiomes:wetsavanna"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
schematic = minetest.get_modpath("naturalbiomes") .. "/schematics/naturalbiomes_acacia_log_0_90.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
spawn_by = "naturalbiomes:savannalitter",
|
||||
num_spawn_by = 8,
|
||||
})
|
Loading…
Reference in New Issue