general3214 wrote:For what Minetest build(s) is this compatible? If other than the current stable build, than the original post should specify which build(s).
local function place_seed(itemstack, placer, pointed_thing, plantname)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return
end
if pt.type ~= "node" then
return
end
local under = minetest.get_node(pt.under)
local above = minetest.get_node(pt.above)
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] then
return
end
if not minetest.registered_nodes[above.name] then
return
end
-- check if pointing at the top of the node
if pt.above.y ~= pt.under.y+1 then
return
end
-- check if you can replace the node above the pointed node
if not minetest.registered_nodes[above.name].buildable_to then
return
end
-- check if pointing at soil
if minetest.get_item_group(under.name, "soil") <= 1 then
return
end
minetest.add_node(pt.above, {name=plantname})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
minetest.register_craftitem("ethereal:mushroom_craftingitem", {
description = "Mushroom",
groups = {not_in_creative_inventory=1},
inventory_image = "mushroom.png",
on_place = function(itemstack, placer, pointed_thing)
return place_seed(itemstack, placer, pointed_thing, "ethereal:mushroom_garden_1")
end,
})
for i=1,4 do
local drop = {
items = {
{items = {'ethereal:mushroom'},rarity=9-i},
{items = {'ethereal:mushroom 9'},rarity=18-i*2},
}
}
minetest.register_node("ethereal:mushroom_garden_"..i, {
drawtype = "plantlike",
tiles = {"ethereal_mushroom_garden_"..i..".png"},
paramtype = "light",
walkable = false,
drop = drop,
buildable_to = true,
is_ground_content = true,
drop = drop,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
groups = {snappy=3,flammable=2,plant=1,mushroom=i,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
})
end
minetest.register_abm({
nodenames = {"group:mushroom"},
neighbors = {"group:soil"},
interval = 1,
chance = 10000,
action = function(pos, node)
-- return if already full grown
if minetest.get_item_group(node.name, "mushroom") == 4 then
return
end
-- check if on wet soil
pos.y = pos.y-1
local n = minetest.get_node(pos)
if minetest.get_item_group(n.name, "soil") < 3 then
return
end
pos.y = pos.y+1
-- check light
if not minetest.get_node_light(pos) then
return
end
if minetest.get_node_light(pos) < 13 then
return
end
-- grow
local height = minetest.get_item_group(node.name, "mushroom") + 1
minetest.set_node(pos, {name="ethereal:mushroom_garden_"..height})
end
})
Inocudom wrote:A member here by the name of paramat made a mapgen that uses v7 terrain. You can find it beyond the link below:
https://forum.minetest.net/viewtopic.php?id=7366
Maybe your mapgen could be an extension of his if they are used together? He could help you out with that.
The mod below, which was made by paramat, could be supported by the fire biomes in your mapgen:
https://forum.minetest.net/viewtopic.php?id=6578
The mod spawns volcanoes.
[The extension lua has been deactivated and can no longer be displayed.]
[The extension lua has been deactivated and can no longer be displayed.]
I like your ideaSokomine wrote:This mod does create very intresting terrain, and the new biomes are fine.
With that many diffrent types of grass/vegetation, it ought to be possible to make more use out of them. First: When placing a dirt block in a biome, it ought to grow vegetation of the same color as the rest of the biome. That might be a bit difficult as the engine turns it into grass automaticly and you don't know which biome it is in anyway. Perhaps an abm that searches for dirt_with_grass and - when it finds one - checks the nodes around it for vegetation and turns the dirt with grass into whatever is the dominant vegetation around it. That way, it would grow green for a short moment, and you'd need a new block for the green grass variant to be able to distinguish from default:dirt_with_grass, but it might work and keep the biomes in their color.
It would also be great if the grass/vegetation could somehow be collected and turned into nodes to build with - nodes where each side has the color of the top of the colored dirt_with_grass block perhaps. A special tool could be used to get the grass from such a block.
Sometimes, the landscape seems to have strange holes, and the lava pits hang a bit in the air. As my buildings my random_buildings mod face the same problem, I'd be very intrested in a solution to that problem.
Neon wrote:BUG: dirt_with_grass is turning biome-centric colors in jungle biomes.
[The extension lua has been deactivated and can no longer be displayed.]
[The extension lua has been deactivated and can no longer be displayed.]
Users browsing this forum: No registered users and 45 guests