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,32 @@
------------Crafting
minetest.register_craft({
output = "nightshade:nightshade_wood 4",
recipe = {
{"nightshade:nightshade_tree"},
}
})
local leaves = "nightshade:nightshade_leaves_1"
minetest.register_craft({
output = "nightshade:nightshade_sapling",
recipe = {
{"", leaves, ""},
{leaves, "default:stick", leaves}
},
})
minetest.register_craft({
output = "nightshade:nightshade_lamp",
recipe = {
{"nightshade:nightshade_wood", "default:meselamp"},
}
})
minetest.register_craft({
output = "nightshade:nightshade_trapdoor 2",
recipe = {
{"nightshade:nightshade_wood", "nightshade:nightshade_wood", "nightshade:nightshade_wood"},
{"nightshade:nightshade_wood", "nightshade:nightshade_wood", "nightshade:nightshade_wood"},
}
})

View file

@ -0,0 +1,10 @@
minetest.register_decoration({
deco_type = "simple",
place_on = {"nightshade:nightshade_dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"nightshade"},
decoration = {
"japaneseforest:red_firefly", "japaneseforest:orange_firefly","japaneseforest:violet_firefly", "japaneseforest:black_firefly",
}
})

View file

@ -0,0 +1,7 @@
local path = minetest.get_modpath("nightshade")
dofile(path .. "/nodes.lua")
dofile(path .. "/mapgen.lua")
dofile(path .. "/crafting.lua")
--dofile(path .. "/fireflies.lua")
dofile(path .. "/moreblocks.lua")

View file

@ -0,0 +1,23 @@
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/nightshade_sapling_1.png

View file

@ -0,0 +1,126 @@
minetest.register_decoration({
name = "nightshade:nightshade_tree_1",
deco_type = "schematic",
place_on = {"nightshade:nightshade_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.019265,
biomes = {"nightshade"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_1.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "nightshade:nightshade_tree_2",
deco_type = "schematic",
place_on = {"nightshade:nightshade_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.019265,
biomes = {"nightshade"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "nightshade:nightshade_tree_3",
deco_type = "schematic",
place_on = {"nightshade:nightshade_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.019265,
biomes = {"nightshade"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_3.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "nightshade:nightshade_bush",
deco_type = "schematic",
place_on = {"nightshade:nightshade_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.039265,
biomes = {"nightshade"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_bush.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "nightshade:nightshade_tree_log_1",
deco_type = "schematic",
place_on = {"nightshade:nightshade_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.010265,
biomes = {"nightshade"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_log_1.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
name = "nightshade:nightshade_tree_log_2",
deco_type = "schematic",
place_on = {"nightshade:nightshade_dirt_with_grass"},
place_offset_y = 0,
sidelen = 16,
fill_ratio = 0.012265,
biomes = {"nightshade"},
y_max = 31000,
y_min = -20,
schematic = minetest.get_modpath("nightshade").."/schematics/nightshade_tree_log_2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"nightshade:nightshade_dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.0125,
biomes = {"nightshade"},
decoration = {
"everness:ivis_moss",
"everness:ngrass_2",
"flowers:mushroom_brown",
"flowers:mushroom_red",
}
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"nightshade:nightshade_tree"},
sidelen = 16,
fill_ratio = 0.125,
biomes = {"nightshade"},
decoration = {
"flowers:mushroom_brown",
"flowers:mushroom_red",
}
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"nightshade:nightshade_dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.175,
biomes = {"nightshade"},
decoration = {
"nightshade:nightshade_grass",
}
})

View file

@ -0,0 +1,7 @@
author = Atlante
name = nightshade
description = Adds a nighshade biome with a few more objects.
title = NightShade
depends = default, doors, japaneseforest

View file

@ -0,0 +1,28 @@
-----------------Moreblock
if minetest.get_modpath("moreblocks") then
stairsplus:register_all("nightshade_tree", "wood", "nightshade:nightshade_tree", {
description = "NightShade Tree",
tiles = {"nightshade_tree_top.png", "nightshade_tree_top.png",
"nightshade_tree.png"},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("nightshade_wood", "wood", "nightshade:nightshade_wood", {
description = "NightShade Tree",
tiles = {"nightshade_wood_fence.png"},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("nightshade_lamp", "glass", "nightshade:nightshade_lamp", {
description = "NightShade Lamp",
tiles = {"nightshade_lamp.png"},
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View file

@ -0,0 +1,286 @@
local modpath = minetest.get_modpath("nightshade")
local function grow_new_nightshade_tree(pos)
if not default.can_grow(pos) then
-- try a bit later again
minetest.get_node_timer(pos):start(math.random(300, 1500))
return
end
minetest.remove_node(pos)
minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/nightshade_tree_1.mts", "0", nil, false)
end
minetest.register_node("nightshade:nightshade_dirt_with_grass", {
description = "Nightshade Dirt With Grass",
tiles = {"nightshade_nightshade_grass.png", "default_dirt.png",
{name = "default_dirt.png^nightshade_nightshade_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},
}),
})
minetest.register_node("nightshade:nightshade_leaves_1", {
description = "Nightshade Leaves",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"nightshade_tree_leaves.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"nightshade:nightshade_sapling_1"}, rarity = 40},
{items = {"nightshade:nightshade_sapling_2"}, rarity = 40},
{items = {"nightshade:nightshade_leaves_1"}} -- ~95% chance for leaves
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.register_node("nightshade:nightshade_glowin_leaves_1", {
description = "Nightshade Glowing Leaves",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"nightshade_tree_glowing_leaves.png"},
paramtype = "light",
is_ground_content = false,
light_source = 15,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"nightshade:nightshade_glowin_leaves_1"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.register_node("nightshade:nightshade_tree", {
description = "Nightshade Tree",
tiles = {"nightshade_tree_top.png", "nightshade_tree_top.png",
"nightshade_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node
})
minetest.register_node("nightshade:nightshade_wood", {
description = "Nightshade Wood",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"nightshade_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("nightshade:nightshade_lamp", {
description = "Nightshade Lamp",
drawtype = "glasslike",
tiles = {"nightshade_lamp.png"},
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
light_source = default.LIGHT_MAX,
})
minetest.register_node("nightshade:nightshade_grass", {
description = "Nightshade Grass",
drawtype = "plantlike",
waving = 1,
visual_scale = 1.5,
tiles = {"nightshade_grass.png"},
inventory_image = "nightshade_grass.png",
wield_image = "nightshade_grass.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, junglegrass = 1, flammable = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
},
})
stairs.register_stair_and_slab(
"nightshade_wood",
"nightshade:nightshade_wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"nightshade_wood.png"},
"Nightshade Wood Stair",
"Nightshade Wood Slab",
default.node_sound_wood_defaults(),
true
)
doors.register_trapdoor("nightshade:nightshade_trapdoor", {
description = "Nightshade Trapdoor",
inventory_image = "nightshade_trapdoor.png",
wield_image = "nightshade_trapdoor.png",
tile_front = "nightshade_trapdoor.png",
tile_side = "nightshade_trapdoor_side.png",
gain_open = 0.06,
gain_close = 0.13,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1},
})
doors.register("nightshade_door", {
tiles = {{ name = "doors_nightshade_door.png", backface_culling = true }},
description = "Nightshade Door",
inventory_image = "doors_item_nightshade.png",
groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
gain_open = 0.06,
gain_close = 0.13,
recipe = {
{"nightshade:nightshade_wood", "nightshade:nightshade_wood"},
{"nightshade:nightshade_wood", "nightshade:nightshade_wood"},
{"nightshade:nightshade_wood", "nightshade:nightshade_wood"},
}
})
doors.register_fencegate("nightshade:gate_nightshade", {
description = "Nightshade Wood Fence Gate",
texture = "nightshade_wood_fence.png",
material = "nightshade:nightshade_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
default.register_fence("nightshade:fence_nightshade_wood", {
description = "Nightshade Wood Fence",
texture = "nightshade_wood_fence.png",
inventory_image = "default_fence_overlay.png^nightshade_wood_fence.png^" ..
"default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^nightshade_wood_fence.png^" ..
"default_fence_overlay.png^[makealpha:255,126,126",
material = "nightshade:nightshade_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("nightshade:fence_rail_nightshade_wood", {
description = "Nightshade Wood Fence Rail",
texture = "nightshade_wood_fence.png",
inventory_image = "default_fence_rail_overlay.png^nightshade_wood_fence.png^" ..
"default_fence_rail_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_rail_overlay.png^nightshade_wood_fence.png^" ..
"default_fence_rail_overlay.png^[makealpha:255,126,126",
material = "nightshade:nightshade_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
sounds = default.node_sound_wood_defaults()
})
local modpath = minetest.get_modpath("nightshade")
local leaves = "nightshade:nightshade_leaves"
local stick = "default:stick"
local trees = {
{
name = "Short",
recipe = {
{"", leaves, ""},
{leaves, leaves, leaves},
{"", stick, ""},
},
grow_function = function(pos)
minetest.remove_node(pos)
minetest.place_schematic({x = pos.x-6, y = pos.y, z = pos.z-5}, modpath.."/schematics/nightshade_tree_2.mts", "0", nil, false)
end,
},
{
name = "Tall",
recipe = {
{"", leaves, ""},
{leaves, stick, leaves},
{"", stick, ""},
},
grow_function = function(pos)
minetest.remove_node(pos)
minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/nightshade_tree_1.mts", "0", nil, false)
end,
},
}
local mod_bonemeal = minetest.get_modpath("bonemeal")
for index,def in ipairs(trees) do
local sapling = "nightshade:nightshade_sapling_" .. index
local image = "nightshade_sapling_" .. index .. ".png"
-- Register sapling
minetest.register_node(sapling, {
description = def.name .. " Nightshade 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
minetest.register_alias("nightshade:nightshade_sapling","nightshade:nightshade_sapling_2")

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB