Rezepte bearbeitet, nicht verwendete mods gelöscht, Höhlen schöner gemacht
|
@ -1,26 +0,0 @@
|
||||||
Copyright (c) 2017, Craig Robbins and contributors
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
The views and conclusions contained in the software and documentation are those
|
|
||||||
of the authors and should not be interpreted as representing official policies,
|
|
||||||
either expressed or implied, of the FreeBSD Project.
|
|
|
@ -1,31 +0,0 @@
|
||||||
# caverealms-lite
|
|
||||||
|
|
||||||
Based on the original minetest-caverealms mod (https://github.com/HeroOfTheWinds/minetest-caverealms/).
|
|
||||||
|
|
||||||
Adds underground realms to minetest.
|
|
||||||
|
|
||||||
This caverealms fork provides all the biomes and decorations from the original caverealms, with several additions and without the overhead of generating caves. This lowers the server resources the mod requires, for example CPU and RAM. This also removes the large lava spills created by the original caverealms.
|
|
||||||
|
|
||||||
It is specifically written to work with the mgvalleys mapgen, but will work using other mapgens as well. The mapgen used will determine the shape and size of individual caves. Mapgens that generate only smaller caves may be less suitable for use with this fork than mgvalleys.
|
|
||||||
|
|
||||||
Note: For worlds where the original caverealms is already in use, this fork is not advised as a replacement. If used in this way, some unknown nodes and other minor issues should be expected.
|
|
||||||
|
|
||||||
|
|
||||||
## License and Contributors
|
|
||||||
|
|
||||||
Source code: FreeBSD License (Simplified)
|
|
||||||
The original caverealms was licensed as WTFPL.
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
- Zeno, Shara RedCat - This rewrite
|
|
||||||
- HeroOfTheWinds, Zeno - Original mod
|
|
||||||
|
|
||||||
|
|
||||||
## Recommended Additions
|
|
||||||
|
|
||||||
- VanessaE's HDX texturepacks provide alternative textures. For example,
|
|
||||||
https://gitlab.com/VanessaE/hdx-128.
|
|
||||||
- ethereal mod unlocks additional content (https://notabug.org/tenplus1/ethereal).
|
|
||||||
- mobs_monster mod allows Dungeon Masters to spawn in the Dungeon Master's Lair biome (https://notabug.org/tenplus1/mobs_monster).
|
|
||||||
- mobs_redo is required to run mobs_monster (https://notabug.org/tenplus1/mobs_redo).
|
|
||||||
- abritorch adds coloured torches made with caverealms items (https://github.com/Ezhh/abritorch).
|
|
|
@ -1,661 +0,0 @@
|
||||||
--[[
|
|
||||||
Biomes defined via the Minetest Biome API
|
|
||||||
]]
|
|
||||||
|
|
||||||
local mpath = minetest.get_modpath("caverealms")
|
|
||||||
local spath = mpath .. "/schematics/"
|
|
||||||
|
|
||||||
-- Moss cave
|
|
||||||
|
|
||||||
local moss_cave_surface = {
|
|
||||||
"caverealms:stone_with_moss",
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 10,
|
|
||||||
biomes = asuna.features.cave.moss,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = moss_cave_surface,
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = moss_cave_surface,
|
|
||||||
spawn_by = moss_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.moss,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "emerald_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.moss,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "emerald_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = moss_cave_surface,
|
|
||||||
spawn_by = moss_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.moss,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "sapphire_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.moss,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "sapphire_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = moss_cave_surface,
|
|
||||||
fill_ratio = 0.00625,
|
|
||||||
biomes = asuna.features.cave.moss,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = "caverealms:glow_gem",
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 0.0175,
|
|
||||||
biomes = asuna.features.cave.moss,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
height = 2,
|
|
||||||
height_max = 4,
|
|
||||||
decoration = "caverealms:glow_worm",
|
|
||||||
flags = "all_ceilings",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Fungal cave
|
|
||||||
|
|
||||||
local fungal_cave_surface = {
|
|
||||||
"caverealms:stone_with_lichen",
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 10,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = fungal_cave_surface,
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = fungal_cave_surface,
|
|
||||||
spawn_by = fungal_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "emerald_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "emerald_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = fungal_cave_surface,
|
|
||||||
spawn_by = fungal_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "amethyst_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "amethyst_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = fungal_cave_surface,
|
|
||||||
fill_ratio = 0.0005,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
schematic = spath .. "shroom.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = fungal_cave_surface,
|
|
||||||
fill_ratio = 0.025,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = "caverealms:fungus",
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = fungal_cave_surface,
|
|
||||||
fill_ratio = 0.025,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = "caverealms:mycena",
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 0.0175,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
height = 2,
|
|
||||||
height_max = 4,
|
|
||||||
decoration = "caverealms:glow_worm_green",
|
|
||||||
flags = "all_ceilings",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 16,
|
|
||||||
place_on = "default:stone",
|
|
||||||
noise_params = {
|
|
||||||
offset = -0.227,
|
|
||||||
scale = 0.385,
|
|
||||||
spread = {x = 9, y = 9, z = 9},
|
|
||||||
seed = seed,
|
|
||||||
octaves = 2,
|
|
||||||
persist = 0.65,
|
|
||||||
lacunarity = 0.69,
|
|
||||||
},
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
height_max = 2,
|
|
||||||
decoration = "ethereal:mushroom",
|
|
||||||
flags = "all_ceilings,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = fungal_cave_surface,
|
|
||||||
fill_ratio = 0.00095,
|
|
||||||
biomes = asuna.features.cave.fungal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = {
|
|
||||||
"flowers:mushroom_red",
|
|
||||||
"flowers:mushroom_brown",
|
|
||||||
"herbs:mushroom_boletus",
|
|
||||||
"herbs:mushroom_cantharellus",
|
|
||||||
"herbs:mushroom_macrolepiota",
|
|
||||||
"herbs:mushroom_amanita_green",
|
|
||||||
"herbs:mushroom_gyromitra",
|
|
||||||
"herbs:mushroom_galerina",
|
|
||||||
},
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Coal/desert cave
|
|
||||||
|
|
||||||
local desert_cave_surface = {
|
|
||||||
"default:desert_sand",
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 10,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = desert_cave_surface,
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = desert_cave_surface,
|
|
||||||
fill_ratio = 10,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -2,
|
|
||||||
decoration = "default:stone",
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = {
|
|
||||||
"default:desert_sand",
|
|
||||||
"caverealms:coal_dust",
|
|
||||||
"default:coalblock",
|
|
||||||
},
|
|
||||||
spawn_by = desert_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "ruby_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "ruby_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = {
|
|
||||||
"default:desert_sand",
|
|
||||||
"caverealms:coal_dust",
|
|
||||||
"default:coalblock",
|
|
||||||
},
|
|
||||||
spawn_by = desert_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "amethyst_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "amethyst_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = desert_cave_surface,
|
|
||||||
fill_ratio = 0.1,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = "caverealms:coal_dust",
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = desert_cave_surface,
|
|
||||||
fill_ratio = 0.005,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = "default:coalblock",
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = desert_cave_surface,
|
|
||||||
fill_ratio = 0.01,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = "caverealms:constant_flame",
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = desert_cave_surface,
|
|
||||||
spawn_by = {
|
|
||||||
"default:desert_sand",
|
|
||||||
"caverealms:coal_dust",
|
|
||||||
"default:coalblock",
|
|
||||||
},
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.001,
|
|
||||||
biomes = asuna.features.cave.coal,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = "default:cactus",
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Fire cave
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 10,
|
|
||||||
biomes = asuna.features.cave.fire,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = "caverealms:hot_cobble",
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 4,
|
|
||||||
place_on = "caverealms:hot_cobble",
|
|
||||||
noise_params = {
|
|
||||||
offset = -0.325,
|
|
||||||
scale = 0.45,
|
|
||||||
spread = {x = 8, y = 8, z = 8},
|
|
||||||
seed = seed,
|
|
||||||
octaves = 2,
|
|
||||||
persist = 0.64,
|
|
||||||
lacunarity = 0.7,
|
|
||||||
},
|
|
||||||
biomes = asuna.features.cave.fire,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = "default:obsidian",
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 10,
|
|
||||||
biomes = asuna.features.cave.fire,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = "caverealms:hot_cobble",
|
|
||||||
flags = "all_ceilings,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "caverealms:hot_cobble",
|
|
||||||
fill_ratio = 0.085,
|
|
||||||
biomes = asuna.features.cave.fire,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = "caverealms:constant_flame",
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
local c_lava = minetest.get_content_id("default:lava_source")
|
|
||||||
local valid_lava_enclosure = {}
|
|
||||||
for _,lava_enclosure in ipairs({
|
|
||||||
minetest.get_content_id("default:stone"),
|
|
||||||
minetest.get_content_id("caverealms:hot_cobble"),
|
|
||||||
c_lava,
|
|
||||||
}) do
|
|
||||||
valid_lava_enclosure[lava_enclosure] = true
|
|
||||||
end
|
|
||||||
|
|
||||||
abdecor.register_advanced_decoration("caverealms_fire_cave_lava",{
|
|
||||||
target = {
|
|
||||||
place_on = {
|
|
||||||
"caverealms:hot_cobble",
|
|
||||||
},
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.065,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
flags = "all_floors",
|
|
||||||
},
|
|
||||||
fn = function(mapgen)
|
|
||||||
-- Get provided values
|
|
||||||
local va = mapgen.voxelarea
|
|
||||||
local vdata = mapgen.data
|
|
||||||
local pos = mapgen.pos
|
|
||||||
|
|
||||||
-- Get stride values and set position
|
|
||||||
local ystride = va.ystride
|
|
||||||
local zstride = va.zstride
|
|
||||||
local pos = va:index(pos.x,pos.y,pos.z)
|
|
||||||
|
|
||||||
-- Lava must be enclosed to its sides and below
|
|
||||||
for _,adjacent in ipairs({
|
|
||||||
-ystride,
|
|
||||||
1,
|
|
||||||
-1,
|
|
||||||
zstride,
|
|
||||||
-zstride,
|
|
||||||
}) do
|
|
||||||
if not valid_lava_enclosure[vdata[pos + adjacent]] then
|
|
||||||
return -- lava is not properly enclosed
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Place lava
|
|
||||||
vdata[pos] = c_lava
|
|
||||||
end,
|
|
||||||
flags = {
|
|
||||||
liquid = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Dry cave
|
|
||||||
|
|
||||||
local dry_cave_surface = {
|
|
||||||
"default:dry_dirt",
|
|
||||||
"default:dry_dirt_with_dry_grass",
|
|
||||||
"default:desert_stone",
|
|
||||||
"default:desert_cobble",
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 10,
|
|
||||||
biomes = asuna.features.cave.dry,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
decoration = dry_cave_surface,
|
|
||||||
flags = "all_floors,force_placement",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = dry_cave_surface,
|
|
||||||
spawn_by = dry_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.dry,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "ruby_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.dry,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "ruby_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = dry_cave_surface,
|
|
||||||
spawn_by = dry_cave_surface,
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.dry,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "amethyst_stalagmite.mts",
|
|
||||||
flags = "all_floors,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "schematic",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
spawn_by = "default:stone",
|
|
||||||
num_spawn_by = 8,
|
|
||||||
fill_ratio = 0.000085,
|
|
||||||
biomes = asuna.features.cave.dry,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
place_offset_y = -1,
|
|
||||||
schematic = spath .. "amethyst_stalactite.mts",
|
|
||||||
flags = "all_ceilings,place_center_x,place_center_z",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = dry_cave_surface,
|
|
||||||
fill_ratio = 0.01,
|
|
||||||
biomes = asuna.features.cave.dry,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
decoration = "caverealms:spike",
|
|
||||||
flags = "all_floors",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
sidelen = 80,
|
|
||||||
place_on = "default:stone",
|
|
||||||
fill_ratio = 0.01,
|
|
||||||
biomes = asuna.features.cave.dry,
|
|
||||||
y_max = -4096,
|
|
||||||
y_min = -10000,
|
|
||||||
height = 2,
|
|
||||||
height_max = 3,
|
|
||||||
decoration = "caverealms:fire_vine",
|
|
||||||
flags = "all_ceilings",
|
|
||||||
})
|
|
|
@ -1,53 +0,0 @@
|
||||||
local CONFIG_FILE_PREFIX = "caverealms."
|
|
||||||
|
|
||||||
caverealms.config = {}
|
|
||||||
|
|
||||||
-- This function based on kaeza/minetest-irc/config.lua and used under the
|
|
||||||
-- terms of BSD 2-clause license.
|
|
||||||
local function setting(stype, name, default)
|
|
||||||
local value
|
|
||||||
if stype == "bool" then
|
|
||||||
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name)
|
|
||||||
elseif stype == "string" then
|
|
||||||
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
|
|
||||||
elseif stype == "number" then
|
|
||||||
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
|
|
||||||
end
|
|
||||||
if value == nil then
|
|
||||||
value = default
|
|
||||||
end
|
|
||||||
caverealms.config[name] = value
|
|
||||||
end
|
|
||||||
|
|
||||||
--generation settings
|
|
||||||
setting("number", "ymin", -10000) --bottom realm limit
|
|
||||||
setting("number", "ymax", -4096) --top realm limit
|
|
||||||
setting("number", "tcave", 0.75) --cave threshold
|
|
||||||
|
|
||||||
--decoration chances
|
|
||||||
setting("number", "stagcha", 0.03) --chance of stalagmites (was 0.003)
|
|
||||||
setting("number", "stalcha", 0.03) --chance of stalactites(was 0.003)
|
|
||||||
|
|
||||||
setting("number", "h_lag", 8) --max height for stalagmites
|
|
||||||
setting("number", "h_lac", 8) --...stalactites
|
|
||||||
setting("number", "crystal", 0.02) --chance of glow crystal formations (was 0.0002)
|
|
||||||
setting("number", "h_cry", 8) --max height of glow crystals
|
|
||||||
setting("number", "h_clac", 8) --max height of glow crystal stalactites
|
|
||||||
|
|
||||||
setting("number", "gemcha", 0.03) --chance of small glow gems
|
|
||||||
setting("number", "mushcha", 0.04) --chance of mushrooms
|
|
||||||
setting("number", "myccha", 0.03) --chance of mycena mushrooms
|
|
||||||
setting("number", "wormcha", 0.015) --chance of glow worms
|
|
||||||
setting("number", "giantcha", 0.001) --chance of giant mushrooms
|
|
||||||
setting("number", "icicha", 0.035) --chance of icicles
|
|
||||||
setting("number", "flacha", 0.04) --chance of constant flames
|
|
||||||
|
|
||||||
--realm limits for Dungeon Masters' Lair
|
|
||||||
setting("number", "dm_top", -8000) --upper limit
|
|
||||||
setting("number", "dm_bot", -10000) --lower limit
|
|
||||||
|
|
||||||
--should DMs spawn in DM Lair?
|
|
||||||
setting("bool", "dm_spawn", true)
|
|
||||||
|
|
||||||
--Deep cave settings
|
|
||||||
setting("number", "deep_cave", -7000) -- upper limit
|
|
|
@ -1,145 +0,0 @@
|
||||||
--thin ice to water
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:water_source",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {"caverealms:thin_ice"}
|
|
||||||
})
|
|
||||||
|
|
||||||
--use for coal dust
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:coalblock",
|
|
||||||
recipe = {
|
|
||||||
{"caverealms:coal_dust","caverealms:coal_dust","caverealms:coal_dust"},
|
|
||||||
{"caverealms:coal_dust","caverealms:coal_dust","caverealms:coal_dust"},
|
|
||||||
{"caverealms:coal_dust","caverealms:coal_dust","caverealms:coal_dust"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- DM statue
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "caverealms:dm_statue",
|
|
||||||
recipe = {
|
|
||||||
{"caverealms:glow_ore","caverealms:hot_cobble","caverealms:glow_ore"},
|
|
||||||
{"caverealms:hot_cobble","caverealms:hot_cobble","caverealms:hot_cobble"},
|
|
||||||
{"caverealms:hot_cobble","caverealms:hot_cobble","caverealms:hot_cobble"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Glow obsidian brick
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "caverealms:glow_obsidian_brick 4",
|
|
||||||
recipe = {
|
|
||||||
{"caverealms:glow_obsidian", "caverealms:glow_obsidian"},
|
|
||||||
{"caverealms:glow_obsidian", "caverealms:glow_obsidian"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "caverealms:glow_obsidian_brick_2 4",
|
|
||||||
recipe = {
|
|
||||||
{"caverealms:glow_obsidian_2", "caverealms:glow_obsidian_2"},
|
|
||||||
{"caverealms:glow_obsidian_2", "caverealms:glow_obsidian_2"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Glow obsidian glass
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "caverealms:glow_obsidian_glass 5",
|
|
||||||
recipe = {
|
|
||||||
{"default:glass", "default:glass", "default:glass"},
|
|
||||||
{"default:glass", "default:glass", "caverealms:glow_obsidian"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "caverealms:glow_obsidian_glass 5",
|
|
||||||
recipe = {
|
|
||||||
{"default:glass", "default:glass", "default:glass"},
|
|
||||||
{"default:glass", "default:glass", "caverealms:glow_obsidian_2"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Requires ethereal:fish_raw
|
|
||||||
if minetest.get_modpath("ethereal") then
|
|
||||||
|
|
||||||
-- Professional Fishing Rod
|
|
||||||
minetest.register_craftitem("caverealms:angler_rod", {
|
|
||||||
description = "Pro Fishing Rod",
|
|
||||||
inventory_image = "caverealms_angler_rod.png",
|
|
||||||
wield_image = "caverealms_angler_rod.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "caverealms:angler_rod",
|
|
||||||
recipe = {
|
|
||||||
{"","","default:steel_ingot"},
|
|
||||||
{"", "default:steel_ingot", "caverealms:mushroom_gills"},
|
|
||||||
{"default:steel_ingot", "", "caverealms:mushroom_gills"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Glow Bait
|
|
||||||
minetest.register_craftitem("caverealms:glow_bait", {
|
|
||||||
description = "Glow Bait",
|
|
||||||
inventory_image = "caverealms_glow_bait.png",
|
|
||||||
wield_image = "caverealms_glow_bait.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "caverealms:glow_bait 9",
|
|
||||||
recipe = {
|
|
||||||
{"caverealms:glow_worm_green"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- default ethereal fish
|
|
||||||
local fish = {
|
|
||||||
{"ethereal:fish_raw"},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Pro Fishing Rod (Baited)
|
|
||||||
minetest.register_craftitem("caverealms:angler_rod_baited", {
|
|
||||||
description = "Baited Pro Fishing Rod",
|
|
||||||
inventory_image = "caverealms_angler_rod_baited.png",
|
|
||||||
wield_image = "caverealms_angler_rod_weild.png",
|
|
||||||
stack_max = 1,
|
|
||||||
liquids_pointable = true,
|
|
||||||
|
|
||||||
on_use = function (itemstack, user, pointed_thing)
|
|
||||||
|
|
||||||
if pointed_thing.type ~= "node" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local node = minetest.get_node(pointed_thing.under).name
|
|
||||||
|
|
||||||
if (node == "default:water_source"
|
|
||||||
or node == "default:river_water_source")
|
|
||||||
and math.random(1, 100) < 35 then
|
|
||||||
|
|
||||||
local type = fish[math.random(1, #fish)][1]
|
|
||||||
local inv = user:get_inventory()
|
|
||||||
|
|
||||||
if inv:room_for_item("main", {name = type}) then
|
|
||||||
|
|
||||||
inv:add_item("main", {name = type})
|
|
||||||
|
|
||||||
if (math.random() < 0.6) then
|
|
||||||
return ItemStack("caverealms:angler_rod_baited")
|
|
||||||
else
|
|
||||||
return ItemStack("caverealms:angler_rod")
|
|
||||||
end
|
|
||||||
else
|
|
||||||
minetest.chat_send_player(user:get_player_name(),
|
|
||||||
"Inventory full, Fish Got Away!")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "caverealms:angler_rod_baited",
|
|
||||||
recipe = {"caverealms:angler_rod", "caverealms:glow_bait"},
|
|
||||||
})
|
|
||||||
end
|
|
|
@ -1,8 +0,0 @@
|
||||||
default
|
|
||||||
asuna_core
|
|
||||||
stairs
|
|
||||||
ethereal?
|
|
||||||
mobs?
|
|
||||||
abdecor
|
|
||||||
flowers?
|
|
||||||
herbs?
|
|
|
@ -1 +0,0 @@
|
||||||
A mod for Minetest to add underground realms.
|
|
|
@ -1,19 +0,0 @@
|
||||||
Biome #, Biome name, "floor node"
|
|
||||||
|
|
||||||
|
|
||||||
0, None
|
|
||||||
1, Moss, "caverealms:stone_with_moss"
|
|
||||||
2, Fungal, "caverealms:stone_with_lichen"
|
|
||||||
3, Algae, "caverealms:stone_with_algae"
|
|
||||||
4, Glaciated, "caverealms:thin_ice"
|
|
||||||
|
|
||||||
The following are "deep realms"
|
|
||||||
|
|
||||||
5, Deep Glaciated, "default:ice"
|
|
||||||
6, DM, "caverealms:hot_cobble"
|
|
||||||
7, Salt Crystal, "caverealms:stone_with_salt"
|
|
||||||
8, Glow Obsidian, "caverealms:glow_obsidian"
|
|
||||||
OR "caverealms:glow_obsidian2"
|
|
||||||
9, Coal, "default:coalblock"
|
|
||||||
OR "caverealms:coal_dust"
|
|
||||||
OR "default:desert_sand"
|
|
|
@ -1,16 +0,0 @@
|
||||||
mobs:spawn({
|
|
||||||
name = "mobs_monster:dungeon_master",
|
|
||||||
nodes = {"caverealms:hot_cobble"},
|
|
||||||
max_light = 12,
|
|
||||||
min_light = 0,
|
|
||||||
chance = 7000,
|
|
||||||
active_object_count = 2,
|
|
||||||
max_height = -8000,
|
|
||||||
on_spawn = function(self, pos)
|
|
||||||
self.hp_max = 70
|
|
||||||
self.health = 70
|
|
||||||
self.damage = 5
|
|
||||||
self.shoot_interval = 1.5
|
|
||||||
self.dogshoot_switch = 0
|
|
||||||
end
|
|
||||||
})
|
|
|
@ -1,409 +0,0 @@
|
||||||
local H_LAG = caverealms.config.h_lag --15 --max height for stalagmites
|
|
||||||
local H_LAC = caverealms.config.h_lac --20 --...stalactites
|
|
||||||
local H_CRY = caverealms.config.h_cry --9 --max height of glow crystals
|
|
||||||
local H_CLAC = caverealms.config.h_clac --13 --max height of glow crystal stalactites
|
|
||||||
|
|
||||||
function caverealms:above_solid(x,y,z,area,data)
|
|
||||||
local c_air = minetest.get_content_id("air")
|
|
||||||
|
|
||||||
local ai = area:index(x,y+1,z-3)
|
|
||||||
if data[ai] == c_air then
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function caverealms:below_solid(x,y,z,area,data)
|
|
||||||
local c_air = minetest.get_content_id("air")
|
|
||||||
|
|
||||||
local ai = area:index(x,y-1,z-3)
|
|
||||||
if data[ai] == c_air then
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--stalagmite spawner
|
|
||||||
function caverealms:stalagmite(x,y,z, area, data)
|
|
||||||
|
|
||||||
if not caverealms:below_solid(x,y,z,area,data) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
--contest ids
|
|
||||||
local c_stone = minetest.get_content_id("default:stone")
|
|
||||||
|
|
||||||
local top = math.random(6,H_LAG) --grab a random height for the stalagmite
|
|
||||||
for j = 0, top do --y
|
|
||||||
for k = -3, 3 do
|
|
||||||
for l = -3, 3 do
|
|
||||||
if j == 0 then
|
|
||||||
if k*k + l*l <= 9 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
elseif j <= top/5 then
|
|
||||||
if k*k + l*l <= 4 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
elseif j <= top/5 * 3 then
|
|
||||||
if k*k + l*l <= 1 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local vi = area:index(x, y+j, z-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--stalactite spawner
|
|
||||||
function caverealms:stalactite(x,y,z, area, data)
|
|
||||||
|
|
||||||
if not caverealms:above_solid(x,y,z,area,data) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
--contest ids
|
|
||||||
local c_stone = minetest.get_content_id("default:stone")--("caverealms:limestone")
|
|
||||||
|
|
||||||
local bot = math.random(-H_LAC, -6) --grab a random height for the stalagmite
|
|
||||||
for j = bot, 0 do --y
|
|
||||||
for k = -3, 3 do
|
|
||||||
for l = -3, 3 do
|
|
||||||
if j >= -1 then
|
|
||||||
if k*k + l*l <= 9 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
elseif j >= bot/5 then
|
|
||||||
if k*k + l*l <= 4 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
elseif j >= bot/5 * 3 then
|
|
||||||
if k*k + l*l <= 1 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local vi = area:index(x, y+j, z-3)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--glowing crystal stalagmite spawner
|
|
||||||
function caverealms:crystal_stalagmite(x,y,z, area, data, biome)
|
|
||||||
|
|
||||||
if not caverealms:below_solid(x,y,z,area,data) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
--contest ids
|
|
||||||
local c_stone = minetest.get_content_id("default:stone")
|
|
||||||
local c_crystal = minetest.get_content_id("caverealms:glow_crystal")
|
|
||||||
local c_crystore = minetest.get_content_id("caverealms:glow_ore")
|
|
||||||
local c_emerald = minetest.get_content_id("caverealms:glow_emerald")
|
|
||||||
local c_emore = minetest.get_content_id("caverealms:glow_emerald_ore")
|
|
||||||
local c_mesecry = minetest.get_content_id("caverealms:glow_mese")
|
|
||||||
local c_meseore = minetest.get_content_id("default:stone_with_mese")
|
|
||||||
local c_ruby = minetest.get_content_id("caverealms:glow_ruby")
|
|
||||||
local c_rubore = minetest.get_content_id("caverealms:glow_ruby_ore")
|
|
||||||
local c_ameth = minetest.get_content_id("caverealms:glow_amethyst")
|
|
||||||
local c_amethore = minetest.get_content_id("caverealms:glow_amethyst_ore")
|
|
||||||
local c_ice = minetest.get_content_id("default:ice")
|
|
||||||
local c_thinice = minetest.get_content_id("caverealms:thin_ice")
|
|
||||||
|
|
||||||
--for randomness
|
|
||||||
local mode = 1
|
|
||||||
if math.random(15) == 1 then
|
|
||||||
mode = 2
|
|
||||||
end
|
|
||||||
if biome == 3 then
|
|
||||||
if math.random(25) == 1 then
|
|
||||||
mode = 2
|
|
||||||
else
|
|
||||||
mode = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if biome == 4 or biome == 5 then
|
|
||||||
if math.random(3) == 1 then
|
|
||||||
mode = 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local stalids = {
|
|
||||||
{ {c_crystore, c_crystal}, {c_emore, c_emerald} },
|
|
||||||
{ {c_emore, c_emerald}, {c_crystore, c_crystal} },
|
|
||||||
{ {c_emore, c_emerald}, {c_meseore, c_mesecry} },
|
|
||||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
|
||||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
|
||||||
{ {c_rubore, c_ruby}, {c_meseore, c_mesecry}},
|
|
||||||
{ {c_crystore, c_crystal}, {c_rubore, c_ruby} },
|
|
||||||
{ {c_rubore, c_ruby}, {c_emore, c_emerald}},
|
|
||||||
{ {c_amethore, c_ameth}, {c_meseore, c_mesecry} },
|
|
||||||
}
|
|
||||||
|
|
||||||
local nid_a
|
|
||||||
local nid_b
|
|
||||||
local nid_s = c_stone --stone base, will be rewritten to ice in certain biomes
|
|
||||||
|
|
||||||
if biome > 3 and biome < 6 then
|
|
||||||
if mode == 1 then
|
|
||||||
nid_a = c_ice
|
|
||||||
nid_b = c_thinice
|
|
||||||
nid_s = c_ice
|
|
||||||
else
|
|
||||||
nid_a = c_crystore
|
|
||||||
nid_b = c_crystal
|
|
||||||
end
|
|
||||||
elseif mode == 1 then
|
|
||||||
nid_a = stalids[biome][1][1]
|
|
||||||
nid_b = stalids[biome][1][2]
|
|
||||||
else
|
|
||||||
nid_a = stalids[biome][2][1]
|
|
||||||
nid_b = stalids[biome][2][2]
|
|
||||||
end
|
|
||||||
|
|
||||||
local top = math.random(5,H_CRY) --grab a random height for the stalagmite
|
|
||||||
for j = 0, top do --y
|
|
||||||
for k = -3, 3 do
|
|
||||||
for l = -3, 3 do
|
|
||||||
if j == 0 then
|
|
||||||
if k*k + l*l <= 9 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = nid_s
|
|
||||||
end
|
|
||||||
elseif j <= top/5 then
|
|
||||||
if k*k + l*l <= 4 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = nid_a
|
|
||||||
end
|
|
||||||
elseif j <= top/5 * 3 then
|
|
||||||
if k*k + l*l <= 1 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = nid_b
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local vi = area:index(x, y+j, z-3)
|
|
||||||
data[vi] = nid_b
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--crystal stalactite spawner
|
|
||||||
function caverealms:crystal_stalactite(x,y,z, area, data, biome)
|
|
||||||
|
|
||||||
if not caverealms:above_solid(x,y,z,area,data) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
--contest ids
|
|
||||||
local c_stone = minetest.get_content_id("default:stone")
|
|
||||||
local c_crystore = minetest.get_content_id("caverealms:glow_ore")
|
|
||||||
local c_crystal = minetest.get_content_id("caverealms:glow_crystal")
|
|
||||||
local c_emerald = minetest.get_content_id("caverealms:glow_emerald")
|
|
||||||
local c_emore = minetest.get_content_id("caverealms:glow_emerald_ore")
|
|
||||||
local c_mesecry = minetest.get_content_id("caverealms:glow_mese")
|
|
||||||
local c_meseore = minetest.get_content_id("default:stone_with_mese")
|
|
||||||
local c_ruby = minetest.get_content_id("caverealms:glow_ruby")
|
|
||||||
local c_rubore = minetest.get_content_id("caverealms:glow_ruby_ore")
|
|
||||||
local c_ameth = minetest.get_content_id("caverealms:glow_amethyst")
|
|
||||||
local c_amethore = minetest.get_content_id("caverealms:glow_amethyst_ore")
|
|
||||||
local c_ice = minetest.get_content_id("default:ice")
|
|
||||||
local c_thinice = minetest.get_content_id("caverealms:hanging_thin_ice")
|
|
||||||
|
|
||||||
--for randomness
|
|
||||||
local mode = 1
|
|
||||||
if math.random(15) == 1 then
|
|
||||||
mode = 2
|
|
||||||
end
|
|
||||||
if biome == 3 then
|
|
||||||
if math.random(25) == 1 then
|
|
||||||
mode = 2
|
|
||||||
else
|
|
||||||
mode = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if biome == 4 or biome == 5 then
|
|
||||||
if math.random(3) == 1 then
|
|
||||||
mode = 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local stalids = {
|
|
||||||
{ {c_crystore, c_crystal}, {c_emore, c_emerald} },
|
|
||||||
{ {c_emore, c_emerald}, {c_crystore, c_crystal} },
|
|
||||||
{ {c_emore, c_emerald}, {c_meseore, c_mesecry} },
|
|
||||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
|
||||||
{ {c_ice, c_thinice}, {c_crystore, c_crystal}},
|
|
||||||
{ {c_rubore, c_ruby}, {c_meseore, c_mesecry}},
|
|
||||||
{ {c_crystore, c_crystal}, {c_rubore, c_ruby} },
|
|
||||||
{ {c_rubore, c_ruby}, {c_emore, c_emerald}},
|
|
||||||
{ {c_amethore, c_ameth}, {c_meseore, c_mesecry} },
|
|
||||||
}
|
|
||||||
|
|
||||||
local nid_a
|
|
||||||
local nid_b
|
|
||||||
local nid_s = c_stone --stone base, will be rewritten to ice in certain biomes
|
|
||||||
|
|
||||||
if biome > 3 and biome < 6 then
|
|
||||||
if mode == 1 then
|
|
||||||
nid_a = c_ice
|
|
||||||
nid_b = c_thinice
|
|
||||||
nid_s = c_ice
|
|
||||||
else
|
|
||||||
nid_a = c_crystore
|
|
||||||
nid_b = c_crystal
|
|
||||||
end
|
|
||||||
elseif mode == 1 then
|
|
||||||
nid_a = stalids[biome][1][1]
|
|
||||||
nid_b = stalids[biome][1][2]
|
|
||||||
else
|
|
||||||
nid_a = stalids[biome][2][1]
|
|
||||||
nid_b = stalids[biome][2][2]
|
|
||||||
end
|
|
||||||
|
|
||||||
local bot = math.random(-H_CLAC, -6) --grab a random height for the stalagmite
|
|
||||||
for j = bot, 0 do --y
|
|
||||||
for k = -3, 3 do
|
|
||||||
for l = -3, 3 do
|
|
||||||
if j >= -1 then
|
|
||||||
if k*k + l*l <= 9 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = nid_s
|
|
||||||
end
|
|
||||||
elseif j >= bot/5 then
|
|
||||||
if k*k + l*l <= 4 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = nid_a
|
|
||||||
end
|
|
||||||
elseif j >= bot/5 * 3 then
|
|
||||||
if k*k + l*l <= 1 then
|
|
||||||
local vi = area:index(x+k, y+j, z+l-3)
|
|
||||||
data[vi] = nid_b
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local vi = area:index(x, y+j, z-3)
|
|
||||||
data[vi] = nid_b
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--glowing crystal stalagmite spawner
|
|
||||||
function caverealms:salt_stalagmite(x,y,z, area, data, biome)
|
|
||||||
|
|
||||||
if not caverealms:below_solid(x,y,z,area,data) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
--contest ids
|
|
||||||
local c_stone = minetest.get_content_id("default:stone")
|
|
||||||
local c_salt = minetest.get_content_id("caverealms:salt_crystal")
|
|
||||||
|
|
||||||
local scale = math.random(2, 4)
|
|
||||||
if scale == 2 then
|
|
||||||
for j = -3, 3 do
|
|
||||||
for k = -3, 3 do
|
|
||||||
local vi = area:index(x+j, y, z+k)
|
|
||||||
data[vi] = c_stone
|
|
||||||
if math.abs(j) ~= 3 and math.abs(k) ~= 3 then
|
|
||||||
local vi = area:index(x+j, y+1, z+k)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
for j = -4, 4 do
|
|
||||||
for k = -4, 4 do
|
|
||||||
local vi = area:index(x+j, y, z+k)
|
|
||||||
data[vi] = c_stone
|
|
||||||
if math.abs(j) ~= 4 and math.abs(k) ~= 4 then
|
|
||||||
local vi = area:index(x+j, y+1, z+k)
|
|
||||||
data[vi] = c_stone
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for j = 2, scale + 2 do --y
|
|
||||||
for k = -2, scale - 2 do
|
|
||||||
for l = -2, scale - 2 do
|
|
||||||
local vi = area:index(x+k, y+j, z+l)
|
|
||||||
data[vi] = c_salt -- make cube
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--function to create giant 'shrooms
|
|
||||||
function caverealms:giant_shroom(x, y, z, area, data)
|
|
||||||
|
|
||||||
if not caverealms:below_solid(x,y,z,area,data) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local c_cap
|
|
||||||
local c_stem
|
|
||||||
|
|
||||||
--as usual, grab the content ID's
|
|
||||||
if minetest.get_modpath("ethereal") then
|
|
||||||
c_stem = minetest.get_content_id("ethereal:mushroom_trunk")
|
|
||||||
c_cap = minetest.get_content_id("ethereal:mushroom")
|
|
||||||
else
|
|
||||||
c_stem = minetest.get_content_id("caverealms:mushroom_stem")
|
|
||||||
c_cap = minetest.get_content_id("caverealms:mushroom_cap")
|
|
||||||
end
|
|
||||||
|
|
||||||
local c_gills = minetest.get_content_id("caverealms:mushroom_gills")
|
|
||||||
|
|
||||||
z = z - 5
|
|
||||||
--cap
|
|
||||||
for k = -5, 5 do
|
|
||||||
for l = -5, 5 do
|
|
||||||
if k*k + l*l <= 25 then
|
|
||||||
local vi = area:index(x+k, y+5, z+l)
|
|
||||||
data[vi] = c_cap
|
|
||||||
end
|
|
||||||
if k*k + l*l <= 16 then
|
|
||||||
local vi = area:index(x+k, y+6, z+l)
|
|
||||||
data[vi] = c_cap
|
|
||||||
vi = area:index(x+k, y+5, z+l)
|
|
||||||
data[vi] = c_gills
|
|
||||||
end
|
|
||||||
if k*k + l*l <= 9 then
|
|
||||||
local vi = area:index(x+k, y+7, z+l)
|
|
||||||
data[vi] = c_cap
|
|
||||||
end
|
|
||||||
if k*k + l*l <= 4 then
|
|
||||||
local vi = area:index(x+k, y+8, z+l)
|
|
||||||
data[vi] = c_cap
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
--stem
|
|
||||||
for j = 0, 5 do
|
|
||||||
for k = -1,1 do
|
|
||||||
local vi = area:index(x+k, y+j, z)
|
|
||||||
data[vi] = c_stem
|
|
||||||
if k == 0 then
|
|
||||||
local ai = area:index(x, y+j, z+1)
|
|
||||||
data[ai] = c_stem
|
|
||||||
ai = area:index(x, y+j, z-1)
|
|
||||||
data[ai] = c_stem
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,24 +0,0 @@
|
||||||
-- caverealms v.0.8 by HeroOfTheWinds
|
|
||||||
-- original cave code modified from paramat's subterrain
|
|
||||||
-- For Minetest 0.4.8 stable
|
|
||||||
-- Depends default
|
|
||||||
-- License: code WTFPL
|
|
||||||
|
|
||||||
caverealms = {} --create a container for functions and constants
|
|
||||||
|
|
||||||
--grab a shorthand for the filepath of the mod
|
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
|
||||||
|
|
||||||
--load companion lua files
|
|
||||||
dofile(modpath.."/config.lua") --configuration file; holds various constants
|
|
||||||
dofile(modpath.."/crafting.lua") --crafting recipes
|
|
||||||
dofile(modpath.."/nodes.lua") --node definitions
|
|
||||||
dofile(modpath.."/functions.lua") --function definitions
|
|
||||||
dofile(modpath.."/plants.lua")
|
|
||||||
dofile(modpath.."/biomes.lua")
|
|
||||||
|
|
||||||
if minetest.get_modpath("mobs_monster") then
|
|
||||||
if caverealms.config.dm_spawn == true then
|
|
||||||
dofile(modpath.."/dungeon_master.lua") --special DMs for DM's Lair biome
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1 +0,0 @@
|
||||||
name = caverealms
|
|
|
@ -1,521 +0,0 @@
|
||||||
-- CaveRealms nodes.lua
|
|
||||||
|
|
||||||
--NODES--
|
|
||||||
|
|
||||||
--glowing crystal
|
|
||||||
minetest.register_node("caverealms:glow_crystal", {
|
|
||||||
description = "Glow Sapphire",
|
|
||||||
tiles = {"caverealms_glow_crystal.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 13,
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
--glowing emerald
|
|
||||||
minetest.register_node("caverealms:glow_emerald", {
|
|
||||||
description = "Glow Emerald",
|
|
||||||
tiles = {"caverealms_glow_emerald.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 13,
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
--glowing mese crystal blocks
|
|
||||||
minetest.register_node("caverealms:glow_mese", {
|
|
||||||
description = "Glow Mese Crystal",
|
|
||||||
tiles = {"caverealms_glow_mese.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 13,
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
--glowing ruby
|
|
||||||
minetest.register_node("caverealms:glow_ruby", {
|
|
||||||
description = "Glow Ruby",
|
|
||||||
tiles = {"caverealms_glow_ruby.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 13,
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
--glowing amethyst
|
|
||||||
minetest.register_node("caverealms:glow_amethyst", {
|
|
||||||
description = "Glow Amethyst",
|
|
||||||
tiles = {"caverealms_glow_amethyst.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 13,
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
--embedded crystal
|
|
||||||
minetest.register_node("caverealms:glow_ore", {
|
|
||||||
description = "Glow Crystal Ore",
|
|
||||||
tiles = {"caverealms_glow_ore.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=2},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 10,
|
|
||||||
paramtype = "light",
|
|
||||||
})
|
|
||||||
|
|
||||||
--embedded emerald
|
|
||||||
minetest.register_node("caverealms:glow_emerald_ore", {
|
|
||||||
description = "Glow Emerald Ore",
|
|
||||||
tiles = {"caverealms_glow_emerald_ore.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=2},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 10,
|
|
||||||
paramtype = "light",
|
|
||||||
})
|
|
||||||
|
|
||||||
--embedded ruby
|
|
||||||
minetest.register_node("caverealms:glow_ruby_ore", {
|
|
||||||
description = "Glow Ruby Ore",
|
|
||||||
tiles = {"caverealms_glow_ruby_ore.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=2},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 10,
|
|
||||||
paramtype = "light",
|
|
||||||
})
|
|
||||||
|
|
||||||
--embedded amethyst
|
|
||||||
minetest.register_node("caverealms:glow_amethyst_ore", {
|
|
||||||
description = "Glow Amethyst Ore",
|
|
||||||
tiles = {"caverealms_glow_amethyst_ore.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=2},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 10,
|
|
||||||
paramtype = "light",
|
|
||||||
})
|
|
||||||
|
|
||||||
--thin (transparent) ice
|
|
||||||
minetest.register_node("caverealms:thin_ice", {
|
|
||||||
description = "Thin Ice",
|
|
||||||
tiles = {"caverealms_thin_ice.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
freezemelt = "default:water_source",
|
|
||||||
paramtype = "light",
|
|
||||||
})
|
|
||||||
|
|
||||||
--salt crystal
|
|
||||||
minetest.register_node("caverealms:salt_crystal", {
|
|
||||||
description = "Salt Crystal",
|
|
||||||
tiles = {"caverealms_salt_crystal.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=2},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 11,
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
--glowing crystal gem
|
|
||||||
minetest.register_node("caverealms:glow_gem", {
|
|
||||||
description = "Glow Gem",
|
|
||||||
tiles = {"caverealms_glow_gem.png"},
|
|
||||||
inventory_image = "caverealms_glow_gem.png",
|
|
||||||
wield_image = "caverealms_glow_gem.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 11,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 0.75,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
--glowing salt gem
|
|
||||||
minetest.register_node("caverealms:salt_gem", {
|
|
||||||
description = "Salt Gem",
|
|
||||||
tiles = {"caverealms_salt_gem.png"},
|
|
||||||
inventory_image = "caverealms_salt_gem.png",
|
|
||||||
wield_image = "caverealms_salt_gem.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 11,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 0.75,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
--stone spike
|
|
||||||
minetest.register_node("caverealms:spike", {
|
|
||||||
description = "Stone Spike",
|
|
||||||
tiles = {"caverealms_spike.png"},
|
|
||||||
inventory_image = "caverealms_spike.png",
|
|
||||||
wield_image = "caverealms_spike.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
light_source = 3,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 0.75,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
--upward pointing icicle
|
|
||||||
minetest.register_node("caverealms:icicle_up", {
|
|
||||||
description = "Icicle",
|
|
||||||
tiles = {"caverealms_icicle_up.png"},
|
|
||||||
inventory_image = "caverealms_icicle_up.png",
|
|
||||||
wield_image = "caverealms_icicle_up.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 8,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 1.0,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
--downward pointing icicle
|
|
||||||
minetest.register_node("caverealms:icicle_down", {
|
|
||||||
description = "Icicle",
|
|
||||||
tiles = {"caverealms_icicle_down.png"},
|
|
||||||
inventory_image = "caverealms_icicle_down.png",
|
|
||||||
wield_image = "caverealms_icicle_down.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
light_source = 8,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 1.0,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
--cave mossy cobble - bluish?
|
|
||||||
minetest.register_node("caverealms:stone_with_moss", {
|
|
||||||
description = "Cave Stone with Moss",
|
|
||||||
tiles = {"default_cobble.png^caverealms_moss.png", "default_cobble.png", "default_cobble.png^caverealms_moss_side.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=1, cracky=3},
|
|
||||||
drop = 'default:cobble',
|
|
||||||
sounds = default.node_sound_dirt_defaults({
|
|
||||||
footstep = {name="default_grass_footstep", gain=0.25},
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
--cave lichen-covered cobble - purple-ish
|
|
||||||
minetest.register_node("caverealms:stone_with_lichen", {
|
|
||||||
description = "Cave Stone with Lichen",
|
|
||||||
tiles = {"default_cobble.png^caverealms_lichen.png", "default_cobble.png", "default_cobble.png^caverealms_lichen_side.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=1, cracky=3},
|
|
||||||
drop = 'default:cobble',
|
|
||||||
sounds = default.node_sound_dirt_defaults({
|
|
||||||
footstep = {name="default_grass_footstep", gain=0.25},
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
--cave algae-covered cobble - yellow-ish
|
|
||||||
minetest.register_node("caverealms:stone_with_algae", {
|
|
||||||
description = "Cave Stone with Algae",
|
|
||||||
tiles = {"default_cobble.png^caverealms_algae.png", "default_cobble.png", "default_cobble.png^caverealms_algae_side.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=1, cracky=3},
|
|
||||||
drop = 'default:cobble',
|
|
||||||
sounds = default.node_sound_dirt_defaults({
|
|
||||||
footstep = {name="default_grass_footstep", gain=0.25},
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
--tiny-salt-crystal-covered cobble - pink-ish
|
|
||||||
minetest.register_node("caverealms:stone_with_salt", {
|
|
||||||
description = "Salt Crystal",
|
|
||||||
tiles = {"caverealms_salty2.png"},
|
|
||||||
light_source = 9,
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = true,
|
|
||||||
drawtype = "glasslike",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--Hot Cobble - cobble with lava instead of mortar XD
|
|
||||||
minetest.register_node("caverealms:hot_cobble", {
|
|
||||||
description = "Hot Cobble",
|
|
||||||
tiles = {"caverealms_hot_cobble.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=1, hot=1, unbreakable = 1, stone = 1},
|
|
||||||
damage_per_second = 1,
|
|
||||||
light_source = 3,
|
|
||||||
paramtype = "light",
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--Glow Obsidian
|
|
||||||
minetest.register_node("caverealms:glow_obsidian", {
|
|
||||||
description = "Glowing Obsidian",
|
|
||||||
tiles = {"caverealms_glow_obsidian.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=1, level=2},
|
|
||||||
light_source = 7,
|
|
||||||
paramtype = "light",
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--Glow Obsidian 2 - has traces of lava
|
|
||||||
minetest.register_node("caverealms:glow_obsidian_2", {
|
|
||||||
description = "Hot Glowing Obsidian",
|
|
||||||
tiles = {"caverealms_glow_obsidian2.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=1, hot=1, level=2},
|
|
||||||
light_source = 9,
|
|
||||||
paramtype = "light",
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--Glow Obsidian Bricks
|
|
||||||
minetest.register_node("caverealms:glow_obsidian_brick", {
|
|
||||||
description = "Glow Obsidian Brick",
|
|
||||||
tiles = {"caverealms_glow_obsidian_brick.png"},
|
|
||||||
light_source = 7,
|
|
||||||
groups = {cracky = 1, level = 2},
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("caverealms:glow_obsidian_brick_2", {
|
|
||||||
description = "Glow Obsidian Brick",
|
|
||||||
tiles = {"caverealms_glow_obsidian_brick_2.png"},
|
|
||||||
light_source = 9,
|
|
||||||
groups = {cracky = 1, level = 2},
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--Glow Obsidian Stairs/Slabs
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"glow_obsidian_brick",
|
|
||||||
"caverealms:glow_obsidian_brick",
|
|
||||||
{cracky = 1, level = 2},
|
|
||||||
{"caverealms_glow_obsidian_brick.png"},
|
|
||||||
"Glow Obsidian Brick Stair",
|
|
||||||
"Glow Obsidian Brick Slab",
|
|
||||||
default.node_sound_stone_defaults())
|
|
||||||
|
|
||||||
stairs.register_stair_and_slab(
|
|
||||||
"glow_obsidian_brick_2",
|
|
||||||
"caverealms:glow_obsidian_brick_2",
|
|
||||||
{cracky = 1, level = 2},
|
|
||||||
{"caverealms_glow_obsidian_brick_2.png"},
|
|
||||||
"Glow Obsidian Brick Stair",
|
|
||||||
"Glow Obsidian Brick Slab",
|
|
||||||
default.node_sound_stone_defaults())
|
|
||||||
|
|
||||||
--Glow Obsidian Glass
|
|
||||||
minetest.register_node("caverealms:glow_obsidian_glass", {
|
|
||||||
description = "Glow Obsidian Glass",
|
|
||||||
drawtype = "glasslike_framed_optional",
|
|
||||||
tiles = {"caverealms_glow_obsidian_glass.png", "default_obsidian_glass_detail.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
light_source = 13,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
groups = {cracky = 3},
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--Coal Dust
|
|
||||||
minetest.register_node("caverealms:coal_dust", {
|
|
||||||
description = "Coal Dust",
|
|
||||||
tiles = {"caverealms_coal_dust.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {crumbly=3, falling_node=1, sand=1},
|
|
||||||
sounds = default.node_sound_sand_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--glow worms
|
|
||||||
minetest.register_node("caverealms:glow_worm", {
|
|
||||||
description = "Blue Glow Worms",
|
|
||||||
tiles = {"caverealms_glow_worm.png"},
|
|
||||||
inventory_image = "caverealms_glow_worm.png",
|
|
||||||
wield_image = "caverealms_glow_worm.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {oddly_breakable_by_hand=3},
|
|
||||||
light_source = 9,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 1.0,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("caverealms:glow_worm_green", {
|
|
||||||
description = "Green Glow Worms",
|
|
||||||
tiles = {"caverealms_glow_worm_green.png"},
|
|
||||||
inventory_image = "caverealms_glow_worm_green.png",
|
|
||||||
wield_image = "caverealms_glow_worm_green.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {oddly_breakable_by_hand=3},
|
|
||||||
light_source = 9,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 1.0,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("caverealms:fire_vine", {
|
|
||||||
description = "Fire Vine",
|
|
||||||
tiles = {"caverealms_fire_vine.png"},
|
|
||||||
inventory_image = "caverealms_fire_vine.png",
|
|
||||||
wield_image = "caverealms_fire_vine.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
damage_per_second = 1,
|
|
||||||
groups = {oddly_breakable_by_hand=3},
|
|
||||||
light_source = 9,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 1.0,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
--define special flame so that it does not expire
|
|
||||||
minetest.register_node("caverealms:constant_flame", {
|
|
||||||
description = "Fire",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {{
|
|
||||||
name="fire_basic_flame_animated.png",
|
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1},
|
|
||||||
}},
|
|
||||||
inventory_image = "fire_basic_flame.png",
|
|
||||||
light_source = 14,
|
|
||||||
groups = {igniter=2, dig_immediate=3, hot=3, not_in_creative_inventory=1},
|
|
||||||
paramtype = "light",
|
|
||||||
drop = '',
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
floodable = true,
|
|
||||||
damage_per_second = 4,
|
|
||||||
})
|
|
||||||
|
|
||||||
--dungeon master statue (nodebox)
|
|
||||||
minetest.register_node("caverealms:dm_statue", {
|
|
||||||
description = "Dungeon Master Statue",
|
|
||||||
tiles = {
|
|
||||||
"caverealms_dm_stone.png",
|
|
||||||
"caverealms_dm_stone.png",
|
|
||||||
"caverealms_dm_stone.png",
|
|
||||||
"caverealms_dm_stone.png",
|
|
||||||
"caverealms_dm_stone.png",
|
|
||||||
"caverealms_stone_eyes.png"
|
|
||||||
},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {cracky=2},
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, -- NodeBox1
|
|
||||||
{-0.25, -0.125, -0.1875, 0.25, 0.5, 0.1875}, -- NodeBox2
|
|
||||||
{-0.375, 0, -0.125, -0.25, 0.4375, 0.125}, -- NodeBox3
|
|
||||||
{0.25, 0.125, -0.4375, 0.375, 0.375, 0.1875}, -- NodeBox4
|
|
||||||
{-0.25, -0.5, -0.125, -0.125, -0.125, 0.125}, -- NodeBox5
|
|
||||||
{0.125, -0.3125, -0.125, 0.25, 0, 0.125}, -- NodeBox6
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "regular"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- Compatibility
|
|
||||||
minetest.register_alias("caverealms:hanging_thin_ice", "caverealms:thin_ice")
|
|
||||||
|
|
||||||
minetest.register_alias("caverealms:spike_2", "caverealms:spike")
|
|
||||||
minetest.register_alias("caverealms:spike_3", "caverealms:spike")
|
|
||||||
minetest.register_alias("caverealms:spike_4", "caverealms:spike")
|
|
||||||
minetest.register_alias("caverealms:spike_5", "caverealms:spike")
|
|
||||||
|
|
||||||
minetest.register_alias("caverealms:salt_gem_2", "caverealms:salt_gem")
|
|
||||||
minetest.register_alias("caverealms:salt_gem_3", "caverealms:salt_gem")
|
|
||||||
minetest.register_alias("caverealms:salt_gem_4", "caverealms:salt_gem")
|
|
||||||
minetest.register_alias("caverealms:salt_gem_5", "caverealms:salt_gem")
|
|
||||||
|
|
||||||
minetest.register_alias("caverealms:glow_gem_2", "caverealms:glow_gem")
|
|
||||||
minetest.register_alias("caverealms:glow_gem_3", "caverealms:glow_gem")
|
|
||||||
minetest.register_alias("caverealms:glow_gem_4", "caverealms:glow_gem")
|
|
||||||
minetest.register_alias("caverealms:glow_gem_5", "caverealms:glow_gem")
|
|
|
@ -1,191 +0,0 @@
|
||||||
-- Cavrealms plants and trees for lichen, moss and algae biomes
|
|
||||||
|
|
||||||
-- Lichen biome
|
|
||||||
|
|
||||||
-- glowing fungi
|
|
||||||
minetest.register_node("caverealms:fungus", {
|
|
||||||
description = "Glowing Fungus",
|
|
||||||
tiles = {"caverealms_fungi.png"},
|
|
||||||
inventory_image = "caverealms_fungi.png",
|
|
||||||
wield_image = "caverealms_fungi.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {oddly_breakable_by_hand = 3, attached_node = 1, flammable = 1},
|
|
||||||
light_source = 5,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 1.0,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- mycena mushroom
|
|
||||||
minetest.register_node("caverealms:mycena", {
|
|
||||||
description = "Mycena Mushroom",
|
|
||||||
tiles = {"caverealms_mycena.png"},
|
|
||||||
inventory_image = "caverealms_mycena.png",
|
|
||||||
wield_image = "caverealms_mycena.png",
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {oddly_breakable_by_hand = 3, attached_node = 1, flammable = 1},
|
|
||||||
light_source = 6,
|
|
||||||
paramtype = "light",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
visual_scale = 1.0,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- giant mushroom
|
|
||||||
if minetest.get_modpath("ethereal") then
|
|
||||||
minetest.register_alias("caverealms:mushroom_cap", "ethereal:mushroom")
|
|
||||||
minetest.register_alias("caverealms:mushroom_stem", "ethereal:mushroom_trunk")
|
|
||||||
else
|
|
||||||
-- stem
|
|
||||||
minetest.register_node("caverealms:mushroom_stem", {
|
|
||||||
description = "Giant Mushroom Stem",
|
|
||||||
tiles = {"caverealms_mushroom_stem.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {choppy=2, oddly_breakable_by_hand=1},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- cap
|
|
||||||
minetest.register_node("caverealms:mushroom_cap", {
|
|
||||||
description = "Giant Mushroom Cap",
|
|
||||||
tiles = {"caverealms_mushroom_cap.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {choppy=2, oddly_breakable_by_hand=1,},
|
|
||||||
drop = {
|
|
||||||
max_items = 1,
|
|
||||||
items = {
|
|
||||||
{items = {"caverealms:mushroom_sapling"}, rarity = 20},
|
|
||||||
{items = {"caverealms:mushroom_cap"}}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- sapling
|
|
||||||
minetest.register_node("caverealms:mushroom_sapling", {
|
|
||||||
description = "Mushroom Tree Sapling",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"caverealms_mushroom_sapling.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
|
||||||
},
|
|
||||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2},
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- gills
|
|
||||||
minetest.register_node("caverealms:mushroom_gills", {
|
|
||||||
description = "Giant Mushroom Gills",
|
|
||||||
tiles = {"caverealms_mushroom_gills.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
light_source = 10,
|
|
||||||
walkable = false,
|
|
||||||
groups = {choppy=2, oddly_breakable_by_hand=1},
|
|
||||||
drawtype = "plantlike",
|
|
||||||
paramtype = "light",
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- Saplings
|
|
||||||
|
|
||||||
-- grow trees
|
|
||||||
local add_tree = function (pos, ofx, ofy, ofz, schem)
|
|
||||||
if not schem then
|
|
||||||
print ("Schematic not found")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
minetest.swap_node(pos, {name = "air"})
|
|
||||||
minetest.place_schematic(
|
|
||||||
{x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz},
|
|
||||||
schem, 0, nil, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
local path = minetest.get_modpath("caverealms").."/schematics/"
|
|
||||||
|
|
||||||
-- giant mushrooms
|
|
||||||
function grow_caverealms_mushroom(pos)
|
|
||||||
add_tree(pos, 5, 0, 5, path .. "shroom.mts")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- height check
|
|
||||||
local function enough_height(pos, height)
|
|
||||||
local nod = minetest.line_of_sight(
|
|
||||||
{x = pos.x, y = pos.y + 1, z = pos.z},
|
|
||||||
{x = pos.x, y = pos.y + height, z = pos.z})
|
|
||||||
if not nod then
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Caverealms grow sapling",
|
|
||||||
nodenames = {"ethereal:mushroom_sapling", "caverealms:mushroom_sapling"},
|
|
||||||
interval = 10,
|
|
||||||
chance = 50,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos, node)
|
|
||||||
local light_level = minetest.get_node_light(pos)
|
|
||||||
-- check light level
|
|
||||||
if not light_level or light_level > 10 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- get node under sapling
|
|
||||||
local under = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name
|
|
||||||
-- check if registered
|
|
||||||
if not minetest.registered_nodes[node.name] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- ethereal sapling on lichen stone
|
|
||||||
if node.name == "ethereal:mushroom_sapling"
|
|
||||||
and under == "caverealms:stone_with_lichen"
|
|
||||||
and enough_height(pos, 10) then
|
|
||||||
grow_caverealms_mushroom(pos)
|
|
||||||
-- caverealms sapling on lichen stone
|
|
||||||
elseif node.name == "caverealms:mushroom_sapling"
|
|
||||||
and under == "caverealms:stone_with_lichen"
|
|
||||||
and enough_height(pos, 10) then
|
|
||||||
grow_caverealms_mushroom(pos)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- spread moss/lichen/algae to nearby cobblestone
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Caverealms stone spread",
|
|
||||||
nodenames = {
|
|
||||||
"caverealms:stone_with_moss",
|
|
||||||
"caverealms:stone_with_lichen",
|
|
||||||
"caverealms:stone_with_algae",
|
|
||||||
},
|
|
||||||
neighbors = {"air"},
|
|
||||||
interval = 16,
|
|
||||||
chance = 50,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos, node)
|
|
||||||
local num = minetest.find_nodes_in_area_under_air(
|
|
||||||
{x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
|
|
||||||
{x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
|
|
||||||
"default:cobble")
|
|
||||||
if #num > 0 then
|
|
||||||
minetest.set_node(num[math.random(#num)], {name = node.name})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
Before Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 925 B |
Before Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 754 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,276 +0,0 @@
|
||||||
Farming Redo mod for Minetest
|
|
||||||
=============================
|
|
||||||
|
|
||||||
Information
|
|
||||||
-----------
|
|
||||||
|
|
||||||
This mod replaces the default `farming` mod with a fully compatible API that allows
|
|
||||||
players to grow crops even when they are not nearby. It also includes many new foods
|
|
||||||
and crops which can be planted directly onto tilled soil without seeds. Crops that do
|
|
||||||
require seeds like wheat and cotton are found when digging in long grasses, and will
|
|
||||||
require player to stay nearby until they germinate before growing normally.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Tech information
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Crops grow by adding your new plant to the {growing = 1} group and numbering the stages from _1 to as many stages as you like, but the underscore MUST be used only once in the node name to separate plant from stage number e.g.
|
|
||||||
|
|
||||||
* "farming:cotton_1" through to "farming:cotton_8"
|
|
||||||
* "farming:wheat_1" through to "farming:wheat_8"
|
|
||||||
* "farming:cucumber_1" through to "farming:cucumber_4"
|
|
||||||
|
|
||||||
https://forum.minetest.net/viewtopic.php?id=9019
|
|
||||||
|
|
||||||
Farming Redo also works with Bonemeal mod for quick growing crops and saplings which can
|
|
||||||
be found at https://notabug.org/TenPlus1/bonemeal
|
|
||||||
|
|
||||||
#### Optional dependences:
|
|
||||||
|
|
||||||
* default
|
|
||||||
* mcl_core, mcl_sounds, mcl_farming, mcl_stairs
|
|
||||||
* stairs
|
|
||||||
* lucky_block (adds 47 lucky blocks)
|
|
||||||
* toolranks
|
|
||||||
|
|
||||||
#### Configuration
|
|
||||||
|
|
||||||
`farming.conf` is used to load custom settings for each crop and can be found in either the
|
|
||||||
farming mod folder or the world folder. Also `minetest.conf` contains a setting for crop growth speed.
|
|
||||||
|
|
||||||
|
|
||||||
| Configuration | type | default | file | Notes |
|
|
||||||
| -------------------- | ----- | ------- | ------------ | ----------------------------------------- |
|
|
||||||
| farming_stage_length | float | 160.0 | minetest.conf | Contains a value used for speed of crop growth in seconds |
|
|
||||||
| farming.min_light | int | 12 | farming.conf | default minimum light levels crops need to grow |
|
|
||||||
| farming.max_light | int | 15 | farming.conf | default maximum light levels crops need to grow |
|
|
||||||
| farming_use_utensils | bool | True | farming.conf | When True uses utensils in craft recipes |
|
|
||||||
| farming.carrot | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.potato | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.tomato | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.cucumber | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.corn | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.coffee | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.melon | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.pumpkin | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.cocoa | bool | true | farming.conf | true to enable crop/food or false to disable |
|
|
||||||
| farming.raspberry | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.blueberry | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.rhubarb | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.beans | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.grapes | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.barley | bool | true | farming.conf | true to enable crop/food, false to disable |
|
|
||||||
| farming.chili | float | 0.003 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.hemp | float | 0.003 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.garlic | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.onion | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.pepper | float | 0.002 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.pineapple | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.peas | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.beetroot | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.mint | float | 0.005 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.cabbage | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.blackberry | float | 0.002 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.lettuce | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.soy | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.vanilla | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.artichoke | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.parsley | float | 0.002 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.sunflower | float | 0.001 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.grains | bool | true | farming.conf | true to enable crop/food or false to disable |
|
|
||||||
| farming.rice | bool | true | farming.conf | true to enable crop/food or false to disable |
|
|
||||||
| farming.asparagus | float | 0.002 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.eggplant | float | 0.002 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.spinach | float | 0.002 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
| farming.strawberry | float | 0.002 | farming.conf | rarety value to enable crop/food in-game, false to disable |
|
|
||||||
|
|
||||||
#### Nodes and food
|
|
||||||
|
|
||||||
This farming mod provides a large selection of craftable food and items:
|
|
||||||
|
|
||||||
| Node name | Description name |
|
|
||||||
| ----------------------- | --------------------- |
|
|
||||||
| farming:salt | Salt |
|
|
||||||
| farming:salt_crystal | Salt Crystal |
|
|
||||||
| farming:chili_powder | Chili Powder |
|
|
||||||
| farming:rose_water | Rose Water |
|
|
||||||
| farming:glass_water | Glass of Water |
|
|
||||||
| farming:sugar | Sugar |
|
|
||||||
| farming:sugar_cube | Sugar Cube |
|
|
||||||
| farming:caramel | Caramel |
|
|
||||||
| farming:turkish_delight | Turkish Delight |
|
|
||||||
| farming:garlic_bread | Garlic Bread |
|
|
||||||
| farming:donut | Donut |
|
|
||||||
| farming:donut_chocolate | Chocolate Donut |
|
|
||||||
| farming:donut_apple | Apple Donut |
|
|
||||||
| farming:porridge | Porridge |
|
|
||||||
| farming:jaffa_cake | Jaffa Cake |
|
|
||||||
| farming:apple_pie | Apple Pie |
|
|
||||||
| farming:cactus_juice | Cactus Juice |
|
|
||||||
| farming:pasta | Pasta |
|
|
||||||
| farming:mac_and_cheese | Mac & Cheese |
|
|
||||||
| farming:spaghetti | Spaghetti |
|
|
||||||
| farming:bibimbap | Bibimbap |
|
|
||||||
| farming:burger | Burger |
|
|
||||||
| farming:salad | Salad |
|
|
||||||
| farming:smoothie_berry | Triple Berry Smoothie |
|
|
||||||
| farming:spanish_potatoes | Spanish Potatoes |
|
|
||||||
| farming:potato_omelet | Potato omelet |
|
|
||||||
| farming:paella | Paella |
|
|
||||||
| farming:flan | Vanilla Flan |
|
|
||||||
| farming:cheese_vegan | Vegan Cheese |
|
|
||||||
| farming:onigiri | Onigiri |
|
|
||||||
| farming:gyoza | Gyoza |
|
|
||||||
| farming:mochi | Mochi |
|
|
||||||
| farming:beetroot_soup | Beetroot Soup |
|
|
||||||
| farming:muffin_blueberry | Blueberry Muffin |
|
|
||||||
| farming:blueberry_pie | Blueberry Pie |
|
|
||||||
| farming:carrot_juice | Carrot Juice |
|
|
||||||
| farming:carrot_gold | Golden Carrot (revives) |
|
|
||||||
| farming:chili_bowl | Bowl or Chili |
|
|
||||||
| farming:cocoa_beans | Cocoa Beans |
|
|
||||||
| farming:cookie | Chocolate Cookie |
|
|
||||||
| farming:chocolate_dark | Bar of Dark Chocolate |
|
|
||||||
| farming:chocolate_block | Chocolate Block |
|
|
||||||
| farming:coffee_cup | Cup of Coffee |
|
|
||||||
| farming:corn_cob | Corn on the Cob |
|
|
||||||
| farming:popcorn | Popcorn |
|
|
||||||
| farming:cornstarch | Cornstarch |
|
|
||||||
| farming:ethanol | Bottle of Ethanol (fuel) |
|
|
||||||
| farming:string | String |
|
|
||||||
| farming:garlic_braid | Garlic Braid |
|
|
||||||
| farming:garlic_clove | Garlic Clove |
|
|
||||||
| farming:hemp_oil | Hemp Oil |
|
|
||||||
| farming:hemp_fibre | Hemp Fibre |
|
|
||||||
| farming:hemp_block | Hemp Block |
|
|
||||||
| farming:hemp_rope | Hemp Rope |
|
|
||||||
| farming:mint_tea | Mint Tea |
|
|
||||||
| farming:onion_soup | Onion Soup |
|
|
||||||
| farming:pea_soup | Pea Soup |
|
|
||||||
| farming:pepper_ground | Ground Pepper |
|
|
||||||
| farming:pineapple_ring | Pineapple Ring |
|
|
||||||
| farming:pineapple_juice | Pineapple Juice |
|
|
||||||
| farming:baked_potato | Baked Potato |
|
|
||||||
| farming:potato_salad | Cucumber & Potato Salad |
|
|
||||||
| farming:jackolantern | Jack 'O Lantern |
|
|
||||||
| farming:scarecrow_bottom | Scarecrow Bottom |
|
|
||||||
| farming:pumpkin_dough | Pumpkin Dough |
|
|
||||||
| farming:pumpkin_bread | Pumpkin Bread |
|
|
||||||
| farming:smoothie_raspberry | Raspberry Smoothie |
|
|
||||||
| farming:rhubarb_pie | Rhybarb Pie |
|
|
||||||
| farming:rice_flour | Rice Flour |
|
|
||||||
| farming:rice_bread | Rice Bread |
|
|
||||||
| farming:flour_multigrain | Multigrain Rice |
|
|
||||||
| farming:bread_multigrain | Multigrain Bread |
|
|
||||||
| farming:soy_sauce | Soy Sauce |
|
|
||||||
| farming:soy_milk | Soy Milk |
|
|
||||||
| farming:tofu | Tofu |
|
|
||||||
| farming:tofu_cooked | Cooked Tofu |
|
|
||||||
| farming:sunflower_seeds_toasted | Toasted Sunflower Seeds |
|
|
||||||
| farming:sunflower_oil | Sunflower Oil |
|
|
||||||
| farming:sunflower_bread | Sunflower Bread |
|
|
||||||
| farming:tomato_soup | Tomato Soup |
|
|
||||||
| farming:vanilla_extract | Vanilla Extract |
|
|
||||||
| farming:flour | Flour |
|
|
||||||
| farming:bread | Bread |
|
|
||||||
| farming:straw | Straw Block |
|
|
||||||
| farming:bread_slice | Bread Slice |
|
|
||||||
| farming:toast | Toast |
|
|
||||||
| farming:toast_sandwich | Toast Sandwich |
|
|
||||||
|
|
||||||
#### Item and Tools
|
|
||||||
|
|
||||||
| node name | Description |
|
|
||||||
| ----------------------- | --------------------- |
|
|
||||||
| farming:trellis | Trellis (for growing grapes) |
|
|
||||||
| farming:beanpole | Bean Pole (for growing beans) |
|
|
||||||
| farming:scythe_mithril | Mithril Scythe (Use to harvest and replant crops) |
|
|
||||||
| farming:hoe_bomb | Hoe Bomb (use or throw on grassy areas to hoe land) |
|
|
||||||
| farming:hoe_wood | Wooden Hoe |
|
|
||||||
| farming:hoe_stone | Stone Hoe |
|
|
||||||
| farming:hoe_steel | Steel Hoe |
|
|
||||||
| farming:hoe_bronze | Bronze Hoe |
|
|
||||||
| farming:hoe_mese | Mese Hoe |
|
|
||||||
| farming:hoe_diamond | Diamond Hoe |
|
|
||||||
| farming:bowl | Wooden Bowl |
|
|
||||||
| farming:saucepan | Saucepan |
|
|
||||||
| farming:pot | Cooking Pot |
|
|
||||||
| farming:baking_tray | Baking Tray |
|
|
||||||
| farming:skillet | Skillet |
|
|
||||||
| farming:mortar_pestle | Mortar and Pestle |
|
|
||||||
| farming:cutting_board | Cutting Board |
|
|
||||||
| farming:juicer | Juicer |
|
|
||||||
| farming:mixing_bowl | Glass Mixing Bowl |
|
|
||||||
| moreores:hoe_silver | Silver Hoe |
|
|
||||||
| moreores:hoe_mithril | Mitril Hoe |
|
|
||||||
|
|
||||||
#### Nodes and Aliasing
|
|
||||||
|
|
||||||
This mod is also a direct replacement for the older Farming Plus mod and will replace all
|
|
||||||
of it's nodes and items with one's found within Farming Redo.
|
|
||||||
|
|
||||||
#### ABM
|
|
||||||
|
|
||||||
The ABM checks every 5 minutes to make sure crops in `group:growing` that were planted
|
|
||||||
on an older map are enabled and growing properly.
|
|
||||||
|
|
||||||
### Changelog:
|
|
||||||
|
|
||||||
- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files., hoes can deal damage.
|
|
||||||
- 1.48 - added 'farming_use_utensils' setting to enable/disable utensils in recipes, added mayonnaise (thx felfa), added gingerbread man, Added MineClone2 compatibility
|
|
||||||
- 1.47 - Now blueberries can make blue dye, tweak soil types to work better with older 0.4.x clients and add spanish translation (thx mckaygerhard), add trellis setting to registered_crops and fix pea and soy crop names (thx nixnoxus), add strawberries if ethereal mod not active, added asparagus; spinach; eggplant (thx Atlante for new textures), Sugar Cube
|
|
||||||
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock)
|
|
||||||
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy
|
|
||||||
options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna
|
|
||||||
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates
|
|
||||||
- 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items.
|
|
||||||
- 1.42 - Soil needs water to be present within 3 blocks horizontally and 1 below to make wet soil, Jack 'o Lanterns now check protection, add chocolate block.
|
|
||||||
- 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf)
|
|
||||||
- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support.
|
|
||||||
- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread.
|
|
||||||
- 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable
|
|
||||||
- 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example)
|
|
||||||
- 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes
|
|
||||||
- 1.35 - Deprecated bronze/mese/diamond hoe's, added hoe bomb and deprecated hoe's as lucky block prizes
|
|
||||||
- 1.34 - Added scarecrow Base (5x sticks in a cross shape)
|
|
||||||
- 1.33 - Added cooking utensils (wooden bowl, saucepan, cooking pot, baking tray, skillet, cutting board, mortar & pestle, juicer, glass mixing bowl) for easier food crafts.
|
|
||||||
- 1.32 - Added Pea plant (textures by Andrey01) - also added Wooden Bowl and Pea Soup crafts
|
|
||||||
- 1.31 - Added Pineapple which can be found growing in savannah areas (place pineapple in crafting to obtain 5x rings to eat and a top for re-planting), also Salt which is made from cooking a bucket of water, added food groups so it's more compatible with Ruben's food mods.
|
|
||||||
- 1.30 - Added Garlic, Pepper and Onions thanks to Grizzly Adam for sharing textures
|
|
||||||
- 1.29 - Updating functions so requires Minetest 0.4.16 and above to run
|
|
||||||
- 1.28 - Added chili peppers and bowl of chili, optimized code and fixed a few bugs, added porridge
|
|
||||||
- 1.27 - Added meshoptions to api and wheat plants, added farming.rarity setting to spawn more/less crops on map, have separate cotton/string items (4x cotton = 1x wool, 2x cotton = 2x string)
|
|
||||||
- 1.26 - Added support for [toolranks] mod when using hoe's
|
|
||||||
- 1.25 - Added check for farming.conf setting file to disable specific crops globally (inside mod folder) or world specific (inside world folder)
|
|
||||||
- 1.24 - Added Hemp which can be crafted into fibre, paper, string, rope and oil.
|
|
||||||
- 1.23 - Huge code tweak and tidy done and added barley seeds to be found in dry grass, barley can make flour for bread also.
|
|
||||||
- 1.22 - Added grape bushes at high climates which can be cultivated into grape vines using trellis (9 sticks).
|
|
||||||
- 1.21 - Added auto-refill code for planting crops (thanks crabman77), also fixed a few bugs
|
|
||||||
- 1.20b - Tidied code, made api compatible with new 0.4.13 changes and changed to soil texture overlays
|
|
||||||
- 1.20 - NEW growing routine added that allows crops to grow while player is away doing other things (thanks prestidigitator)
|
|
||||||
- 1.14 - Added Green Beans from Crops mod (thanks sofar), little bushels in the wild but need to be grown using beanpoles crafted with 4 sticks (2 either side)
|
|
||||||
- 1.13 - Fixed seed double-placement glitch. Mapgen now uses 0.4.12+ for plant generation
|
|
||||||
- 1.12 - Player cannot place seeds in protected area, also growing speeds changed to match defaults
|
|
||||||
- 1.11 - Added Straw Bale, streamlined growing abm a little, fixed melon rotation bug with screwdriver
|
|
||||||
- 1.10 - Added Blueberry Bush and Blueberry Muffins, also Pumpkin/Melon easier to pick up, added check for unloaded map
|
|
||||||
- 1.09 - Corn now uses single nodes instead of 1 ontop of the other, Ethanol recipe is more expensive (requires 5 corn) and some code cleanup.
|
|
||||||
- 1.08 - Added Farming Plus compatibility, plus can be removed and no more missing nodes
|
|
||||||
- 1.07 - Added Rhubarb and Rhubarb Pie
|
|
||||||
- 1.06 - register_hoe and register_plant added for compatibility with default farming mod, although any plants registered will use farming redo to grow
|
|
||||||
- 1.05 - Added Raspberry Bushels and Raspberry Smoothie
|
|
||||||
- 1.04 - Added Donuts... normal, chocolate and apple... and a few code cleanups and now compatible with jungletree's from MoreTrees mod
|
|
||||||
- 1.03 - Bug fixes and more compatibility as drop-in replacement for built-in farming mod
|
|
||||||
- 1.02 - Added farming.mod string to help other mods identify which farming mod is running, if it returns "redo" then you're using this one, "" empty is built-in mod
|
|
||||||
- 1.01 - Crafting coffee or ethanol returns empty bucket/bottle, also Cocoa spawns a little rarer
|
|
||||||
- 1.0 - Added Cocoa which randomly grows on jungle tree's, pods give cocoa beans which can be used to farm more pods on a jungle trunk or make Cookies which have been added (or other treats)
|
|
||||||
- 0.9 - Added Pumpkin, Jack 'O Lantern, Pumpkin Slice and Sugar (a huge thanks to painterly.net for allowing me to use their textures)
|
|
||||||
- 0.8 - Added Watermelon and Melon Slice
|
|
||||||
- 0.7 - Added Coffee, Coffee Beans, Drinking Cup, Cold and Hot Cup of Coffee
|
|
||||||
- 0.6 - Added Corn, Corn on the Cob... Also reworked Abm
|
|
||||||
- 0.5 - Added Carrot, Cucumber, Potato (and Baked Potato), Tomato
|
|
||||||
- 0.4 - Checks for Protection, also performance changes
|
|
||||||
- 0.3 - Added Diamond and Mese hoe
|
|
||||||
- 0.2 - Fixed check for wet soil
|
|
||||||
- 0.1 - Fixed growing bug
|
|
||||||
- 0.0 - Initial release
|
|
Before Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 487 B |
Before Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,93 +0,0 @@
|
||||||
Farming API
|
|
||||||
-----------
|
|
||||||
|
|
||||||
The farming API allows you to easily register plants and hoes.
|
|
||||||
|
|
||||||
`farming.register_hoe(name, hoe definition)`
|
|
||||||
* Register a new hoe, see [#hoe definition]
|
|
||||||
|
|
||||||
`farming.register_plant(name, Plant definition)`
|
|
||||||
* Register a new growing plant, see [#Plant definition]
|
|
||||||
|
|
||||||
`farming.registered_plants[name] = definition`
|
|
||||||
* Table of registered plants, indexed by plant name
|
|
||||||
'crop' holds name of growing crop node minus _step-number at end
|
|
||||||
'seed' has name of seed required to plant crop
|
|
||||||
'minlight' min light level needed to grow
|
|
||||||
'maxlight' max light level needed to grow
|
|
||||||
'steps' number of steps crop has in growth cycle
|
|
||||||
'trellis' name of trellis node (e.g. "farming:trellis"), default: nil
|
|
||||||
|
|
||||||
### Hoe Definition
|
|
||||||
|
|
||||||
{
|
|
||||||
description = "My Hoe", -- Description for tooltip
|
|
||||||
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
|
|
||||||
max_uses = 30, -- Uses until destroyed
|
|
||||||
material = "", -- Material for recipes
|
|
||||||
recipe = { -- Craft recipe, if material isn't used
|
|
||||||
{"air", "air", "air"},
|
|
||||||
{"", "group:stick"},
|
|
||||||
{"", "group:stick"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
### Plant definition
|
|
||||||
|
|
||||||
{
|
|
||||||
description = "My Plant", -- Description of seed item
|
|
||||||
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
|
|
||||||
steps = 8, -- How many steps the plant has to grow, until it can be harvested
|
|
||||||
-- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
|
|
||||||
minlight = 13, -- Minimum light to grow
|
|
||||||
maxlight = minetest.LIGHT_MAX -- Maximum light to grow
|
|
||||||
can_grow = function(pos) -- Called every growth tick to check if plant can grow returning True if needs are met (optional, defaults to checking for wet soil below plant).
|
|
||||||
}
|
|
||||||
|
|
||||||
Note: Any crops registered with the above function will use the new growing routines, also if crops are manually added with the {growing=1} group they will also grow.
|
|
||||||
|
|
||||||
### Crop functions
|
|
||||||
|
|
||||||
If a mod registers nodes to be used as crops using the {growing=1} group then an additional function can be used for custom growth checks instead of the standard 'are we above wet soil'.
|
|
||||||
|
|
||||||
growth_check = function(pos, [node_name]) [DEPRECATED for above can_grow function]
|
|
||||||
-- check surrounding for jungle tree
|
|
||||||
if minetest.find_node_near(pos, 1, {"default:jungletree"}) then
|
|
||||||
return true -- place next growth stage
|
|
||||||
end
|
|
||||||
return false -- condition not met, skip next growth stage until next check
|
|
||||||
end,
|
|
||||||
|
|
||||||
### Scythe items that will not drop
|
|
||||||
|
|
||||||
This is a function to add items to a list that scythes will not drop, e.g. farming:trellis or farming:beanpole.
|
|
||||||
|
|
||||||
farming.add_to_scythe_not_drops(item_name)
|
|
||||||
|
|
||||||
### Start timer function
|
|
||||||
|
|
||||||
A handy function that starts a crops timer with a randomly selected time set by using
|
|
||||||
stage_length setting. This is mostly used for special functions or 3rd party mods.
|
|
||||||
|
|
||||||
farming.start_seed_timer(pos)
|
|
||||||
|
|
||||||
|
|
||||||
Node Sounds
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Farming Redo will detect wether the Default mod or MineClone/VoxeLibre mod is active and
|
|
||||||
store whichever sound set is available inside the following to save any other farming
|
|
||||||
mods from having to detect it themselves:
|
|
||||||
|
|
||||||
farming.node_sound_defaults()
|
|
||||||
farming.node_sound_stone_defaults()
|
|
||||||
farming.node_sound_dirt_defaults()
|
|
||||||
farming.node_sound_sand_defaults()
|
|
||||||
farming.node_sound_gravel_defaults()
|
|
||||||
farming.node_sound_wood_defaults()
|
|
||||||
farming.node_sound_leaves_defaults()
|
|
||||||
farming.node_sound_ice_defaults()
|
|
||||||
farming.node_sound_metal_defaults()
|
|
||||||
farming.node_sound_water_defaults()
|
|
||||||
farming.node_sound_snow_defaults()
|
|
||||||
farming.node_sound_glass_defaults()
|
|
|
@ -1,171 +0,0 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
|
|
||||||
--= Helpers
|
|
||||||
|
|
||||||
local eth = minetest.get_modpath("ethereal")
|
|
||||||
local alias = function(orig, new)
|
|
||||||
minetest.register_alias(orig, new)
|
|
||||||
end
|
|
||||||
|
|
||||||
--= Add {eatable} group to default food items if found
|
|
||||||
|
|
||||||
farming.add_eatable("default:apple", 2)
|
|
||||||
farming.add_eatable("default:blueberries", 1)
|
|
||||||
farming.add_eatable("flowers:mushroom_brown", 1)
|
|
||||||
farming.add_eatable("flowers:mushroom_red", -5)
|
|
||||||
|
|
||||||
--= Aliases
|
|
||||||
|
|
||||||
-- Banana
|
|
||||||
|
|
||||||
if eth then
|
|
||||||
alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling")
|
|
||||||
alias("farming_plus:banana_leaves", "ethereal:bananaleaves")
|
|
||||||
alias("farming_plus:banana", "ethereal:banana")
|
|
||||||
else
|
|
||||||
minetest.register_node(":ethereal:banana", {
|
|
||||||
description = S("Banana"),
|
|
||||||
drawtype = "torchlike",
|
|
||||||
tiles = {"farming_banana_single.png"},
|
|
||||||
inventory_image = "farming_banana_single.png",
|
|
||||||
wield_image = "farming_banana_single.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
|
|
||||||
},
|
|
||||||
groups = {
|
|
||||||
food_banana = 1, fleshy = 3, dig_immediate = 3
|
|
||||||
},
|
|
||||||
is_ground_content = false,
|
|
||||||
on_use = minetest.item_eat(2),
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
farming.add_eatable("ethereal:banana", 2)
|
|
||||||
|
|
||||||
minetest.register_node(":ethereal:bananaleaves", {
|
|
||||||
description = S("Banana Leaves"),
|
|
||||||
tiles = {"ethereal_banana_leaf.png"},
|
|
||||||
inventory_image = "ethereal_banana_leaf.png",
|
|
||||||
wield_image = "ethereal_banana_leaf.png",
|
|
||||||
paramtype = "light",
|
|
||||||
waving = 1,
|
|
||||||
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
alias("farming_plus:banana_sapling", "default:sapling")
|
|
||||||
alias("farming_plus:banana_leaves", "ethereal:bananaleaves")
|
|
||||||
alias("farming_plus:banana", "ethereal:banana")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Carrot
|
|
||||||
|
|
||||||
alias("farming_plus:carrot_seed", "farming:carrot")
|
|
||||||
alias("farming_plus:carrot_1", "farming:carrot_1")
|
|
||||||
alias("farming_plus:carrot_2", "farming:carrot_4")
|
|
||||||
alias("farming_plus:carrot_3", "farming:carrot_6")
|
|
||||||
alias("farming_plus:carrot", "farming:carrot_8")
|
|
||||||
alias("farming_plus:carrot_item", "farming:carrot")
|
|
||||||
|
|
||||||
-- Cocoa
|
|
||||||
|
|
||||||
alias("farming_plus:cocoa_sapling", "farming:cocoa_beans")
|
|
||||||
alias("farming_plus:cocoa_leaves", "default:leaves")
|
|
||||||
alias("farming_plus:cocoa", "default:apple")
|
|
||||||
alias("farming_plus:cocoa_bean", "farming:cocoa_beans")
|
|
||||||
|
|
||||||
-- Orange
|
|
||||||
|
|
||||||
alias("farming_plus:orange_1", "farming:tomato_1")
|
|
||||||
alias("farming_plus:orange_2", "farming:tomato_4")
|
|
||||||
alias("farming_plus:orange_3", "farming:tomato_6")
|
|
||||||
|
|
||||||
if eth then
|
|
||||||
alias("farming_plus:orange_item", "ethereal:orange")
|
|
||||||
alias("farming_plus:orange", "ethereal:orange")
|
|
||||||
alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling")
|
|
||||||
else
|
|
||||||
minetest.register_node(":ethereal:orange", {
|
|
||||||
description = S("Orange"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_orange.png"},
|
|
||||||
inventory_image = "farming_orange.png",
|
|
||||||
wield_image = "farming_orange.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
|
|
||||||
},
|
|
||||||
groups = {
|
|
||||||
food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2
|
|
||||||
},
|
|
||||||
is_ground_content = false,
|
|
||||||
on_use = minetest.item_eat(4),
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
farming.add_eatable("ethereal:orange", 4)
|
|
||||||
|
|
||||||
alias("farming_plus:orange_item", "ethereal:orange")
|
|
||||||
alias("farming_plus:orange", "ethereal:orange")
|
|
||||||
alias("farming_plus:orange_seed", "default:sapling")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Potato
|
|
||||||
|
|
||||||
alias("farming_plus:potato_item", "farming:potato")
|
|
||||||
alias("farming_plus:potato_1", "farming:potato_1")
|
|
||||||
alias("farming_plus:potato_2", "farming:potato_2")
|
|
||||||
alias("farming_plus:potato", "farming:potato_3")
|
|
||||||
alias("farming_plus:potato_seed", "farming:potato")
|
|
||||||
|
|
||||||
-- Pumpkin
|
|
||||||
|
|
||||||
alias("farming:pumpkin_seed", "farming:pumpkin_slice")
|
|
||||||
alias("farming:pumpkin_face", "farming:jackolantern")
|
|
||||||
alias("farming:pumpkin_face_light", "farming:jackolantern_on")
|
|
||||||
alias("farming:big_pumpkin", "farming:jackolantern")
|
|
||||||
alias("farming:big_pumpkin_side", "air")
|
|
||||||
alias("farming:big_pumpkin_top", "air")
|
|
||||||
alias("farming:big_pumpkin_corner", "air")
|
|
||||||
alias("farming:scarecrow", "farming:jackolantern")
|
|
||||||
alias("farming:scarecrow_light", "farming:jackolantern_on")
|
|
||||||
alias("farming:pumpkin_flour", "farming:pumpkin_dough")
|
|
||||||
|
|
||||||
-- Rhubarb
|
|
||||||
|
|
||||||
alias("farming_plus:rhubarb_seed", "farming:rhubarb")
|
|
||||||
alias("farming_plus:rhubarb_1", "farming:rhubarb_1")
|
|
||||||
alias("farming_plus:rhubarb_2", "farming:rhubarb_2")
|
|
||||||
alias("farming_plus:rhubarb", "farming:rhubarb_3")
|
|
||||||
alias("farming_plus:rhubarb_item", "farming:rhubarb")
|
|
||||||
|
|
||||||
-- Strawberry
|
|
||||||
|
|
||||||
alias("farming_plus:strawberry_item", "ethereal:strawberry")
|
|
||||||
alias("farming_plus:strawberry_seed", "ethereal:strawberry")
|
|
||||||
alias("farming_plus:strawberry_1", "ethereal:strawberry_1")
|
|
||||||
alias("farming_plus:strawberry_2", "ethereal:strawberry_3")
|
|
||||||
alias("farming_plus:strawberry_3", "ethereal:strawberry_5")
|
|
||||||
alias("farming_plus:strawberry", "ethereal:strawberry_7")
|
|
||||||
|
|
||||||
-- Tomato
|
|
||||||
|
|
||||||
alias("farming_plus:tomato_seed", "farming:tomato")
|
|
||||||
alias("farming_plus:tomato_item", "farming:tomato")
|
|
||||||
alias("farming_plus:tomato_1", "farming:tomato_2")
|
|
||||||
alias("farming_plus:tomato_2", "farming:tomato_4")
|
|
||||||
alias("farming_plus:tomato_3", "farming:tomato_6")
|
|
||||||
alias("farming_plus:tomato", "farming:tomato_8")
|
|
||||||
|
|
||||||
-- Weeds
|
|
||||||
|
|
||||||
alias("farming:weed", "default:grass_2")
|
|
|
@ -1,84 +0,0 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
|
|
||||||
-- item/seed
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:artichoke", {
|
|
||||||
description = S("Artichoke"),
|
|
||||||
inventory_image = "farming_artichoke.png",
|
|
||||||
groups = {compostability = 48, seed = 2, food_artichoke = 1},
|
|
||||||
on_use = minetest.item_eat(4),
|
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:artichoke_1")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
farming.add_eatable("farming:artichoke", 4)
|
|
||||||
|
|
||||||
-- crop definition
|
|
||||||
|
|
||||||
local def = {
|
|
||||||
description = S("Artichoke") .. S(" Crop"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_artichoke_1.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
drop = "",
|
|
||||||
waving = 1,
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
|
||||||
not_in_creative_inventory = 1, growing = 1
|
|
||||||
},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
}
|
|
||||||
|
|
||||||
-- stage 1
|
|
||||||
|
|
||||||
minetest.register_node("farming:artichoke_1", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 2
|
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_2.png"}
|
|
||||||
minetest.register_node("farming:artichoke_2", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 3
|
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_3.png"}
|
|
||||||
minetest.register_node("farming:artichoke_3", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 4
|
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_4.png"}
|
|
||||||
minetest.register_node("farming:artichoke_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5 (final)
|
|
||||||
|
|
||||||
def.tiles = {"farming_artichoke_5.png"}
|
|
||||||
def.groups.growing = nil
|
|
||||||
def.selection_box = farming.select_final
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:artichoke 2"}, rarity = 1},
|
|
||||||
{items = {"farming:artichoke"}, rarity = 2}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:artichoke_5", table.copy(def))
|
|
||||||
|
|
||||||
-- add to registered_plants
|
|
||||||
|
|
||||||
farming.registered_plants["farming:artichoke"] = {
|
|
||||||
crop = "farming:artichoke",
|
|
||||||
seed = "farming:artichoke",
|
|
||||||
minlight = 13,
|
|
||||||
maxlight = 15,
|
|
||||||
steps = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
-- mapgen
|
|
||||||
farming.register_decoration("artichoke",5)
|
|
|
@ -1,91 +0,0 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
|
|
||||||
-- item/seed
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:asparagus", {
|
|
||||||
description = S("Asparagus"),
|
|
||||||
inventory_image = "farming_asparagus.png",
|
|
||||||
groups = {compostability = 48, seed = 2, food_asparagus = 1},
|
|
||||||
on_use = minetest.item_eat(1),
|
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:asparagus_1")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
farming.add_eatable("farming:asparagus", 1)
|
|
||||||
|
|
||||||
-- crop definition
|
|
||||||
|
|
||||||
local def = {
|
|
||||||
description = S("Asparagus") .. S(" Crop"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_asparagus_1.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "meshoptions",
|
|
||||||
place_param2 = 3,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
drop = "",
|
|
||||||
waving = 1,
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
|
||||||
not_in_creative_inventory = 1, growing = 1
|
|
||||||
},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
}
|
|
||||||
|
|
||||||
-- stage 1
|
|
||||||
|
|
||||||
minetest.register_node("farming:asparagus_1", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 2
|
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_2.png"}
|
|
||||||
minetest.register_node("farming:asparagus_2", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 3
|
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_3.png"}
|
|
||||||
minetest.register_node("farming:asparagus_3", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 4
|
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_4.png"}
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:asparagus"}, rarity = 2}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:asparagus_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5 (final)
|
|
||||||
|
|
||||||
def.tiles = {"farming_asparagus_5.png"}
|
|
||||||
def.groups.growing = nil
|
|
||||||
def.selection_box = farming.select_final
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:asparagus"}, rarity = 1},
|
|
||||||
{items = {"farming:asparagus 2"}, rarity = 2}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:asparagus_5", table.copy(def))
|
|
||||||
|
|
||||||
-- add to registered_plants
|
|
||||||
|
|
||||||
farming.registered_plants["farming:asparagus"] = {
|
|
||||||
crop = "farming:asparagus",
|
|
||||||
seed = "farming:asparagus",
|
|
||||||
minlight = 7,
|
|
||||||
maxlight = farming.max_light,
|
|
||||||
steps = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
-- mapgen
|
|
||||||
farming.register_decoration("asparagus",5)
|
|
|
@ -1,135 +0,0 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
|
|
||||||
-- seed
|
|
||||||
|
|
||||||
minetest.register_node("farming:seed_barley", {
|
|
||||||
description = S("Barley Seed"),
|
|
||||||
tiles = {"farming_barley_seed.png"},
|
|
||||||
inventory_image = "farming_barley_seed.png",
|
|
||||||
wield_image = "farming_barley_seed.png",
|
|
||||||
drawtype = "signlike",
|
|
||||||
groups = {
|
|
||||||
handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1,
|
|
||||||
growing = 1
|
|
||||||
},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "wallmounted",
|
|
||||||
walkable = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
next_plant = "farming:barley_1",
|
|
||||||
selection_box = farming.select,
|
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_barley")
|
|
||||||
end,
|
|
||||||
|
|
||||||
on_timer = function(pos, elapsed)
|
|
||||||
minetest.set_node(pos, {name = "farming:barley_1", param2 = 3})
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- item
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:barley", {
|
|
||||||
description = S("Barley"),
|
|
||||||
inventory_image = "farming_barley.png",
|
|
||||||
groups = {food_barley = 1, flammable = 2, compostability = 65}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crop definition
|
|
||||||
|
|
||||||
local def = {
|
|
||||||
description = S("Barley") .. S(" Crop"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_barley_1.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "meshoptions",
|
|
||||||
place_param2 = 3,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
drop = "",
|
|
||||||
waving = 1,
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
|
||||||
not_in_creative_inventory = 1, growing = 1
|
|
||||||
},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
}
|
|
||||||
|
|
||||||
-- stage 1
|
|
||||||
|
|
||||||
minetest.register_node("farming:barley_1", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 2
|
|
||||||
|
|
||||||
def.tiles = {"farming_barley_2.png"}
|
|
||||||
minetest.register_node("farming:barley_2", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 3
|
|
||||||
|
|
||||||
def.tiles = {"farming_barley_3.png"}
|
|
||||||
minetest.register_node("farming:barley_3", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 4
|
|
||||||
|
|
||||||
def.tiles = {"farming_barley_4.png"}
|
|
||||||
minetest.register_node("farming:barley_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5
|
|
||||||
|
|
||||||
def.tiles = {"farming_barley_5.png"}
|
|
||||||
minetest.register_node("farming:barley_5", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 6
|
|
||||||
|
|
||||||
def.tiles = {"farming_barley_6.png"}
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:barley"}, rarity = 2},
|
|
||||||
{items = {"farming:seed_barley"}, rarity = 2}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:barley_6", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 7
|
|
||||||
|
|
||||||
def.tiles = {"farming_barley_7.png"}
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:barley"}, rarity = 2},
|
|
||||||
{items = {"farming:seed_barley"}, rarity = 1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:barley_7", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 8 (final)
|
|
||||||
|
|
||||||
def.tiles = {"farming_barley_8.png"}
|
|
||||||
def.groups.growing = nil
|
|
||||||
def.selection_box = farming.select_final
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:barley"}, rarity = 1},
|
|
||||||
{items = {"farming:barley"}, rarity = 3},
|
|
||||||
{items = {"farming:seed_barley"}, rarity = 1},
|
|
||||||
{items = {"farming:seed_barley"}, rarity = 3}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:barley_8", table.copy(def))
|
|
||||||
|
|
||||||
-- add to registered_plants
|
|
||||||
|
|
||||||
farming.registered_plants["farming:barley"] = {
|
|
||||||
crop = "farming:barley",
|
|
||||||
seed = "farming:seed_barley",
|
|
||||||
minlight = farming.min_light,
|
|
||||||
maxlight = farming.max_light,
|
|
||||||
steps = 8
|
|
||||||
}
|
|
|
@ -1,237 +0,0 @@
|
||||||
|
|
||||||
-- All textures by (C) Auke Kok <sofar@foo-projects.org> CC-BY-SA-3.0
|
|
||||||
|
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- place beans helper
|
|
||||||
|
|
||||||
local function place_beans(itemstack, placer, pointed_thing, plantname)
|
|
||||||
|
|
||||||
local pt = pointed_thing
|
|
||||||
|
|
||||||
-- check if pointing at a node
|
|
||||||
if not pt or pt.type ~= "node" then return end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
|
||||||
if not minetest.registered_nodes[under.name] then return end
|
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
|
||||||
-- thanks to Krock for helping with this issue :)
|
|
||||||
local def = minetest.registered_nodes[under.name]
|
|
||||||
|
|
||||||
if placer and itemstack and def and def.on_rightclick then
|
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- is player planting crop?
|
|
||||||
local name = placer and placer:get_player_name() or ""
|
|
||||||
|
|
||||||
-- check for protection
|
|
||||||
if minetest.is_protected(pt.under, name) then return end
|
|
||||||
|
|
||||||
-- check if pointing at bean pole
|
|
||||||
if under.name ~= "farming:beanpole" then return end
|
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
|
||||||
minetest.set_node(pt.under, {name = plantname})
|
|
||||||
|
|
||||||
minetest.sound_play("default_place_node", {pos = pt.under, gain = 1.0}, true)
|
|
||||||
|
|
||||||
if placer or not farming.is_creative(placer:get_player_name()) then
|
|
||||||
|
|
||||||
itemstack:take_item()
|
|
||||||
|
|
||||||
-- check for refill
|
|
||||||
if itemstack:get_count() == 0 then
|
|
||||||
|
|
||||||
minetest.after(0.20,
|
|
||||||
farming.refill_plant, placer, "farming:beans", placer:get_wield_index())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return itemstack
|
|
||||||
end
|
|
||||||
|
|
||||||
-- item/seed
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:beans", {
|
|
||||||
description = S("Green Beans"),
|
|
||||||
inventory_image = "farming_beans.png",
|
|
||||||
groups = {compostability = 48, seed = 2, food_beans = 1},
|
|
||||||
on_use = minetest.item_eat(1),
|
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
return place_beans(itemstack, placer, pointed_thing, "farming:beanpole_1")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
farming.add_eatable("farming:beans", 1)
|
|
||||||
|
|
||||||
-- beanpole
|
|
||||||
|
|
||||||
minetest.register_node("farming:beanpole", {
|
|
||||||
description = S("Bean Pole (place on soil before planting beans)"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_beanpole.png"},
|
|
||||||
inventory_image = "farming_beanpole.png",
|
|
||||||
visual_scale = 1.90,
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
drop = "farming:beanpole",
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {handy = 1, snappy = 3, flammable = 2, attached_node = 1},
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults(),
|
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
|
|
||||||
local pt = pointed_thing
|
|
||||||
|
|
||||||
-- check if pointing at a node
|
|
||||||
if not pt or pt.type ~= "node" then return end
|
|
||||||
|
|
||||||
local under = minetest.get_node(pt.under)
|
|
||||||
|
|
||||||
-- return if any of the nodes are not registered
|
|
||||||
if not minetest.registered_nodes[under.name] then return end
|
|
||||||
|
|
||||||
-- am I right-clicking on something that has a custom on_place set?
|
|
||||||
-- thanks to Krock for helping with this issue :)
|
|
||||||
local def = minetest.registered_nodes[under.name]
|
|
||||||
|
|
||||||
if def and def.on_rightclick then
|
|
||||||
return def.on_rightclick(pt.under, under, placer, itemstack, pt)
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.is_protected(pt.above, placer:get_player_name()) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local nodename = under.name
|
|
||||||
|
|
||||||
if minetest.get_item_group(nodename, "soil") < 2 then return end
|
|
||||||
|
|
||||||
local top = {
|
|
||||||
x = pointed_thing.above.x,
|
|
||||||
y = pointed_thing.above.y + 1,
|
|
||||||
z = pointed_thing.above.z
|
|
||||||
}
|
|
||||||
|
|
||||||
nodename = minetest.get_node(top).name
|
|
||||||
|
|
||||||
if nodename ~= "air" then return end
|
|
||||||
|
|
||||||
minetest.set_node(pointed_thing.above, {name = "farming:beanpole"})
|
|
||||||
|
|
||||||
if not farming.is_creative(placer:get_player_name()) then
|
|
||||||
itemstack:take_item()
|
|
||||||
end
|
|
||||||
|
|
||||||
return itemstack
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crop definition
|
|
||||||
|
|
||||||
local def = {
|
|
||||||
description = S("Green Beans") .. S(" Crop"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_beanpole_1.png"},
|
|
||||||
visual_scale = 1.90,
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:beanpole"}, rarity = 1}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, flammable = 3, not_in_creative_inventory = 1,
|
|
||||||
attached_node = 1, growing = 1, plant = 1
|
|
||||||
},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
}
|
|
||||||
|
|
||||||
-- stage 1
|
|
||||||
|
|
||||||
minetest.register_node("farming:beanpole_1", table.copy(def))
|
|
||||||
|
|
||||||
-- stage2
|
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_2.png"}
|
|
||||||
minetest.register_node("farming:beanpole_2", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 3
|
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_3.png"}
|
|
||||||
minetest.register_node("farming:beanpole_3", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 4
|
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_4.png"}
|
|
||||||
minetest.register_node("farming:beanpole_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5 (final)
|
|
||||||
|
|
||||||
def.tiles = {"farming_beanpole_5.png"}
|
|
||||||
def.groups.growing = nil
|
|
||||||
def.selection_box = farming.select_final
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:beanpole"}, rarity = 1},
|
|
||||||
{items = {"farming:beans 3"}, rarity = 1},
|
|
||||||
{items = {"farming:beans 2"}, rarity = 2},
|
|
||||||
{items = {"farming:beans 2"}, rarity = 3}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:beanpole_5", table.copy(def))
|
|
||||||
|
|
||||||
-- add to registered_plants
|
|
||||||
|
|
||||||
farming.registered_plants["farming:beans"] = {
|
|
||||||
trellis = "farming:beanpole",
|
|
||||||
crop = "farming:beanpole",
|
|
||||||
seed = "farming:beans",
|
|
||||||
minlight = farming.min_light,
|
|
||||||
maxlight = farming.max_light,
|
|
||||||
steps = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
-- wild green bean bush (this is what you find on the map)
|
|
||||||
|
|
||||||
minetest.register_node("farming:beanbush", {
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_beanbush.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:beans 1"}, rarity = 1},
|
|
||||||
{items = {"farming:beans 1"}, rarity = 2},
|
|
||||||
{items = {"farming:beans 1"}, rarity = 3}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
|
||||||
compostability = 35, not_in_creative_inventory = 1
|
|
||||||
},
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
-- mapgen
|
|
||||||
farming.register_decoration("beans",5,"farming:beanbush")
|
|
|
@ -1,87 +0,0 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
local a = farming.recipe_items
|
|
||||||
|
|
||||||
-- item/seed
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:beetroot", {
|
|
||||||
description = S("Beetroot"),
|
|
||||||
inventory_image = "farming_beetroot.png",
|
|
||||||
groups = {compostability = 48, seed = 2, food_beetroot = 1},
|
|
||||||
on_use = minetest.item_eat(1),
|
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
farming.add_eatable("farming:beetroot", 1)
|
|
||||||
|
|
||||||
-- crop definition
|
|
||||||
|
|
||||||
local def = {
|
|
||||||
description = S("Beetroot") .. S(" Crop"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_beetroot_1.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
drop = "",
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
|
||||||
not_in_creative_inventory = 1, growing = 1
|
|
||||||
},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
}
|
|
||||||
|
|
||||||
-- stage 1
|
|
||||||
|
|
||||||
minetest.register_node("farming:beetroot_1", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 2
|
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_2.png"}
|
|
||||||
minetest.register_node("farming:beetroot_2", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 3
|
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_3.png"}
|
|
||||||
minetest.register_node("farming:beetroot_3", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 4
|
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_4.png"}
|
|
||||||
minetest.register_node("farming:beetroot_4", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 5 (final)
|
|
||||||
|
|
||||||
def.tiles = {"farming_beetroot_5.png"}
|
|
||||||
def.groups.growing = nil
|
|
||||||
def.selection_box = farming.select_final
|
|
||||||
def.drop = {
|
|
||||||
max_items = 4, items = {
|
|
||||||
{items = {"farming:beetroot"}, rarity = 1},
|
|
||||||
{items = {"farming:beetroot"}, rarity = 2},
|
|
||||||
{items = {"farming:beetroot"}, rarity = 3},
|
|
||||||
{items = {"farming:beetroot"}, rarity = 4}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:beetroot_5", table.copy(def))
|
|
||||||
|
|
||||||
-- add to registered_plants
|
|
||||||
|
|
||||||
farming.registered_plants["farming:beetroot"] = {
|
|
||||||
crop = "farming:beetroot",
|
|
||||||
seed = "farming:beetroot",
|
|
||||||
minlight = farming.min_light,
|
|
||||||
maxlight = farming.max_light,
|
|
||||||
steps = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
-- mapgen
|
|
||||||
farming.register_decoration("beetroot",5)
|
|
|
@ -1,82 +0,0 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("farming")
|
|
||||||
|
|
||||||
-- item/seed
|
|
||||||
|
|
||||||
minetest.register_craftitem("farming:blackberry", {
|
|
||||||
description = S("Blackberries"),
|
|
||||||
inventory_image = "farming_blackberry.png",
|
|
||||||
groups = {
|
|
||||||
compostability = 48, seed = 2, food_blackberries = 1, food_blackberry = 1,
|
|
||||||
food_berry = 1
|
|
||||||
},
|
|
||||||
on_use = minetest.item_eat(1),
|
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1")
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
farming.add_eatable("farming:blackberry", 1)
|
|
||||||
|
|
||||||
-- crop definition
|
|
||||||
|
|
||||||
local def = {
|
|
||||||
description = S("Blackberry") .. S(" Crop"),
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"farming_blackberry_1.png"},
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
drop = "",
|
|
||||||
selection_box = farming.select,
|
|
||||||
groups = {
|
|
||||||
handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
|
||||||
not_in_creative_inventory = 1, growing = 1
|
|
||||||
},
|
|
||||||
_mcl_hardness = farming.mcl_hardness,
|
|
||||||
is_ground_content = false,
|
|
||||||
sounds = farming.node_sound_leaves_defaults()
|
|
||||||
}
|
|
||||||
|
|
||||||
-- stage 1
|
|
||||||
|
|
||||||
minetest.register_node("farming:blackberry_1", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 2
|
|
||||||
|
|
||||||
def.tiles = {"farming_blackberry_2.png"}
|
|
||||||
minetest.register_node("farming:blackberry_2", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 3
|
|
||||||
|
|
||||||
def.tiles = {"farming_blackberry_3.png"}
|
|
||||||
minetest.register_node("farming:blackberry_3", table.copy(def))
|
|
||||||
|
|
||||||
-- stage 4 (final)
|
|
||||||
|
|
||||||
def.tiles = {"farming_blackberry_4.png"}
|
|
||||||
def.groups.growing = nil
|
|
||||||
def.selection_box = farming.select_final
|
|
||||||
def.drop = {
|
|
||||||
items = {
|
|
||||||
{items = {'farming:blackberry 2'}, rarity = 1},
|
|
||||||
{items = {'farming:blackberry'}, rarity = 2},
|
|
||||||
{items = {'farming:blackberry'}, rarity = 3},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minetest.register_node("farming:blackberry_4", table.copy(def))
|
|
||||||
|
|
||||||
-- add to registered_plants
|
|
||||||
|
|
||||||
farming.registered_plants["farming:blackberry"] = {
|
|
||||||
crop = "farming:blackberry",
|
|
||||||
seed = "farming:blackberry",
|
|
||||||
minlight = farming.min_light,
|
|
||||||
maxlight = farming.max_light,
|
|
||||||
steps = 4
|
|
||||||
}
|
|
||||||
|
|
||||||
-- mapgen
|
|
||||||
farming.register_decoration("blackberry",4)
|
|