forked from mtcontrib/plantlife_modpack
Compare commits
27 Commits
86896848d5
...
6bdb533906
Author | SHA1 | Date | |
---|---|---|---|
6bdb533906 | |||
c62610f544 | |||
8e2148ffc3 | |||
680b02f7e2 | |||
a2976c609a | |||
46717958bc | |||
5ac025cda4 | |||
52b2d18523 | |||
efe869d386 | |||
b597f99014 | |||
bfd08f01c8 | |||
9ed4771515 | |||
3f107a8067 | |||
b3cbd3df2e | |||
b1b4a08834 | |||
f01e4bb55f | |||
637f96e215 | |||
7b4f54ead0 | |||
c061ef23cf | |||
d87d8e51f5 | |||
fa9f30043f | |||
70df655a42 | |||
4876fc1265 | |||
81b2b0898b | |||
d97f25e112 | |||
a750bac532 | |||
b4b24dedba |
@ -28,7 +28,7 @@ node_box = {
|
||||
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
|
||||
}
|
||||
},
|
||||
groups = {snappy=3,flammable=2},
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick'
|
||||
})
|
||||
@ -63,7 +63,8 @@ for i in pairs(BushBranchCenter) do
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
leaves=1,
|
||||
attached_node=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick 4'
|
||||
@ -106,7 +107,8 @@ for i in pairs(BushBranchSide) do
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
leaves=1,
|
||||
attached_node=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick 3'
|
||||
@ -186,7 +188,7 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
@ -228,7 +230,7 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
|
@ -30,7 +30,7 @@ local modpath = minetest.get_modpath('bushes_classic')
|
||||
dofile(modpath..'/cooking.lua')
|
||||
dofile(modpath..'/nodes.lua')
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 3600,
|
||||
spawn_plants = bushes_classic.spawn_list,
|
||||
avoid_radius = 10,
|
||||
|
@ -7,6 +7,8 @@ local mname = "cavestuff"
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
cavestuff = {}
|
||||
|
||||
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")
|
||||
|
||||
|
@ -1,55 +1,39 @@
|
||||
--Map Generation Stuff
|
||||
|
||||
local random = math.random
|
||||
local floor = math.floor
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
"cavestuff:pebble_1",
|
||||
"cavestuff:pebble_2"
|
||||
}
|
||||
)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if maxp.y >= 2 and minp.y <= 0 then
|
||||
-- Generate pebbles
|
||||
local perlin1 = minetest.get_perlin(329, 3, 0.6, 100)
|
||||
-- Assume X and Z lengths are equal
|
||||
local divlen = 16
|
||||
local divs = (maxp.x-minp.x)/divlen+1;
|
||||
for divx=0,divs-1 do
|
||||
for divz=0,divs-1 do
|
||||
local x0 = minp.x + floor((divx+0)*divlen)
|
||||
local z0 = minp.z + floor((divz+0)*divlen)
|
||||
local x1 = minp.x + floor((divx+1)*divlen)
|
||||
local z1 = minp.z + floor((divz+1)*divlen)
|
||||
-- Determine pebble amount from perlin noise
|
||||
local pebble_amount = floor(perlin1:get2d({x=x0, y=z0}) ^ 2 * 2)
|
||||
-- Find random positions for pebbles based on this random
|
||||
local pr = PseudoRandom(seed+1)
|
||||
for i=0,pebble_amount do
|
||||
local x = pr:next(x0, x1)
|
||||
local z = pr:next(z0, z1)
|
||||
-- Find ground level (0...15)
|
||||
local ground_y = nil
|
||||
for y=30,0,-1 do
|
||||
if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
|
||||
ground_y = y
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if ground_y then
|
||||
local p = {x=x,y=ground_y+1,z=z}
|
||||
local nn = minetest.get_node(p).name
|
||||
-- Check if the node can be replaced
|
||||
if minetest.registered_nodes[nn] and
|
||||
minetest.registered_nodes[nn].buildable_to then
|
||||
nn = minetest.get_node({x=x,y=ground_y,z=z}).name
|
||||
-- If desert sand, add dry shrub
|
||||
if nn == "default:dirt_with_grass" then
|
||||
minetest.swap_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=random(0,3)})
|
||||
elseif nn == "default:desert_sand" then
|
||||
minetest.swap_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=random(0,3)})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
"cavestuff:desert_pebble_1",
|
||||
"cavestuff:desert_pebble_2"
|
||||
}
|
||||
)
|
||||
|
@ -1,2 +1,2 @@
|
||||
name = cavestuff
|
||||
depends = default
|
||||
depends = default,biome_lib
|
||||
|
@ -14,65 +14,65 @@ minetest.register_node("cavestuff:pebble_1",{
|
||||
description = S("Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
drop = "cavestuff:pebble_1",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_1",{
|
||||
description = S("Desert Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:desert_pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
drop = "cavestuff:desert_pebble_1",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--Staclactites
|
||||
@ -87,19 +87,34 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.425000,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.162500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.275000,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},
|
||||
{-0.187500,-0.425000,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.162500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.275000,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,0.837500,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pt = pointed_thing
|
||||
if minetest.get_node(pt.under).name=="default:stone"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
|
||||
minetest.swap_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..random(1,3)})
|
||||
local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||
local base = pointed_thing.under
|
||||
local place = vector.add(base, dir)
|
||||
local above = vector.add(place, dir)
|
||||
|
||||
if not placer then return end
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(place, playername)
|
||||
or minetest.is_protected(above, playername) then
|
||||
minetest.record_protection_violation(place, playername)
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.get_node(base).name == "default:stone"
|
||||
and minetest.get_node(place).name == "air"
|
||||
and minetest.get_node(above).name == "air"
|
||||
then
|
||||
minetest.swap_node(place, {
|
||||
name = "cavestuff:stalactite_"..math.random(1,3),
|
||||
param2 = minetest.dir_to_wallmounted(vector.multiply(dir, -1))
|
||||
})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
@ -118,10 +133,10 @@ minetest.register_node("cavestuff:stalactite_2",{
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.112500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.675000,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-0.975000,0.037500,0.037500,0.500000,-0.025000},
|
||||
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.112500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.675000,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,0.975000,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -134,14 +149,14 @@ minetest.register_node("cavestuff:stalactite_3",{
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.037500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.437500,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-1.237500,0.037500,0.037500,0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.037500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.437500,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,1.237500,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
--Stalagmites
|
||||
|
@ -95,7 +95,7 @@ minetest.register_node("dryplants:juncus_02", {
|
||||
-- GENERATE SMALL JUNCUS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
@ -116,7 +116,7 @@ biome_lib:register_generate_plant({
|
||||
abstract_dryplants.grow_juncus
|
||||
)
|
||||
-- at dunes/beach
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
--"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
|
@ -11,7 +11,7 @@ abstract_dryplants.grow_grass_variation = function(pos)
|
||||
minetest.swap_node(pos, {name="dryplants:grass_short"})
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
},
|
||||
|
@ -7,27 +7,24 @@
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
local random = math.random
|
||||
|
||||
abstract_dryplants.grow_grass = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
minetest.swap_node(right_here, {name="default:grass_"..random(1,5)})
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = TALL_GRASS_PER_MAPBLOCK,
|
||||
rarity = 101 - TALL_GRASS_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
check_air = true,
|
||||
},
|
||||
max_count = TALL_GRASS_PER_MAPBLOCK,
|
||||
rarity = 101 - TALL_GRASS_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_grass
|
||||
{ "default:grass_1",
|
||||
"default:grass_2",
|
||||
"default:grass_3",
|
||||
"default:grass_4",
|
||||
"default:grass_5"
|
||||
}
|
||||
)
|
||||
|
@ -330,7 +330,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- SPAWN REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[biome_lib:spawn_on_surfaces({
|
||||
--[[biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = {"dryplants:reedmace_sapling"},
|
||||
spawn_chance = 400,
|
||||
@ -351,7 +351,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-- GENERATE REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:desert_sand",
|
||||
@ -372,7 +372,7 @@ biome_lib:register_generate_plant({
|
||||
abstract_dryplants.grow_reedmace
|
||||
)
|
||||
-- in water
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt",
|
||||
"default:dirt_with_grass",
|
||||
@ -395,7 +395,7 @@ biome_lib:register_generate_plant({
|
||||
abstract_dryplants.grow_reedmace_water
|
||||
)
|
||||
-- for oases & tropical beaches & tropical swamps
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand",
|
||||
"sumpf:sumpf"
|
||||
|
@ -87,7 +87,7 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
biome_lib:register_generate_plant({ -- near trees (woodlands)
|
||||
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -116,7 +116,7 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
biome_lib:register_generate_plant({ -- near stone (mountains)
|
||||
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -143,7 +143,7 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
||||
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
|
||||
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -183,7 +183,7 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
|
@ -298,7 +298,7 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
@ -324,7 +324,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
|
@ -75,7 +75,7 @@ create_nodes()
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = node_names,
|
||||
spawn_chance = 400,
|
||||
@ -104,7 +104,7 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||
@ -137,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:gravel", -- roots go deep
|
||||
"default:mossycobble",
|
||||
|
@ -179,7 +179,7 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
@ -208,7 +208,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
|
@ -80,16 +80,16 @@ for i in ipairs(lilies_list) do
|
||||
local above_node = minetest.get_node(pt.above)
|
||||
local top_node = minetest.get_node(top_pos)
|
||||
|
||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if under_node.name ~= "default:water_source" then
|
||||
place_pos = pt.under
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
return
|
||||
end
|
||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
||||
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
|
||||
place_pos = pt.above
|
||||
end
|
||||
|
||||
@ -180,18 +180,19 @@ for i in ipairs(algae_list) do
|
||||
local above_node = minetest.get_node(pt.above)
|
||||
local top_node = minetest.get_node(top_pos)
|
||||
|
||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
|
||||
if under_node.name ~= "default:water_source" then
|
||||
place_pos = pt.under
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
return
|
||||
end
|
||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
||||
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
|
||||
place_pos = pt.above
|
||||
end
|
||||
if not place_pos then return end -- something went wrong :P
|
||||
|
||||
if not minetest.is_protected(place_pos, placer:get_player_name()) then
|
||||
|
||||
@ -245,7 +246,7 @@ minetest.register_node(":flowers:sunflower", {
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = true,
|
||||
groups = { dig_immediate=3, flora=1, flammable=3 },
|
||||
groups = { dig_immediate=3, flora=1, flammable=3, attached_node=1 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = box,
|
||||
collision_box = box,
|
||||
@ -301,7 +302,7 @@ flowers_plus.grow_waterlily = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = lilies_max_count,
|
||||
rarity = lilies_rarity,
|
||||
@ -323,7 +324,7 @@ flowers_plus.grow_seaweed = function(pos)
|
||||
minetest.swap_node(right_here, {name="along_shore:seaweed_"..random(1,4), param2=random(1,3)})
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = seaweed_max_count,
|
||||
rarity = seaweed_rarity,
|
||||
@ -340,7 +341,7 @@ biome_lib:register_generate_plant({
|
||||
|
||||
-- seaweed at beaches
|
||||
-- MM: not satisfied with it, but IMHO some beaches should have some algae
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = seaweed_max_count,
|
||||
rarity = seaweed_rarity,
|
||||
@ -356,7 +357,7 @@ biome_lib:register_generate_plant({
|
||||
},
|
||||
flowers_plus.grow_seaweed
|
||||
)
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:sand"},
|
||||
max_count = seaweed_max_count*2,
|
||||
rarity = seaweed_rarity/2,
|
||||
@ -373,7 +374,7 @@ biome_lib:register_generate_plant({
|
||||
flowers_plus.grow_seaweed
|
||||
)
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
avoid_nodes = { "flowers:sunflower" },
|
||||
max_count = sunflowers_max_count,
|
||||
@ -388,7 +389,7 @@ biome_lib:register_generate_plant({
|
||||
|
||||
-- spawn ABM registrations
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY/2,
|
||||
spawn_plants = {
|
||||
"flowers:waterlily",
|
||||
@ -410,7 +411,7 @@ biome_lib:spawn_on_surfaces({
|
||||
random_facedir = {0,3}
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
@ -423,7 +424,7 @@ biome_lib:spawn_on_surfaces({
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
@ -437,7 +438,7 @@ biome_lib:spawn_on_surfaces({
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:seaweed"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
@ -451,7 +452,7 @@ biome_lib:spawn_on_surfaces({
|
||||
facedir = 1
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY*2,
|
||||
spawn_plants = {"flowers:sunflower"},
|
||||
spawn_chance = SPAWN_CHANCE*2,
|
||||
|
@ -62,7 +62,7 @@ abstract_molehills.place_molehill = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Molehills_Max_Count,
|
||||
rarity = Molehills_Rarity,
|
||||
|
@ -70,7 +70,7 @@ minetest.register_node('poisonivy:climbing', {
|
||||
buildable_to = true,
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = SPAWN_DELAY,
|
||||
spawn_plants = {"poisonivy:seedling"},
|
||||
avoid_radius = 10,
|
||||
@ -83,7 +83,7 @@ biome_lib:spawn_on_surfaces({
|
||||
verticals_list = walls_list
|
||||
})
|
||||
|
||||
biome_lib:grow_plants({
|
||||
biome_lib.update_plant({
|
||||
grow_delay = SPAWN_DELAY,
|
||||
grow_chance = GROW_CHANCE,
|
||||
grow_plant = "poisonivy:seedling",
|
||||
@ -91,7 +91,7 @@ biome_lib:grow_plants({
|
||||
grow_nodes = {"default:dirt_with_grass"}
|
||||
})
|
||||
|
||||
biome_lib:grow_plants({
|
||||
biome_lib.update_plant({
|
||||
grow_delay = GROW_DELAY,
|
||||
grow_chance = GROW_CHANCE*2,
|
||||
grow_plant = "poisonivy:climbing",
|
||||
|
@ -4,158 +4,190 @@
|
||||
-- TWiGS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
local random = math.random
|
||||
local fakenode = {
|
||||
name = "default:stone", -- could be anything that's guaranteed to exist at mapgen time, and isn't buildable_to
|
||||
param1 = 0,
|
||||
param2 = 0
|
||||
}
|
||||
|
||||
abstract_trunks.place_twig = function(pos)
|
||||
local twig_size = random(1,27)
|
||||
local twig_size = math.random(1,27)
|
||||
|
||||
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
|
||||
local north = {x=pos.x , y=pos.y+1, z=pos.z+1}
|
||||
local north_east = {x=pos.x+1, y=pos.y+1, z=pos.z+1}
|
||||
local east = {x=pos.x+1, y=pos.y+1, z=pos.z }
|
||||
local south_east = {x=pos.x+1, y=pos.y+1, z=pos.z-1}
|
||||
local south = {x=pos.x , y=pos.y+1, z=pos.z-1}
|
||||
local south_west = {x=pos.x-1, y=pos.y+1, z=pos.z-1}
|
||||
local west = {x=pos.x-1, y=pos.y+1, z=pos.z }
|
||||
local north_west = {x=pos.x-1, y=pos.y+1, z=pos.z+1}
|
||||
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
|
||||
local north = {x=pos.x , y=pos.y+1, z=pos.z+1}
|
||||
local north_east = {x=pos.x+1, y=pos.y+1, z=pos.z+1}
|
||||
local east = {x=pos.x+1, y=pos.y+1, z=pos.z }
|
||||
local south_east = {x=pos.x+1, y=pos.y+1, z=pos.z-1}
|
||||
local south = {x=pos.x , y=pos.y+1, z=pos.z-1}
|
||||
local south_west = {x=pos.x-1, y=pos.y+1, z=pos.z-1}
|
||||
local west = {x=pos.x-1, y=pos.y+1, z=pos.z }
|
||||
local north_west = {x=pos.x-1, y=pos.y+1, z=pos.z+1}
|
||||
|
||||
local node_here = minetest.get_node(right_here)
|
||||
local node_north = minetest.get_node(north)
|
||||
local node_n_e = minetest.get_node(north_east)
|
||||
local node_east = minetest.get_node(east)
|
||||
local node_s_e = minetest.get_node(south_east)
|
||||
local node_south = minetest.get_node(south)
|
||||
local node_s_w = minetest.get_node(south_west)
|
||||
local node_west = minetest.get_node(west)
|
||||
local node_n_w = minetest.get_node(north_west)
|
||||
|
||||
node_north = minetest.registered_nodes[node_north.name] and node_north or fakenode
|
||||
node_n_e = minetest.registered_nodes[node_n_e.name] and node_n_e or fakenode
|
||||
node_east = minetest.registered_nodes[node_east.name] and node_east or fakenode
|
||||
node_s_e = minetest.registered_nodes[node_s_e.name] and node_s_e or fakenode
|
||||
node_south = minetest.registered_nodes[node_south.name] and node_south or fakenode
|
||||
node_s_w = minetest.registered_nodes[node_s_w.name] and node_s_w or fakenode
|
||||
node_west = minetest.registered_nodes[node_west.name] and node_west or fakenode
|
||||
node_n_w = minetest.registered_nodes[node_n_w.name] and node_n_w or fakenode
|
||||
|
||||
local node_here = minetest.get_node(right_here)
|
||||
local node_north = minetest.get_node(north)
|
||||
local node_n_e = minetest.get_node(north_east)
|
||||
local node_east = minetest.get_node(east)
|
||||
local node_s_e = minetest.get_node(south_east)
|
||||
local node_south = minetest.get_node(south)
|
||||
local node_s_w = minetest.get_node(south_west)
|
||||
local node_west = minetest.get_node(west)
|
||||
local node_n_w = minetest.get_node(north_west)
|
||||
-- small twigs
|
||||
if twig_size <= 16 then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_"..random(1,4), param2=random(0,3)})
|
||||
minetest.swap_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)})
|
||||
end
|
||||
-- big twigs
|
||||
if Big_Twigs == true then
|
||||
local n1, n2
|
||||
local r1, r2
|
||||
-- big twig 1
|
||||
if twig_size == 17 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5"})
|
||||
if twig_size == 17 then
|
||||
n1 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1})
|
||||
n2 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5"})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_e.name].buildable_to then
|
||||
minetest.swap_node(north_east, {name="trunks:twig_7"})
|
||||
end
|
||||
if minetest.registered_nodes[node_east.name].buildable_to then
|
||||
minetest.swap_node(east, {name="trunks:twig_8"})
|
||||
end
|
||||
end
|
||||
if minetest.registered_nodes[node_n_e.name].buildable_to then
|
||||
minetest.swap_node(north_east, {name="trunks:twig_7"})
|
||||
elseif twig_size == 18 then
|
||||
n1 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1})
|
||||
n2 = minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_e.name].buildable_to then
|
||||
minetest.swap_node(south_east, {name="trunks:twig_7", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_south.name].buildable_to then
|
||||
minetest.swap_node(south, {name="trunks:twig_8", param2=1})
|
||||
end
|
||||
end
|
||||
if minetest.registered_nodes[node_east.name].buildable_to then
|
||||
minetest.swap_node(east, {name="trunks:twig_8"})
|
||||
elseif twig_size == 19 then
|
||||
n1 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1})
|
||||
n2 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_w.name].buildable_to then
|
||||
minetest.swap_node(south_west, {name="trunks:twig_7", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_west.name].buildable_to then
|
||||
minetest.swap_node(west, {name="trunks:twig_8", param2=2})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 20 then
|
||||
n1 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1})
|
||||
n2 = minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_w.name].buildable_to then
|
||||
minetest.swap_node(north_west, {name="trunks:twig_7", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_north.name].buildable_to then
|
||||
minetest.swap_node(north, {name="trunks:twig_8", param2=3})
|
||||
end
|
||||
end
|
||||
-- big twig 2
|
||||
elseif twig_size == 21 then
|
||||
n1 = minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1})
|
||||
n2 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9"})
|
||||
end
|
||||
if minetest.registered_nodes[node_north.name].buildable_to then
|
||||
minetest.swap_node(north, {name="trunks:twig_10"})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_e.name].buildable_to then
|
||||
minetest.swap_node(north_east, {name="trunks:twig_11"})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 22 then
|
||||
n1 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z})
|
||||
n2 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_east.name].buildable_to then
|
||||
minetest.swap_node(east, {name="trunks:twig_10", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_e.name].buildable_to then
|
||||
minetest.swap_node(south_east, {name="trunks:twig_11", param2=1})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 23 then
|
||||
n1 = minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1})
|
||||
n2 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_south.name].buildable_to then
|
||||
minetest.swap_node(south, {name="trunks:twig_10", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_w.name].buildable_to then
|
||||
minetest.swap_node(south_west, {name="trunks:twig_11", param2=2})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 24 then
|
||||
n1 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z})
|
||||
n2 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_west.name].buildable_to then
|
||||
minetest.swap_node(west, {name="trunks:twig_10", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_w.name].buildable_to then
|
||||
minetest.swap_node(north_west, {name="trunks:twig_11", param2=3})
|
||||
end
|
||||
end
|
||||
elseif twig_size <= 25 then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_"..math.random(12,13), param2=math.random(0,3)})
|
||||
end
|
||||
elseif twig_size == 18 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_e.name].buildable_to then
|
||||
minetest.swap_node(south_east, {name="trunks:twig_7", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_south.name].buildable_to then
|
||||
minetest.swap_node(south, {name="trunks:twig_8", param2=1})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 19 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_w.name].buildable_to then
|
||||
minetest.swap_node(south_west, {name="trunks:twig_7", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_west.name].buildable_to then
|
||||
minetest.swap_node(west, {name="trunks:twig_8", param2=2})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 20 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_w.name].buildable_to then
|
||||
minetest.swap_node(north_west, {name="trunks:twig_7", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_north.name].buildable_to then
|
||||
minetest.swap_node(north, {name="trunks:twig_8", param2=3})
|
||||
end
|
||||
end
|
||||
-- big twig 2
|
||||
elseif twig_size == 21 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9"})
|
||||
end
|
||||
if minetest.registered_nodes[node_north.name].buildable_to then
|
||||
minetest.swap_node(north, {name="trunks:twig_10"})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_e.name].buildable_to then
|
||||
minetest.swap_node(north_east, {name="trunks:twig_11"})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 22 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_east.name].buildable_to then
|
||||
minetest.swap_node(east, {name="trunks:twig_10", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_e.name].buildable_to then
|
||||
minetest.swap_node(south_east, {name="trunks:twig_11", param2=1})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 23 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_south.name].buildable_to then
|
||||
minetest.swap_node(south, {name="trunks:twig_10", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_w.name].buildable_to then
|
||||
minetest.swap_node(south_west, {name="trunks:twig_11", param2=2})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 24 then
|
||||
if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to
|
||||
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to) then
|
||||
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_west.name].buildable_to then
|
||||
minetest.swap_node(west, {name="trunks:twig_10", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_w.name].buildable_to then
|
||||
minetest.swap_node(north_west, {name="trunks:twig_11", param2=3})
|
||||
end
|
||||
end
|
||||
elseif twig_size <= 25 then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_"..random(12,13), param2=random(0,3)})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if Twigs_on_ground == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Twigs_on_ground_Max_Count,
|
||||
rarity = Twigs_on_ground_Rarity,
|
||||
@ -172,7 +204,7 @@ biome_lib:register_generate_plant({
|
||||
end
|
||||
|
||||
if Twigs_on_water == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = Twigs_on_water_Max_Count,
|
||||
rarity = Twigs_on_water_Rarity,
|
||||
@ -256,10 +288,10 @@ abstract_trunks.place_trunk = function(pos)
|
||||
local MoD = TRuNKS[i][1]
|
||||
local TRuNK = TRuNKS[i][2]
|
||||
local NR = TRuNKS[i][3]
|
||||
local chance = random(1, 17)
|
||||
local length = random(3,5)
|
||||
local chance = math.random(1, 17)
|
||||
local length = math.random(3,5)
|
||||
if chance == NR then
|
||||
local trunk_type = random(1,3)
|
||||
local trunk_type = math.random(1,3)
|
||||
if trunk_type == 1 then
|
||||
if minetest.get_modpath(MoD) ~= nil then
|
||||
minetest.swap_node(right_here, {name=MoD..":"..TRuNK})
|
||||
@ -334,7 +366,7 @@ abstract_trunks.place_trunk = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Trunks_Max_Count, -- 320,
|
||||
rarity = Trunks_Rarity, -- 99,
|
||||
@ -357,17 +389,18 @@ biome_lib:register_generate_plant({
|
||||
if Moss_on_ground == true then
|
||||
abstract_trunks.grow_moss_on_ground = function(pos)
|
||||
local on_ground = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local moss_type = random(1,21)
|
||||
local moss_type = math.random(1,21)
|
||||
local rot = math.random(0,3)
|
||||
|
||||
if moss_type == 1 then
|
||||
minetest.swap_node(on_ground, {name="trunks:moss_fungus", param2=random(0,3)})
|
||||
minetest.swap_node(on_ground, {name="trunks:moss_with_fungus_"..rot, param2=1})
|
||||
else
|
||||
minetest.swap_node(on_ground, {name="trunks:moss", param2=random(0,3)})
|
||||
minetest.swap_node(on_ground, {name="trunks:moss_plain_"..rot, param2=1})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Moss_on_ground_Max_Count,
|
||||
rarity = Moss_on_ground_Rarity,
|
||||
@ -408,50 +441,55 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
|
||||
local node_under = minetest.get_node(undrneath)
|
||||
|
||||
--if minetest.get_item_group(node_under.name, "tree") < 1 then
|
||||
local moss_type = 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
|
||||
local moss_type = math.random(1,41)
|
||||
local rot = math.random(0,3)
|
||||
if moss_type == 1 then
|
||||
minetest.swap_node(on_ground, {name="trunks:moss_fungus", param2=random(0,3) --[[1]]})
|
||||
minetest.swap_node(on_ground, {name="trunks:moss_with_fungus_"..rot, param2=1})
|
||||
elseif moss_type < 22 then
|
||||
minetest.swap_node(on_ground, {name="trunks:moss", param2=random(0,3) --[[1]]})
|
||||
minetest.swap_node(on_ground, {name="trunks:moss_plain_"..rot, param2=1})
|
||||
end
|
||||
end
|
||||
local moss_type = random(1,31) -- cliche of more moss at north
|
||||
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
|
||||
local moss_type = math.random(1,31) -- cliche of more moss at north
|
||||
local rot = math.random(0,3)
|
||||
if moss_type == 1 then
|
||||
minetest.swap_node(at_side_n, {name="trunks:moss_fungus", param2=random(4,7)}) -- 5,4,6,7
|
||||
minetest.swap_node(at_side_n, {name="trunks:moss_with_fungus_"..rot, param2=5})
|
||||
elseif moss_type < 22 then
|
||||
minetest.swap_node(at_side_n, {name="trunks:moss", param2=random(4,7)})
|
||||
minetest.swap_node(at_side_n, {name="trunks:moss_plain_"..rot, param2=5})
|
||||
end
|
||||
end
|
||||
local moss_type = 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
|
||||
local moss_type = math.random(1,41)
|
||||
local rot = math.random(0,3)
|
||||
if moss_type == 1 then
|
||||
minetest.swap_node(at_side_e, {name="trunks:moss_fungus", param2=random(12,15)})
|
||||
minetest.swap_node(at_side_e, {name="trunks:moss_with_fungus_"..rot, param2=3})
|
||||
elseif moss_type < 22 then
|
||||
minetest.swap_node(at_side_e, {name="trunks:moss", param2=random(12,15)})
|
||||
minetest.swap_node(at_side_e, {name="trunks:moss_plain_"..rot, param2=3})
|
||||
end
|
||||
end
|
||||
local moss_type = 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
|
||||
local moss_type = math.random(1,41)
|
||||
local rot = math.random(0,3)
|
||||
if moss_type == 1 then
|
||||
minetest.swap_node(at_side_s, {name="trunks:moss_fungus", param2=random(8,11)})
|
||||
minetest.swap_node(at_side_s, {name="trunks:moss_with_fungus_"..rot, param2=4})
|
||||
elseif moss_type < 22 then
|
||||
minetest.swap_node(at_side_s, {name="trunks:moss", param2=random(8,11)})
|
||||
minetest.swap_node(at_side_s, {name="trunks:moss_plain_"..rot, param2=4})
|
||||
end
|
||||
end
|
||||
local moss_type = 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
|
||||
local moss_type = math.random(1,41)
|
||||
local rot = math.random(0,3)
|
||||
if moss_type == 1 then
|
||||
minetest.swap_node(at_side_w, {name="trunks:moss_fungus", param2=random(16,19)})
|
||||
minetest.swap_node(at_side_w, {name="trunks:moss_with_fungus_"..rot, param2=2})
|
||||
elseif moss_type < 22 then
|
||||
minetest.swap_node(at_side_w, {name="trunks:moss", param2=random(16,19)})
|
||||
minetest.swap_node(at_side_w, {name="trunks:moss_plain_"..rot, param2=2})
|
||||
end
|
||||
end
|
||||
--end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:tree",
|
||||
"default:jungletree",
|
||||
@ -489,7 +527,7 @@ end
|
||||
if Roots == true then -- see settings.txt
|
||||
|
||||
abstract_trunks.grow_roots = function(pos)
|
||||
local twig_size = random(1,27)
|
||||
local twig_size = math.random(1,27)
|
||||
|
||||
local right_here = {x=pos.x , y=pos.y , z=pos.z }
|
||||
local below = {x=pos.x , y=pos.y-1, z=pos.z }
|
||||
@ -528,7 +566,7 @@ abstract_trunks.grow_roots = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {"group:tree"},
|
||||
max_count = 1000,
|
||||
rarity = 1,
|
||||
|
117
trunks/nodes.lua
117
trunks/nodes.lua
@ -58,6 +58,7 @@ for i in pairs(NoDe) do
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
@ -66,42 +67,64 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- MoSS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local flat_moss = {-1/2, -1/2, -1/2, 1/2, -15/32--[[<-flickers if smaller]], 1/2}
|
||||
-- wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
|
||||
-- wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
|
||||
-- wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
|
||||
|
||||
minetest.register_node("trunks:moss", {
|
||||
description = S("Moss"),
|
||||
drawtype = "nodebox",--"signlike",
|
||||
tiles = {"trunks_moss.png"},
|
||||
inventory_image = "trunks_moss.png",
|
||||
wield_image = "trunks_moss.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",--"wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
node_box = {type = "fixed", fixed = flat_moss},
|
||||
selection_box = {type = "fixed", fixed = flat_stick},--{type = "wallmounted"},
|
||||
groups = {snappy = 3, flammable = 3, attached_node = 1 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
-- was local flat_moss = {-1/2, -1/2, -1/2, 1/2, -15/32, 1/2}
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- MoSS & FuNGuS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("trunks:moss_fungus", {
|
||||
description = S("Moss with Fungus"),
|
||||
drawtype = "nodebox",--"signlike",
|
||||
tiles = {"trunks_moss_fungus.png"},
|
||||
inventory_image = "trunks_moss_fungus.png",
|
||||
wield_image = "trunks_moss_fungus.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",--"wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
node_box = {type = "fixed", fixed = flat_moss},
|
||||
selection_box = {type = "fixed", fixed = flat_stick},--{type = "wallmounted"},
|
||||
groups = {snappy = 3, flammable = 3, attached_node = 1 },
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
local cbox = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-1/2, 1/2, -1/2, 1/2, 15/32, 1/2},
|
||||
wall_bottom = {-1/2, -1/2, -1/2, 1/2, -15/32, 1/2},
|
||||
wall_side = {-1/2, -1/2, -1/2, -15/32, 1/2, 1/2}
|
||||
}
|
||||
|
||||
for r = 0, 3 do
|
||||
local xform = ""
|
||||
if r > 0 then xform = "^[transformR"..r*90 end
|
||||
|
||||
minetest.register_node("trunks:moss_plain_"..r, {
|
||||
description = S("Moss"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {"trunks_moss.png"..xform},
|
||||
inventory_image = "trunks_moss.png",
|
||||
wield_image = "trunks_moss.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
node_box = cbox,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, attached_node=1, not_in_creative_inventory = r},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "trunks:moss_plain_0",
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- MoSS & FuNGuS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_node("trunks:moss_with_fungus_"..r, {
|
||||
description = S("Moss with Fungus"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {"trunks_moss_fungus.png"..xform},
|
||||
inventory_image = "trunks_moss_fungus.png",
|
||||
wield_image = "trunks_moss_fungus.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
node_box = cbox,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, attached_node=1, not_in_creative_inventory = r},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "trunks:moss_with_fungus_0",
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_alias("trunks:moss_plain", "trunks:moss_plain_0")
|
||||
minetest.register_alias("trunks:moss_with_fungus", "trunks:moss_with_fungus_0")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWiGS BLoCK
|
||||
@ -362,7 +385,8 @@ for i in pairs(TRuNKS) do
|
||||
snappy=1,
|
||||
choppy=2,
|
||||
oddly_breakable_by_hand=1,
|
||||
flammable=2--,
|
||||
flammable=2,
|
||||
attached_node = 1
|
||||
--not_in_creative_inventory=1 -- atm in inv for testing
|
||||
},
|
||||
--drop = "trunks:twig_1", -- not sure about this yet
|
||||
@ -377,3 +401,26 @@ end
|
||||
end
|
||||
|
||||
minetest.register_alias("trunks:pine_trunkroot", "trunks:pine_treeroot")
|
||||
|
||||
-- convert moss to wallmounted mode so that attached_node works properly.
|
||||
|
||||
local fdirtowall = {
|
||||
[0] = 1,
|
||||
[1] = 5,
|
||||
[2] = 4,
|
||||
[3] = 3,
|
||||
[4] = 2,
|
||||
}
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "trunks:convert_moss_wallmounted",
|
||||
label = "Convert moss to wallmounted mode",
|
||||
run_at_every_load = true,
|
||||
nodenames = {"trunks:moss", "trunks:moss_fungus"},
|
||||
action = function(pos, node)
|
||||
local basedir = math.floor(node.param2 / 4)
|
||||
local rot = node.param2 % 4
|
||||
local newname = node.name == "trunks:moss_fungus" and "trunks:moss_with_fungus" or "trunks:moss_plain"
|
||||
minetest.set_node(pos, {name = newname.."_"..rot, param2 = fdirtowall[basedir] })
|
||||
end
|
||||
})
|
||||
|
@ -135,7 +135,7 @@ vines.register_vine = function( name, defs, biome )
|
||||
end,
|
||||
})
|
||||
|
||||
biome_lib:spawn_on_surfaces(biome)
|
||||
biome_lib.register_active_spawner(biome)
|
||||
end
|
||||
|
||||
-- ALIASES
|
||||
|
@ -73,7 +73,7 @@ abstract_woodsoils.place_soil = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"group:tree",
|
||||
"ferns:fern_03",
|
||||
@ -94,7 +94,7 @@ biome_lib:register_generate_plant({
|
||||
"abstract_woodsoils.place_soil"
|
||||
)
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"moretrees:apple_tree_sapling_ongen",
|
||||
"moretrees:beech_sapling_ongen",
|
||||
|
@ -19,6 +19,11 @@ minetest.register_node("woodsoils:dirt_with_leaves_1", {
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
soil = {
|
||||
base = "woodsoils:dirt_with_leaves_1",
|
||||
dry = "farming:soil",
|
||||
wet = "farming:soil_wet"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("woodsoils:dirt_with_leaves_2", {
|
||||
@ -37,6 +42,11 @@ minetest.register_node("woodsoils:dirt_with_leaves_2", {
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
soil = {
|
||||
base = "woodsoils:dirt_with_leaves_2",
|
||||
dry = "farming:soil",
|
||||
wet = "farming:soil_wet"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("woodsoils:grass_with_leaves_1", {
|
||||
@ -55,6 +65,11 @@ minetest.register_node("woodsoils:grass_with_leaves_1", {
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
soil = {
|
||||
base = "woodsoils:grass_with_leaves_1",
|
||||
dry = "farming:soil",
|
||||
wet = "farming:soil_wet"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("woodsoils:grass_with_leaves_2", {
|
||||
@ -73,6 +88,11 @@ minetest.register_node("woodsoils:grass_with_leaves_2", {
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
soil = {
|
||||
base = "woodsoils:grass_with_leaves_2",
|
||||
dry = "farming:soil",
|
||||
wet = "farming:soil_wet"
|
||||
}
|
||||
})
|
||||
|
||||
-- For compatibility with older stuff
|
||||
|
@ -42,7 +42,7 @@ minetest.register_node("youngtrees:youngtree2_middle",{
|
||||
{-0.500000,0.125000,-0.500000,0.500000,0.500000,0.500000}, --NodeBox 3
|
||||
}
|
||||
},
|
||||
groups = {snappy=3,flammable=2},
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'trunks:twig_1'
|
||||
})
|
||||
@ -60,7 +60,7 @@ minetest.register_node("youngtrees:youngtree_top", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
||||
},
|
||||
groups = {snappy=3,flammable=2},
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'trunks:twig_1'
|
||||
})
|
||||
@ -79,7 +79,7 @@ minetest.register_node("youngtrees:youngtree_middle", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
||||
},
|
||||
groups = {snappy=3,flammable=2},
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'trunks:twig_1'
|
||||
})
|
||||
@ -99,7 +99,7 @@ minetest.register_node("youngtrees:youngtree_bottom", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
||||
},
|
||||
groups = {snappy=3,flammable=2},
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'trunks:twig_1'
|
||||
})
|
||||
@ -134,7 +134,7 @@ abstract_youngtrees.grow_youngtree_node = function(pos, height)
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
|
Reference in New Issue
Block a user