Minimal: Add snow biome and jungleleaves nodes. Add mapgen aliases
Treegen: Remove alias checks from jungletree generation for speed
@ -834,7 +834,6 @@ minetest.register_node("default:leaves", {
|
|||||||
visual_scale = 1.3,
|
visual_scale = 1.3,
|
||||||
tiles ={"default_leaves.png"},
|
tiles ={"default_leaves.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
@ -854,6 +853,17 @@ minetest.register_node("default:leaves", {
|
|||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:jungleleaves", {
|
||||||
|
description = "Jungle Leaves",
|
||||||
|
drawtype = "allfaces_optional",
|
||||||
|
waving = 1,
|
||||||
|
visual_scale = 1.3,
|
||||||
|
tiles = {"default_jungleleaves.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_node("default:cactus", {
|
minetest.register_node("default:cactus", {
|
||||||
description = "Cactus",
|
description = "Cactus",
|
||||||
tiles ={"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
|
tiles ={"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
|
||||||
@ -976,6 +986,7 @@ minetest.register_node("default:water_flowing", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
is_ground_content = false,
|
||||||
drowning = 1,
|
drowning = 1,
|
||||||
liquidtype = "flowing",
|
liquidtype = "flowing",
|
||||||
liquid_alternative_flowing = "default:water_flowing",
|
liquid_alternative_flowing = "default:water_flowing",
|
||||||
@ -1000,6 +1011,7 @@ minetest.register_node("default:water_source", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
is_ground_content = false,
|
||||||
drowning = 1,
|
drowning = 1,
|
||||||
liquidtype = "source",
|
liquidtype = "source",
|
||||||
liquid_alternative_flowing = "default:water_flowing",
|
liquid_alternative_flowing = "default:water_flowing",
|
||||||
@ -1032,6 +1044,7 @@ minetest.register_node("default:lava_flowing", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
is_ground_content = false,
|
||||||
drowning = 1,
|
drowning = 1,
|
||||||
liquidtype = "flowing",
|
liquidtype = "flowing",
|
||||||
liquid_alternative_flowing = "default:lava_flowing",
|
liquid_alternative_flowing = "default:lava_flowing",
|
||||||
@ -1060,6 +1073,7 @@ minetest.register_node("default:lava_source", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
is_ground_content = false,
|
||||||
drowning = 1,
|
drowning = 1,
|
||||||
liquidtype = "source",
|
liquidtype = "source",
|
||||||
liquid_alternative_flowing = "default:lava_flowing",
|
liquid_alternative_flowing = "default:lava_flowing",
|
||||||
@ -1494,6 +1508,74 @@ minetest.register_node("default:apple", {
|
|||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:dirt_with_snow", {
|
||||||
|
description = "Dirt with Snow",
|
||||||
|
tiles = {"default_snow.png", "default_dirt.png", "default_dirt.png^default_snow_side.png"},
|
||||||
|
groups = {crumbly=3,soil=1},
|
||||||
|
drop = 'default:dirt',
|
||||||
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:snow", {
|
||||||
|
description = "Snow",
|
||||||
|
tiles = {"default_snow.png"},
|
||||||
|
inventory_image = "default_snowball.png",
|
||||||
|
wield_image = "default_snowball.png",
|
||||||
|
paramtype = "light",
|
||||||
|
buildable_to = true,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, -0.5+2/16, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
groups = {crumbly=3,falling_node=1},
|
||||||
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
|
|
||||||
|
on_construct = function(pos)
|
||||||
|
pos.y = pos.y - 1
|
||||||
|
if minetest.get_node(pos).name == "default:dirt_with_grass" then
|
||||||
|
minetest.set_node(pos, {name="default:dirt_with_snow"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:snowblock", {
|
||||||
|
description = "Snow Block",
|
||||||
|
tiles = {"default_snow.png"},
|
||||||
|
groups = {crumbly=3},
|
||||||
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:ice", {
|
||||||
|
description = "Ice",
|
||||||
|
tiles = {"default_ice.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
paramtype = "light",
|
||||||
|
groups = {cracky=3},
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:pinetree", {
|
||||||
|
description = "Pine Tree",
|
||||||
|
tiles = {"default_pinetree_top.png", "default_pinetree_top.png", "default_pinetree.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:pine_needles",{
|
||||||
|
description = "Pine Needles",
|
||||||
|
drawtype = "allfaces_optional",
|
||||||
|
visual_scale = 1.3,
|
||||||
|
tiles = {"default_pine_needles.png"},
|
||||||
|
waving = 1,
|
||||||
|
paramtype = "light",
|
||||||
|
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Grow tree function
|
-- Grow tree function
|
||||||
--
|
--
|
||||||
|
@ -10,11 +10,19 @@ minetest.register_alias("mapgen_sand", "default:sand")
|
|||||||
minetest.register_alias("mapgen_water_source", "default:water_source")
|
minetest.register_alias("mapgen_water_source", "default:water_source")
|
||||||
minetest.register_alias("mapgen_lava_source", "default:lava_source")
|
minetest.register_alias("mapgen_lava_source", "default:lava_source")
|
||||||
minetest.register_alias("mapgen_gravel", "default:gravel")
|
minetest.register_alias("mapgen_gravel", "default:gravel")
|
||||||
|
minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow")
|
||||||
|
minetest.register_alias("mapgen_snowblock", "default:snowblock")
|
||||||
|
minetest.register_alias("mapgen_snow", "default:snow")
|
||||||
|
minetest.register_alias("mapgen_ice", "default:ice")
|
||||||
|
|
||||||
minetest.register_alias("mapgen_tree", "default:tree")
|
minetest.register_alias("mapgen_tree", "default:tree")
|
||||||
minetest.register_alias("mapgen_leaves", "default:leaves")
|
minetest.register_alias("mapgen_leaves", "default:leaves")
|
||||||
minetest.register_alias("mapgen_apple", "default:apple")
|
minetest.register_alias("mapgen_apple", "default:apple")
|
||||||
|
minetest.register_alias("mapgen_jungletree", "default:jungletree")
|
||||||
|
minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves")
|
||||||
minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
|
minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
|
||||||
|
minetest.register_alias("mapgen_pinetree", "default:pinetree")
|
||||||
|
minetest.register_alias("mapgen_pine_needles", "default:pine_needles")
|
||||||
|
|
||||||
minetest.register_alias("mapgen_cobble", "default:cobble")
|
minetest.register_alias("mapgen_cobble", "default:cobble")
|
||||||
minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
|
minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
|
||||||
|
BIN
games/minimal/mods/default/textures/default_ice.png
Normal file
After Width: | Height: | Size: 254 B |
BIN
games/minimal/mods/default/textures/default_jungleleaves.png
Normal file
After Width: | Height: | Size: 184 B |
BIN
games/minimal/mods/default/textures/default_pine_needles.png
Normal file
After Width: | Height: | Size: 203 B |
BIN
games/minimal/mods/default/textures/default_pinetree.png
Normal file
After Width: | Height: | Size: 280 B |
BIN
games/minimal/mods/default/textures/default_pinetree_top.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
games/minimal/mods/default/textures/default_snow.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
games/minimal/mods/default/textures/default_snow_side.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
games/minimal/mods/default/textures/default_snowball.png
Normal file
After Width: | Height: | Size: 183 B |
@ -656,15 +656,8 @@ void make_jungletree(MMVManip &vmanip, v3s16 p0, INodeDefManager *ndef, int seed
|
|||||||
and in games that have saplings; both are deprecated but not
|
and in games that have saplings; both are deprecated but not
|
||||||
replaced yet
|
replaced yet
|
||||||
*/
|
*/
|
||||||
content_t c_tree = ndef->getId("mapgen_jungletree");
|
MapNode treenode(ndef->getId("mapgen_jungletree"));
|
||||||
content_t c_leaves = ndef->getId("mapgen_jungleleaves");
|
MapNode leavesnode(ndef->getId("mapgen_jungleleaves"));
|
||||||
if (c_tree == CONTENT_IGNORE)
|
|
||||||
c_tree = ndef->getId("mapgen_tree");
|
|
||||||
if (c_leaves == CONTENT_IGNORE)
|
|
||||||
c_leaves = ndef->getId("mapgen_leaves");
|
|
||||||
|
|
||||||
MapNode treenode(c_tree);
|
|
||||||
MapNode leavesnode(c_leaves);
|
|
||||||
|
|
||||||
PseudoRandom pr(seed);
|
PseudoRandom pr(seed);
|
||||||
for (s16 x= -1; x <= 1; x++)
|
for (s16 x= -1; x <= 1; x++)
|
||||||
|