write something there
116
mods/biomes/dorwinion/cave.lua
Normal file
|
@ -0,0 +1,116 @@
|
|||
local mpath = minetest.get_modpath("dorwinion")
|
||||
|
||||
local dorwinion_surface = {
|
||||
"dorwinion:dorwinion_grass",
|
||||
"dorwinion:dorwinion_brick",
|
||||
"dorwinion:dorwinion_brick_cracked",
|
||||
"dorwinion:dorwinion_brick_with_moss",
|
||||
"dorwinion:dorwinion_brick_with_flowers",
|
||||
}
|
||||
local dorwinion_ceiling = {
|
||||
"dorwinion:dorwinion",
|
||||
"dorwinion:dorwinion_brick",
|
||||
"dorwinion:dorwinion_brick_cracked",
|
||||
"dorwinion:dorwinion_brick_with_moss",
|
||||
"dorwinion:dorwinion_brick_with_flowers",
|
||||
"everness:moss_block",
|
||||
}
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "default:stone",
|
||||
sidelen = 80,
|
||||
fill_ratio = 10,
|
||||
biomes = asuna.features.cave.dorwinion,
|
||||
y_max = 0,
|
||||
y_min = -31000,
|
||||
place_offset_y = -1,
|
||||
decoration = dorwinion_surface,
|
||||
flags = "all_floors,force_placement",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = dorwinion_surface,
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.5125,
|
||||
biomes = asuna.features.cave.dorwinion,
|
||||
y_max = 0,
|
||||
y_min = -31000,
|
||||
place_offset_y = -1,
|
||||
decoration = "dorwinion:dorwinion_grass",
|
||||
flags = "all_floors,force_placement",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "default:stone",
|
||||
sidelen = 80,
|
||||
fill_ratio = 10,
|
||||
biomes = asuna.features.cave.dorwinion,
|
||||
y_max = 0,
|
||||
y_min = -31000,
|
||||
place_offset_y = -1,
|
||||
decoration = dorwinion_ceiling,
|
||||
flags = "all_ceilings,force_placement",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 80,
|
||||
place_on = dorwinion_surface,
|
||||
fill_ratio = 0.00275,
|
||||
biomes = asuna.features.cave.dorwinion,
|
||||
y_max = 0,
|
||||
y_min = -31000,
|
||||
decoration = {
|
||||
"dorwinion:dorwinion_leaves",
|
||||
"dorwinion:dorwinion_glow_leaves",
|
||||
},
|
||||
flags = "all_floors",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 80,
|
||||
place_on = dorwinion_ceiling,
|
||||
fill_ratio = 0.00275,
|
||||
biomes = asuna.features.cave.dorwinion,
|
||||
y_max = 0,
|
||||
y_min = -31000,
|
||||
decoration = {
|
||||
"dorwinion:dorwinion_leaves",
|
||||
"dorwinion:dorwinion_glow_leaves",
|
||||
},
|
||||
flags = "all_ceilings",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 80,
|
||||
place_on = "dorwinion:dorwinion_brick",
|
||||
fill_ratio = 0.015,
|
||||
biomes = asuna.features.cave.dorwinion,
|
||||
y_max = 0,
|
||||
y_min = -31000,
|
||||
height = 2,
|
||||
height_max = 3,
|
||||
decoration = {
|
||||
"dorwinion:dorwinion_brick",
|
||||
"dorwinion:dorwinion_brick_with_flowers",
|
||||
},
|
||||
flags = "all_floors",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
sidelen = 80,
|
||||
place_on = dorwinion_surface,
|
||||
fill_ratio = 0.0005,
|
||||
biomes = asuna.features.cave.dorwinion,
|
||||
y_max = 0,
|
||||
y_min = -31000,
|
||||
schematic = mpath .. "/schematics/ruins.mts",
|
||||
rotation = "random",
|
||||
flags = "all_floors,place_center_x,place_center_z",
|
||||
})
|
BIN
mods/biomes/dorwinion/donjon.png
Normal file
After Width: | Height: | Size: 884 KiB |
8
mods/biomes/dorwinion/init.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
local default_path = minetest.get_modpath("dorwinion")
|
||||
|
||||
dofile(default_path.."/nodes.lua")
|
||||
dofile(default_path.."/mapgen.lua")
|
||||
dofile(default_path.."/moreblocks.lua")
|
||||
dofile(default_path.."/stairs.lua")
|
||||
dofile(default_path.."/walls.lua")
|
||||
dofile(default_path.."/cave.lua")
|
26
mods/biomes/dorwinion/license.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
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"
|
||||
|
||||
|
||||
----
|
||||
|
||||
The following textures are made by EmptyStar, licensed [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
|
||||
|
||||
- textures/dorwinion_sapling_1.png
|
||||
- textures/dorwinion_sapling_2.png
|
||||
- textures/dorwinion_sapling_3.png
|
||||
- textures/dorwinion_sapling_4.png
|
275
mods/biomes/dorwinion/mapgen.lua
Normal file
|
@ -0,0 +1,275 @@
|
|||
local mpath = minetest.get_modpath("dorwinion")
|
||||
local dpath = minetest.get_modpath("default")
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:tree_1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.002265,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = mpath.."/schematics/tree_1.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:tree_2",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.001225,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = mpath.."/schematics/tree_2.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:ruins",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = -1,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.000222,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 2,
|
||||
schematic = mpath.."/schematics/ruins.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:bush_1",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.015265,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 2,
|
||||
schematic = mpath.."/schematics/bush_1.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:tree_3",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.001265,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = mpath.."/schematics/tree_3.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:tree_4",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.002265,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = mpath.."/schematics/tree_4.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
local did_dorwinion = minetest.get_decoration_id('dorwinion:tree_4')
|
||||
minetest.set_gen_notify('decoration',{ did_dorwinion })
|
||||
did_dorwinion = 'decoration#' .. did_dorwinion
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp)
|
||||
if maxp.y > 4 then
|
||||
--
|
||||
-- Large Dorwinion Tree - fix light
|
||||
--
|
||||
local gennotify = minetest.get_mapgen_object('gennotify')
|
||||
for _, pos in ipairs(gennotify[did_dorwinion] or {}) do
|
||||
minetest.after(0.2,function() minetest.fix_light(pos:offset(-16, -1, -16), pos:offset(16, 39, 16)) end)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:tree_5",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.002265,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = mpath.."/schematics/tree_5.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "dorwinion:aspen_tree",
|
||||
deco_type = "schematic",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
place_offset_y = 0,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.002265,
|
||||
biomes = {"dorwinion"},
|
||||
y_max = 31000,
|
||||
y_min = 3,
|
||||
schematic = dpath.."/schematics/aspen_tree.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.3,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"default:grass_1", "default:grass_2",
|
||||
"default:grass_3", "default:grass_4",
|
||||
"default:grass_5",
|
||||
}
|
||||
})
|
||||
|
||||
--[[minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.05,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"flowers:rose", "flowers:dandelion_yellow",
|
||||
"flowers:dandelion_white", "flowers:chryssanthemum_green",
|
||||
"flowers:mushroom_brown",
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.05,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"flowers:dandelion_yellow",
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.05,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"flowers:dandelion_white",
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.05,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"flowers:chryssanthemum_green",
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.01,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"flowers:mushroom_brown",
|
||||
}
|
||||
})]]
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.08,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"dorwinion:dorwinion_leaves",
|
||||
}
|
||||
})
|
||||
|
||||
--[[minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.05,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"butterflies:butterfly_white", "butterflies:butterfly_red", "butterflies:butterfly_violet",
|
||||
}
|
||||
})]]
|
||||
|
||||
--[[minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.02,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"japaneseforest:red_firefly", "japaneseforest:green_firefly", "fireflies:firefly",
|
||||
}
|
||||
})]]
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"dorwinion:dorwinion_grass", "default:aspen_tree"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.02,
|
||||
biomes = {"dorwinion"},
|
||||
decoration = {
|
||||
"dorwinion:dorwinion_glow_leaves",
|
||||
}
|
||||
})
|
||||
|
||||
-- dorwinion
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "dorwinion:dorwinion",
|
||||
wherein = {"default:dirt"},
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_size = 5,
|
||||
y_max = -50,
|
||||
y_min = -31000,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
biomes = {"dorwinion"},
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = 766,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
7
mods/biomes/dorwinion/mod.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
author = Atlante
|
||||
name = dorwinion
|
||||
description = Adds a Dorwinion biome with a few more objects.
|
||||
title = Dorwinion
|
||||
depends = default, japaneseforest, prairie
|
||||
optional_depends = stairs
|
50
mods/biomes/dorwinion/moreblocks.lua
Normal file
|
@ -0,0 +1,50 @@
|
|||
-----------------Moreblock
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
|
||||
stairsplus:register_all("dorwinion_brick", "stone", "dorwinion:dorwinion_brick", {
|
||||
description = "Dorwinion Brick",
|
||||
tiles = {"dorwinion_brick.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
stairsplus:register_all("dorwinion", "stone", "dorwinion:dorwinion", {
|
||||
description = "Dorwinion",
|
||||
tiles = {"dorwinion.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
stairsplus:register_all("dorwinion_carved", "stone", "dorwinion:dorwinion_carved", {
|
||||
description = "Dorwinion Carved",
|
||||
tiles = {"dorwinion_carved.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
stairsplus:register_all("dorwinion_brick_cracked", "stone", "dorwinion:dorwinion_brick_cracked", {
|
||||
description = "Dorwinion Brick Cracked",
|
||||
tiles = {"dorwinion_brick_cracked.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
stairsplus:register_all("dorwinion_brick_with_flowers", "stone", "dorwinion:dorwinion_brick_with_flowers", {
|
||||
description = "Dorwinion Brick With Flowers",
|
||||
tiles = {"dorwinion_brick_with_flowers.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
stairsplus:register_all("dorwinion_brick_with_moss", "stone", "dorwinion:dorwinion_brick_with_moss", {
|
||||
description = "Dorwinion Brick With Moss",
|
||||
tiles = {"dorwinion_brick_with_moss.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
269
mods/biomes/dorwinion/nodes.lua
Normal file
|
@ -0,0 +1,269 @@
|
|||
minetest.register_node("dorwinion:dorwinion_brick", {
|
||||
description = "Dorwninion Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"dorwinion_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "dorwinion:dorwinion_brick 4",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion", "dorwinion:dorwinion"},
|
||||
{"dorwinion:dorwinion", "dorwinion:dorwinion"},
|
||||
}
|
||||
})
|
||||
minetest.register_node("dorwinion:dorwinion_brick_with_flowers", {
|
||||
description = "Dorwninion Brick With Flowers",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"dorwinion_brick_with_flowers.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "dorwinion:dorwinion_brick_with_flowers 2",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion_brick", "flowers:rose"},
|
||||
{"dorwinion:dorwinion_brick", "flowers:rose"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("dorwinion:dorwinion_brick_with_moss", {
|
||||
description = "Dorwninion Brick With Moss",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"dorwinion_brick_with_moss.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "dorwinion:dorwinion_brick_with_moss 3",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion_brick", "bucket:bucket_water"},
|
||||
{"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("dorwinion:dorwinion_carved", {
|
||||
description = "Dorwninion Carved",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"dorwinion_carved.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "dorwinion:dorwinion_carved 4",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick_cracked"},
|
||||
{"dorwinion:dorwinion_brick_cracked", "dorwinion:dorwinion_brick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("dorwinion:dorwinion_brick_cracked", {
|
||||
description = "Dorwninion Brick Cracked",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"dorwinion_brick_cracked.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "dorwinion:dorwinion_brick_cracked 4",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"},
|
||||
{"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("dorwinion:dorwinion", {
|
||||
description = "Dorwninion",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"dorwinion.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("dorwinion:dorwinion_leaves", {
|
||||
description = "Dorwinion Leaves",
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"dorwinion_leaves.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"dorwinion:dorwinion_sapling_1"}, rarity = 80},
|
||||
{items = {"dorwinion:dorwinion_sapling_2"}, rarity = 80},
|
||||
{items = {"dorwinion:dorwinion_sapling_3"}, rarity = 80},
|
||||
{items = {"dorwinion:dorwinion_sapling_4"}, rarity = 80},
|
||||
{items = {"dorwinion:dorwinion_leaves"}} -- ~95% chance for leaves
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("dorwinion:dorwinion_glow_leaves", {
|
||||
description = "Dorwinion Glowing Leaves",
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"dorwinion_glow_leaves.png"},
|
||||
paramtype = "light",
|
||||
light_source = 10,
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"dorwinion:dorwinion_glow_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("dorwinion:dorwinion_grass", {
|
||||
description = "Dorwinion Grass",
|
||||
tiles = {"dorwinion_grass.png", "dorwinion.png",
|
||||
{name = "dorwinion.png^dorwinion_grass_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "dorwinion:dorwinion",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
local modpath = minetest.get_modpath("dorwinion")
|
||||
local leaves = "dorwinion:dorwinion_leaves"
|
||||
local stick = "default:stick"
|
||||
|
||||
local trees = {
|
||||
{
|
||||
name = "Short Aspen",
|
||||
recipe = {
|
||||
{leaves, leaves, leaves},
|
||||
{leaves, stick, leaves},
|
||||
{"", stick, ""},
|
||||
},
|
||||
grow_function = function(pos)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic({x = pos.x-4, y = pos.y, z = pos.z-3}, modpath.."/schematics/tree_2.mts", "0", nil, false)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name = "Tall Aspen",
|
||||
recipe = {
|
||||
{leaves, leaves, leaves},
|
||||
{stick, leaves, stick},
|
||||
{"", stick, ""},
|
||||
},
|
||||
grow_function = function(pos)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic({x = pos.x-12, y = pos.y, z = pos.z-12}, modpath.."/schematics/tree_4.mts", "0", nil, false)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name = "Short Oak",
|
||||
recipe = {
|
||||
{"", leaves, ""},
|
||||
{leaves, leaves, leaves},
|
||||
{"", stick, ""},
|
||||
},
|
||||
grow_function = function(pos)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic({x = pos.x-5, y = pos.y, z = pos.z-5}, modpath.."/schematics/tree_3.mts", "0", nil, false)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name = "Tall Oak",
|
||||
recipe = {
|
||||
{"", leaves, ""},
|
||||
{leaves, stick, leaves},
|
||||
{"", stick, ""},
|
||||
},
|
||||
grow_function = function(pos)
|
||||
minetest.remove_node(pos)
|
||||
minetest.place_schematic({x = pos.x-4, y = pos.y, z = pos.z-4}, modpath.."/schematics/tree_5.mts", "0", nil, false)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
local mod_bonemeal = minetest.get_modpath("bonemeal")
|
||||
|
||||
for index,def in ipairs(trees) do
|
||||
local sapling = "dorwinion:dorwinion_sapling_" .. index
|
||||
local image = "dorwinion_sapling_" .. index .. ".png"
|
||||
|
||||
-- Register sapling
|
||||
minetest.register_node(sapling, {
|
||||
description = def.name .. " Dorwinion 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))
|
||||
else
|
||||
minetest.remove_node(pos)
|
||||
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 = def.recipe,
|
||||
})
|
||||
|
||||
-- Add bonemeal integration if supported
|
||||
if mod_bonemeal then
|
||||
bonemeal:add_sapling({
|
||||
{sapling, def.grow_function, "soil"},
|
||||
})
|
||||
end
|
||||
end
|
BIN
mods/biomes/dorwinion/schematics/bush_1.mts
Normal file
BIN
mods/biomes/dorwinion/schematics/dorwinion.mts
Normal file
BIN
mods/biomes/dorwinion/schematics/ruins.mts
Normal file
BIN
mods/biomes/dorwinion/schematics/tree_1.mts
Normal file
BIN
mods/biomes/dorwinion/schematics/tree_2.mts
Normal file
BIN
mods/biomes/dorwinion/schematics/tree_3.mts
Normal file
BIN
mods/biomes/dorwinion/schematics/tree_4.mts
Normal file
BIN
mods/biomes/dorwinion/schematics/tree_5.mts
Normal file
56
mods/biomes/dorwinion/stairs.lua
Normal file
|
@ -0,0 +1,56 @@
|
|||
if minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab(
|
||||
"dorwinion",
|
||||
"dorwinion:dorwinion",
|
||||
{cracky = 3},
|
||||
{"dorwinion.png"},
|
||||
"Dorwinion Stair",
|
||||
"Dorwinion Slab",
|
||||
default.node_sound_stone_defaults(),
|
||||
true
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"dorwinion_brick",
|
||||
"dorwinion:dorwinion_brick",
|
||||
{cracky = 3},
|
||||
{"dorwinion_brick.png"},
|
||||
"Dorwinion Brick Stair",
|
||||
"Dorwinion Brick Slab",
|
||||
default.node_sound_stone_defaults(),
|
||||
true
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"dorwinion_brick_with_flowers",
|
||||
"dorwinion:dorwinion_brick_with_flowers",
|
||||
{cracky = 3},
|
||||
{"dorwinion_brick_with_flowers.png"},
|
||||
"Dorwinion Brick With Flowers Stair",
|
||||
"Dorwinion Brick With Flowers Slab",
|
||||
default.node_sound_stone_defaults(),
|
||||
true
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"dorwinion_brick_with_moss",
|
||||
"dorwinion:dorwinion_brick_with_moss",
|
||||
{cracky = 3},
|
||||
{"dorwinion_brick_with_moss.png"},
|
||||
"Dorwinion Brick With Moss Stair",
|
||||
"Dorwinion Brick With Moss Slab",
|
||||
default.node_sound_stone_defaults(),
|
||||
true
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"dorwinion_carved",
|
||||
"dorwinion:dorwinion_carved",
|
||||
{cracky = 3},
|
||||
{"dorwinion_carved.png"},
|
||||
"Dorwinion Carved Stair",
|
||||
"Dorwinion Carved Slab",
|
||||
default.node_sound_stone_defaults(),
|
||||
true
|
||||
)
|
||||
end
|
BIN
mods/biomes/dorwinion/textures/dorwinion.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
mods/biomes/dorwinion/textures/dorwinion_brick.png
Normal file
After Width: | Height: | Size: 618 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_brick_cracked.png
Normal file
After Width: | Height: | Size: 839 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_brick_with_flowers.png
Normal file
After Width: | Height: | Size: 777 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_brick_with_moss.png
Normal file
After Width: | Height: | Size: 821 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_carved.png
Normal file
After Width: | Height: | Size: 619 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_glow_leaves.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
mods/biomes/dorwinion/textures/dorwinion_grass.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
mods/biomes/dorwinion/textures/dorwinion_grass_side.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
mods/biomes/dorwinion/textures/dorwinion_leaves.png
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
mods/biomes/dorwinion/textures/dorwinion_sapling_1.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_sapling_2.png
Normal file
After Width: | Height: | Size: 531 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_sapling_3.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
mods/biomes/dorwinion/textures/dorwinion_sapling_4.png
Normal file
After Width: | Height: | Size: 415 B |
40
mods/biomes/dorwinion/walls.lua
Normal file
|
@ -0,0 +1,40 @@
|
|||
if minetest.get_modpath("walls") then
|
||||
|
||||
|
||||
walls.register(":walls:dorwinion_brick", "Dorwinion Brick Wall", "dorwinion_brick.png",
|
||||
"dorwinion:dorwinion_brick", default.node_sound_stone_defaults())
|
||||
|
||||
walls.register(":walls:dorwinion_carved", "Dorwinion Carved Wall", "dorwinion_carved.png",
|
||||
"dorwinion:dorwinion_carved", default.node_sound_stone_defaults())
|
||||
|
||||
walls.register(":walls:dorwinion_brick_with_moss", "Dorwinion Brick With Moss Wall", "dorwinion_brick_with_moss.png",
|
||||
"dorwinion:dorwinion_brick_with_moss", default.node_sound_stone_defaults())
|
||||
|
||||
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "walls:dorwinion_brick 6",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"},
|
||||
{"dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick", "dorwinion:dorwinion_brick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "walls:dorwinion_carved 6",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved"},
|
||||
{"dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved", "dorwinion:dorwinion_carved"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "walls:dorwinion_brick_with_moss 6",
|
||||
recipe = {
|
||||
{"dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss"},
|
||||
{"dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss", "dorwinion:dorwinion_brick_with_moss"},
|
||||
}
|
||||
})
|
||||
|
||||
|