Super flat moss, rotated moss
This commit is contained in:
parent
a01850c376
commit
681f0be278
@ -336,9 +336,9 @@ abstract_trunks.grow_moss_on_ground = function(pos)
|
|||||||
local moss_type = math.random(1,21)
|
local moss_type = math.random(1,21)
|
||||||
|
|
||||||
if moss_type == 1 then
|
if moss_type == 1 then
|
||||||
minetest.add_node(on_ground, {name="trunks:moss_fungus", param2= 1})
|
minetest.add_node(on_ground, {name="trunks:moss_fungus", param2=math.random(0,3)})
|
||||||
else
|
else
|
||||||
minetest.add_node(on_ground, {name="trunks:moss", param2= 1})
|
minetest.add_node(on_ground, {name="trunks:moss", param2=math.random(0,3)})
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -383,50 +383,48 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
|
|||||||
local node_west = minetest.get_node(at_side_w)
|
local node_west = minetest.get_node(at_side_w)
|
||||||
local node_under = minetest.get_node(undrneath)
|
local node_under = minetest.get_node(undrneath)
|
||||||
|
|
||||||
if minetest.get_item_group(node_under.name, "tree") < 1 then
|
--if minetest.get_item_group(node_under.name, "tree") < 1 then
|
||||||
local moss_type = math.random(1,41)
|
local moss_type = math.random(1,41)
|
||||||
if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
|
if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
|
||||||
if moss_type == 1 then
|
if moss_type == 1 then
|
||||||
minetest.add_node(on_ground, {name="trunks:moss_fungus", param2= 1})
|
minetest.add_node(on_ground, {name="trunks:moss_fungus", param2=math.random(0,3) --[[1]]})
|
||||||
elseif moss_type < 22 then
|
elseif moss_type < 22 then
|
||||||
minetest.add_node(on_ground, {name="trunks:moss", param2= 1})
|
minetest.add_node(on_ground, {name="trunks:moss", param2=math.random(0,3) --[[1]]})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
local moss_type = math.random(1,31) -- cliche of more moss at north
|
||||||
local moss_type = math.random(1,31)
|
if minetest.registered_nodes[node_north.name].buildable_to then -- instead of check_air = true,
|
||||||
if minetest.registered_nodes[node_north.name].buildable_to then -- instead of check_air = true,
|
if moss_type == 1 then
|
||||||
if moss_type == 1 then
|
minetest.add_node(at_side_n, {name="trunks:moss_fungus", param2=math.random(4,7)}) -- 5,4,6,7
|
||||||
minetest.add_node(at_side_n, {name="trunks:moss_fungus", param2= 5})
|
elseif moss_type < 22 then
|
||||||
elseif moss_type < 22 then
|
minetest.add_node(at_side_n, {name="trunks:moss", param2=math.random(4,7)})
|
||||||
minetest.add_node(at_side_n, {name="trunks:moss", param2= 5})
|
end
|
||||||
end
|
end
|
||||||
end
|
local moss_type = math.random(1,41)
|
||||||
local moss_type = math.random(1,41)
|
if minetest.registered_nodes[node_east.name].buildable_to then -- instead of check_air = true,
|
||||||
if minetest.registered_nodes[node_east.name].buildable_to then -- instead of check_air = true,
|
if moss_type == 1 then
|
||||||
if moss_type == 1 then
|
minetest.add_node(at_side_e, {name="trunks:moss_fungus", param2=math.random(12,15)})
|
||||||
minetest.add_node(at_side_e, {name="trunks:moss_fungus", param2= 3})
|
elseif moss_type < 22 then
|
||||||
elseif moss_type < 22 then
|
minetest.add_node(at_side_e, {name="trunks:moss", param2=math.random(12,15)})
|
||||||
minetest.add_node(at_side_e, {name="trunks:moss", param2= 3})
|
end
|
||||||
end
|
end
|
||||||
end
|
local moss_type = math.random(1,41)
|
||||||
local moss_type = math.random(1,41)
|
if minetest.registered_nodes[node_south.name].buildable_to then -- instead of check_air = true,
|
||||||
if minetest.registered_nodes[node_south.name].buildable_to then -- instead of check_air = true,
|
if moss_type == 1 then
|
||||||
if moss_type == 1 then
|
minetest.add_node(at_side_s, {name="trunks:moss_fungus", param2=math.random(8,11)})
|
||||||
minetest.add_node(at_side_s, {name="trunks:moss_fungus", param2= 4})
|
elseif moss_type < 22 then
|
||||||
elseif moss_type < 22 then
|
minetest.add_node(at_side_s, {name="trunks:moss", param2=math.random(8,11)})
|
||||||
minetest.add_node(at_side_s, {name="trunks:moss", param2= 4})
|
end
|
||||||
end
|
end
|
||||||
end
|
local moss_type = math.random(1,41)
|
||||||
local moss_type = math.random(1,41)
|
if minetest.registered_nodes[node_west.name].buildable_to then -- instead of check_air = true,
|
||||||
if minetest.registered_nodes[node_west.name].buildable_to then -- instead of check_air = true,
|
if moss_type == 1 then
|
||||||
if moss_type == 1 then
|
minetest.add_node(at_side_w, {name="trunks:moss_fungus", param2=math.random(16,19)})
|
||||||
minetest.add_node(at_side_w, {name="trunks:moss_fungus", param2= 2})
|
elseif moss_type < 22 then
|
||||||
elseif moss_type < 22 then
|
minetest.add_node(at_side_w, {name="trunks:moss", param2=math.random(16,19)})
|
||||||
minetest.add_node(at_side_w, {name="trunks:moss", param2= 2})
|
end
|
||||||
end
|
end
|
||||||
end
|
--end
|
||||||
end
|
|
||||||
|
|
||||||
--minetest.add_node(on_ground, {name="trunks:moss", param2=math.random(0,3)})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
plantslib:register_generate_plant({
|
plantslib:register_generate_plant({
|
||||||
@ -447,16 +445,17 @@ plantslib:register_generate_plant({
|
|||||||
"moretrees:rubber_tree_trunk_empty",
|
"moretrees:rubber_tree_trunk_empty",
|
||||||
"moretrees:sequoia_trunk",
|
"moretrees:sequoia_trunk",
|
||||||
"moretrees:spruce_trunk",
|
"moretrees:spruce_trunk",
|
||||||
"moretrees:willow_trunk"
|
"moretrees:willow_trunk",
|
||||||
|
"default:mossycobble"
|
||||||
},
|
},
|
||||||
max_count = Moss_on_trunk_Max_Count,
|
max_count = Moss_on_trunk_Max_Count,
|
||||||
rarity = Moss_on_trunk_Rarity,
|
rarity = Moss_on_trunk_Rarity,
|
||||||
min_elevation = 1,
|
min_elevation = 1,
|
||||||
max_elevation = 40,
|
max_elevation = 40,
|
||||||
near_nodes = {"default:dirt_with_grass"},
|
--near_nodes = {"default:dirt_with_grass"},
|
||||||
near_nodes_size = 1,
|
--near_nodes_size = 1,
|
||||||
near_nodes_vertical = 1,
|
--near_nodes_vertical = 1,
|
||||||
near_nodes_count = 1,
|
--near_nodes_count = 1,
|
||||||
plantlife_limit = -0.9,
|
plantlife_limit = -0.9,
|
||||||
check_air = false,
|
check_air = false,
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
local title = "Trunks"
|
local title = "Trunks"
|
||||||
local version = "0.0.9"
|
local version = "0.1.0"
|
||||||
local mname = "trunks"
|
local mname = "trunks"
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -52,17 +52,20 @@ end
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- MoSS
|
-- MoSS
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
local flat_moss = {-1/2, -1/2, -1/2, 1/2, -15/32--[[<-flickers if smaller]], 1/2}
|
||||||
|
|
||||||
minetest.register_node("trunks:moss", {
|
minetest.register_node("trunks:moss", {
|
||||||
description = "Moss",
|
description = "Moss",
|
||||||
drawtype = "signlike",
|
drawtype = "nodebox",--"signlike",
|
||||||
tiles = {"trunks_moss.png"},
|
tiles = {"trunks_moss.png"},
|
||||||
inventory_image = "trunks_moss.png",
|
inventory_image = "trunks_moss.png",
|
||||||
wield_image = "trunks_moss.png",
|
wield_image = "trunks_moss.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "facedir",--"wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {type = "wallmounted"},
|
node_box = {type = "fixed", fixed = flat_moss},
|
||||||
|
selection_box = {type = "fixed", fixed = flat_stick},--{type = "wallmounted"},
|
||||||
groups = {dig_immediate=2,attached_node=1},
|
groups = {dig_immediate=2,attached_node=1},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
@ -72,15 +75,16 @@ minetest.register_node("trunks:moss", {
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
minetest.register_node("trunks:moss_fungus", {
|
minetest.register_node("trunks:moss_fungus", {
|
||||||
description = "Moss & Fungus",
|
description = "Moss & Fungus",
|
||||||
drawtype = "signlike",
|
drawtype = "nodebox",--"signlike",
|
||||||
tiles = {"trunks_moss_fungus.png"},
|
tiles = {"trunks_moss_fungus.png"},
|
||||||
inventory_image = "trunks_moss_fungus.png",
|
inventory_image = "trunks_moss_fungus.png",
|
||||||
wield_image = "trunks_moss_fungus.png",
|
wield_image = "trunks_moss_fungus.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "facedir",--"wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {type = "wallmounted"},
|
node_box = {type = "fixed", fixed = flat_moss},
|
||||||
|
selection_box = {type = "fixed", fixed = flat_stick},--{type = "wallmounted"},
|
||||||
groups = {dig_immediate=2,attached_node=1},
|
groups = {dig_immediate=2,attached_node=1},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user