write something there

This commit is contained in:
N-Nachtigal 2025-05-04 16:01:41 +02:00
commit b4b6c08f4f
8546 changed files with 309825 additions and 0 deletions

View file

@ -0,0 +1,2 @@
# prairie
Adds a prairie biome with a few more objects. And more tree with flowers

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -0,0 +1,4 @@
local default_path = minetest.get_modpath("prairie")
dofile(default_path.."/mapgen.lua")
dofile(default_path.."/nodes.lua")

View file

@ -0,0 +1,18 @@
License
------------------------------------------------------------------------------------------------------------------------
Copyright (C) 2021-2022: Atlante - AFL-1.1
License for code: AFL-1.1
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Anyone can fix the mod. My Discord "Atlante#1952" And my Mail Address "AtlanteEtDocteur@gmail.com"

View file

@ -0,0 +1,83 @@
minetest.register_decoration({
name = "prairie:prairie_tree_1",
deco_type = "schematic",
place_on = {"prairie:prairie_dirt_with_grass"},
place_offset_y = -1,
sidelen = 16,
fill_ratio = 0.003,
biomes = {"prairie"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("prairie").."/schematics/prairie_tree_1.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "prairie:tree_2",
deco_type = "schematic",
place_on = {"prairie:prairie_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.003,
biomes = {"prairie"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("prairie").."/schematics/prairie_tree_2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "prairie:bush",
deco_type = "schematic",
place_on = {"prairie:prairie_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.0005,
biomes = {"prairie"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("default").."/schematics/bush.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "prairie:blueberry",
deco_type = "schematic",
place_on = {"prairie:prairie_dirt_with_grass"},
place_offset_y = 1,
sidelen = 16,
fill_ratio = 0.00175,
biomes = {"prairie"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("default").."/schematics/blueberry_bush.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"prairie:prairie_dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.16,
biomes = {"prairie"},
decoration = {
"default:grass_1", "default:grass_2",
"default:grass_3", "default:grass_4",
"default:grass_5",
}
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"prairie:prairie_dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.05,
biomes = {"prairie"},
decoration = {
"default:mushroom_brown"
}
})

View file

@ -0,0 +1,7 @@
author = Atlante
name = prairie
description = Adds a prairie biome with a few more objects. And more tree with flowers
title = Prairie
depends = default

View file

@ -0,0 +1,121 @@
local modpath = minetest.get_modpath("prairie")
minetest.register_node("prairie:prairie_dirt_with_grass", {
description = "Prairie Dirt With Grass",
tiles = {"prairie_grass.png", "default_dirt.png",
{name = "default_dirt.png^prairie_grass_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},
}),
})
--[[
Trees
]]
local trees = {
{
name = "Sunny",
grow_function = function(pos)
minetest.remove_node(pos)
minetest.place_schematic({x = pos.x-4, y = pos.y, z = pos.z-4}, modpath.."/schematics/prairie_tree_1.mts", "random", nil, false)
end,
},
{
name = "Cheerful",
grow_function = function(pos)
minetest.remove_node(pos)
minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/prairie_tree_2.mts", "random", nil, false)
end,
},
}
for index,def in ipairs(trees) do
local sapling = "prairie:prairie_sapling_" .. index
local image = "prairie_sapling_" .. index .. ".png"
local leaves = "prairie:prairie_leaves_" .. index
-- Register leaves
minetest.register_node("prairie:prairie_leaves_" .. index, {
description = def.name .. " Prairie Leaves",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"prairie_leaves_" .. index .. ".png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {sapling}, rarity = 20},
{items = {leaves}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
-- Register sapling
minetest.register_node(sapling, {
description = def.name .. " Prairie Sapling",
drawtype = "plantlike",
tiles = {image},
inventory_image = image,
wield_image = image,
paramtype = "light",
sunlight_propagates = true,
walkable = false,
on_timer = function(pos)
if not default.can_grow(pos) then
-- try a bit later again
minetest.get_node_timer(pos):start(math.random(240, 600))
return
else
def.grow_function(pos)
end
end,
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,
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,
})
-- Register sapling crafting recipe
minetest.register_craft({
output = sapling,
recipe = {
{"", leaves, ""},
{leaves, "default:stick", leaves}
},
})
-- Add bonemeal integration if supported
if mod_bonemeal then
bonemeal:add_sapling({
{node, def.grow_function, "soil"},
})
end
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B