1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-06-28 14:16:11 +02:00

70 Commits

Author SHA1 Message Date
99d58e0876 add pl.generate_noise_params() 2023-04-16 19:24:52 +02:00
59c483fd4f support avoid_nodes 2023-04-13 21:15:34 +02:00
640cfd3ac7 improve near_nodes support 2023-04-13 14:15:10 +02:00
cdfbf20ab0 experimental near_nodes support 2023-04-12 21:54:22 +02:00
85569605f5 spawn some more plants directly 2023-04-12 21:03:22 +02:00
a154cb9904 disable some logging 2023-04-12 17:52:29 +02:00
d55f066686 support youngtrees 2023-04-12 17:34:48 +02:00
252c2bd1d2 add support for custom spawn functions 2023-04-12 17:00:18 +02:00
15f62452b8 some biome_lib replacement experiments 2023-04-12 14:12:51 +02:00
577404c850 fix https://github.com/mt-mods/plantlife_modpack/issues/38 - add use_texture_alpa param to nodes that have textures with alpa 2023-01-21 15:48:24 -05:00
a2cbc18351 fix upside-down vines ends (#37) 2022-11-12 20:22:16 -05:00
9483fee7b3 Added Esperanto translation (#36)
used the template.txt's
2022-11-06 12:53:16 -05:00
1894d91609 add node dig/placement predictions (#34) 2022-11-04 12:29:34 -04:00
438a1adb32 limit bush duping (#33)
only allow a chance of getting a 2nd bush from bushes with fruit, to prevent instant bush duping.
2022-11-04 12:28:33 -04:00
e159b843d2 restrict tree fern growth (#32) 2022-10-30 17:57:12 -04:00
6e842d9b0d add bush leaves to leaves group (#31) 2022-10-10 18:39:58 +02:00
8287ae2476 Add German translation (#29)
* Add German translation

Add German translation

* Add German translation

Add German translation

* Add German translation

Add German translation

* Add German transaltion

Add German translation

* Add German translation

Add German translation

* Add German translation

Add German translation

* Add German translation

Add German translation

* Add German translation

Add German translation

* Add German translation

Add German translation

* Add German translation

Add German translation

* Add support for i18n

Add support for i18n, make loading translateable

* Add template for translation

* Add German translation

Add German translation
2022-09-01 21:02:37 -04:00
ca2b47492e Merge pull request #28 from Niklp09/mushroom
overwrite wield_image's of mushrooms
2022-08-19 15:06:41 +02:00
f5490e3b58 overwrite wield_images's 2022-08-19 14:53:39 +02:00
bde2082ee1 Texture update for vines to CC0 (#21)
* Texture update for vines to CC0

recreated the vines and rope textures and releasing them under CC0

* Minor tweaks to textures
2022-06-24 14:32:09 +03:00
d33907ca75 Fix typo in crafting recipes in trunks
Fixes #24 
Co-authored-by: A S Lewis <aslewis@cpan.org>
2022-06-08 22:03:52 +10:00
244d5da0e2 wear too when breaking vines (#22) 2022-05-28 17:35:42 -04:00
8de8b889c2 fix typo in bushes mod.conf
fixes #17
2022-05-09 23:10:56 +10:00
1d71e2c64e fix https://github.com/mt-mods/plantlife_modpack/issues/16 2022-03-19 17:04:06 -04:00
d3edfbeace Merge pull request #14 from nixnoxus/fix_tree_fern_leave_big
fix felling `farns:fern_trunk_big`
2022-01-11 22:19:26 -05:00
c82ba38e68 Merge pull request #15 from nixnoxus/add_group_sapling
Add `group:sapling` for saplings in plantlife
2022-01-11 17:18:14 -05:00
031d5f4e4e add group sapling 2022-01-11 18:55:22 +01:00
32bab30e1f fix felling farns: fern_trunk_big 2022-01-10 19:32:04 +01:00
7094d8a369 Vines: Fix recipes and global variables (#13) 2021-12-28 14:45:05 +11:00
c990942ba2 fix https://github.com/mt-mods/plantlife_modpack/issues/11 2021-12-25 21:44:43 -05:00
4953b1ba54 Rarity / fertility tweaks for various mods (#8)
For bushes, molehills and youngtrees:
Changes to rarity and minimum fertility. Also added use of rarity_fertility. Result is more balanced and less homogeneous, i.e. over a large area you'll see variation.

For vines, some further tweaks to rarity, and using tries field to improve vines distribution.
2021-12-24 09:31:30 +01:00
cb2373f089 Trunks: Prevent crashing when unknown nodes exist (#9)
Extension of commit 9ed4771515

Co-authored-by: OgelGames <olliverdc28@gmail.com>
2021-12-16 20:10:36 +11:00
1a96ac87a7 Breaking up flowers_plus mod (#5)
Splitting up flowers_plus into separate mods for seaweed, sunflowers and waterlillies, for clarity and so the user can disable them individually.
Fixed sunflower maximum heat.
Removed spawning, as we're already creating these things at worldgen.
Added settings for rarity and max count to each mod - waterlilies, seaweed and sunflowers
Removing along_shore mod as it does nothing now.
2021-12-14 13:05:23 +01:00
a6dc4890d9 Vines: Fixed humidity, and set temperature. Also fixed a couple of issues with spawning: Roots are meant to spawn under dirt blocks, also vines were appearing on the side of snow. 2021-12-11 19:45:25 +01:00
a5b752f8b2 Merge pull request #3 from JordanL2/vines_mapgen
Vines overhaul
2021-12-07 17:21:17 -05:00
4c48e5be29 Update vines/init.lua
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2021-12-07 22:19:57 +00:00
a7d0e42cd1 Update vines/init.lua
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2021-12-07 22:19:49 +00:00
2e4e4a2412 Replace vines with air if they've been disabled for compatibility 2021-12-06 10:56:05 +00:00
1d3751d755 Avoid one node vines on top of trees. 2021-12-06 10:55:42 +00:00
e2486ca7f5 Adding default to boolean settings 2021-12-06 09:33:44 +00:00
98f0c6c20f Slight simplification of on_dig. Also minor fix to generating vines of a certain length. 2021-12-05 11:41:49 +00:00
54d3b669be Vines: Simplifying digging logic. 2021-12-05 11:08:51 +00:00
93265656cc Adding vine growth speed settings 2021-12-04 20:28:11 +00:00
c76fd45a2c Option to disable vines:vines item, as it seems pointless.
All recipes allow the vines group, so any vine end item will work.
2021-12-04 20:17:44 +00:00
c7d0fd3c53 Cutting vines with shears now gives the player the vine ends, so they can make their own vine farm 2021-12-04 18:53:39 +00:00
a66b82f1f0 Fixing growth. Vines now grow once every 3-6 minutes. 2021-12-04 17:56:28 +00:00
63914caed1 Removing attached_node from vine groups, as it was causing breaking one vine to break the vine all the way up to the top, instantly 2021-12-04 17:56:28 +00:00
ba98359dd0 When a vine is destroyed, ensure the remaining part of the vine ends with a vine end node. 2021-12-04 17:56:28 +00:00
6df36da4e1 Settings to disable any type of vine and vine rope. Settings to adjust rarity of vines. 2021-12-04 17:55:49 +00:00
28ef3e0c4b Vines now generated at mapgen time. Vines now generated as a vine of random length. 2021-12-04 17:55:08 +00:00
680b02f7e2 fix crash for sure this time 2021-07-19 23:56:47 -04:00
a2976c609a update all generate, spawn, and grow calls
to use "." instead of ":" notation
(quells all those "deprecated" warnings)
2021-07-19 14:18:01 -04:00
46717958bc use biome_lib.get_nodedef_field
instead of biome_lib:get_nodedef_field
(change `.` to `:`)
2021-07-19 14:08:57 -04:00
52b2d18523 make moss buildable_to
and make sunflower attached_node like other plants
2021-06-29 13:44:00 -04:00
bfd08f01c8 Just run the conversion LBM on every load
it won't take any appreciable CPU anyway if there's nothing to do.

Minetest seems to not new (or newly-renamed) LBMs when it should, when
it's set to only run once.  Also covers cases where a crash could
prevent mapblocks being checked later.
2021-06-23 21:09:48 -04:00
9ed4771515 fix rare edge-case where unknown nodes cause a crash
When a new mapblock is generated and the mod checks the neighbors around
a target to place a fallen twig, if it finds an unknown node (because
it's in a neighboring, old mapblock from a previous session -- perhaps
an old moss node that hadn't converted-over to wallmounted yet), trying
to check its buildable_to state will fail, since that requires that
there be a node def to look at, which an unknown node wouldn't have.

This substitutes a known not-buildable_to node for those cases, so that
the code won't try to overwrite what it found.
2021-06-23 21:03:06 -04:00
3f107a8067 renamed the LBM in case it got run at the wrong time
between mod updates; forces it to run again
(it's harmless to let it run twice)
2021-06-23 10:09:58 -04:00
b3cbd3df2e fix moss node drops 2021-06-21 05:21:34 -04:00
b1b4a08834 make pebbles fall when ground is dug. 2021-06-21 00:36:14 -04:00
f01e4bb55f Convert moss to wallmounted mode
I couldn't use leaf decay to make moss disappear when a trunk is dug,
because it breaks leaf decay on that tree's leaves: the leafdecay
function is not a true "register"- type function that can be run more
than once on a given trunk node, it's an all-or-nothing override and
only the last call for any given trunk actually sticks.

Since moss is... was facedir, attached_node didn't work right either, as
it doesn't have a mode to look for a vertical surface behind the
attached object (like how it works with wallmounted items), so this
converts moss to true wallmounted and uses attached_node like I
originally wanted.

To avoid losing the effect where moss can be rotated randomly when
generated, I registered 4 nodes for each moss type, with
increasingly-rotated textures.
2021-06-20 23:30:26 -04:00
7b4f54ead0 make youngtrees, bushes fall on dig,
make moss fall when the node holding it is dug,
and make trunk roots decay (exploiting the standard leafdecay function)
2021-06-19 20:36:36 -04:00
c061ef23cf Merge branch 'bls-197' into 'master'
Fixes bug with stalactite placement

See merge request VanessaE/plantlife_modpack!7
2021-06-07 17:04:31 +00:00
d87d8e51f5 Fixes bug with stalactite placement 2021-06-07 17:04:31 +00:00
70df655a42 allow pebbles to spawn on a few more surface types 2021-04-06 04:09:34 -04:00
4876fc1265 let biome_lib place pebbles instead of using custom mapgen code 2021-04-06 04:08:41 -04:00
81b2b0898b don't use a function to pick random dry grasses
just use `biome_lib`'s random-choice table feature
(it was only there to let the mod replace junglegrass, but that's pointless
when junglegrass doesn't tend to spawn in the same areas)
2021-04-06 03:32:04 -04:00
a750bac532 Merge branch 'master' into 'master'
Made woodsoils soils tillable.

See merge request VanessaE/plantlife_modpack!6
2021-02-07 23:29:08 +00:00
b4b24dedba Made woodsoils soils tillable. 2021-02-07 21:17:29 +01:00
622016713e respect protection when placing twigs 2020-12-02 10:05:01 -05:00
9963e588d6 add minimum minetest version key for contentdb 2020-06-03 13:00:31 -04:00
148 changed files with 2246 additions and 1368 deletions

View File

@ -2,6 +2,9 @@
mushroom = {}
-- support for i18n
local S = minetest.get_translator("3dmushrooms")
minetest.override_item("flowers:mushroom_fertile_brown", {
drawtype = "mesh",
mesh = "3dmushrooms.obj",
@ -10,7 +13,8 @@ minetest.override_item("flowers:mushroom_fertile_brown", {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
inventory_image = "3dmushrooms_brown_inv.png"
inventory_image = "3dmushrooms_brown_inv.png",
wield_image = "3dmushrooms_brown_inv.png"
})
minetest.override_item("flowers:mushroom_brown", {
@ -21,7 +25,8 @@ minetest.override_item("flowers:mushroom_brown", {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
inventory_image = "3dmushrooms_brown_inv.png"
inventory_image = "3dmushrooms_brown_inv.png",
wield_image = "3dmushrooms_brown_inv.png"
})
minetest.override_item("flowers:mushroom_fertile_red", {
@ -32,7 +37,8 @@ minetest.override_item("flowers:mushroom_fertile_red", {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
inventory_image = "3dmushrooms_red_inv.png"
inventory_image = "3dmushrooms_red_inv.png",
wield_image = "3dmushrooms_red_inv.png"
})
minetest.override_item("flowers:mushroom_red", {
@ -43,7 +49,8 @@ minetest.override_item("flowers:mushroom_red", {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
inventory_image = "3dmushrooms_red_inv.png"
inventory_image = "3dmushrooms_red_inv.png",
wield_image = "3dmushrooms_red_inv.png"
})
-- aliases to the default mushrooms
@ -62,4 +69,4 @@ minetest.register_alias("mushroom:poison", "flowers:mushroom_red")
minetest.register_alias("mushroom:identifier", "default:mese_crystal_fragment")
print("[3D Mushrooms] loaded.")
minetest.log("info", S("[3D Mushrooms] loaded."))

View File

@ -0,0 +1,8 @@
# textdomain: 3dmushrooms
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# reusityback, 2022.
[3D Mushrooms] loaded.=[3D Mushrooms] geladen.

View File

@ -0,0 +1,8 @@
# textdomain: 3dmushrooms
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
[3D Mushrooms] loaded.=[3D Mushrooms] ŝargis.

View File

@ -0,0 +1,8 @@
# textdomain: 3dmushrooms
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
[3D Mushrooms] loaded.=

View File

@ -1,9 +0,0 @@
-----------------------------------------------------------------------------------------------
local title = "Along the Shore"
local version = "0.0.4"
local mname = "along_shore"
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
-----------------------------------------------------------------------------------------------

View File

@ -1,3 +0,0 @@
name = along_shore
depends = default, biome_lib
optional_depends = flowers_plus

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

View File

@ -1,30 +0,0 @@
-------------------------------------------------------------
Credit for textures of "along_shore"
-------------------------------------------------------------
(If more than one author is listed the names are in alphabetical order)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOLDER TEXTURE AUTHORS
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
../along_shore/textures along_shore_seaweed_1Darker.png Neuromancer, VanessaE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
../along_shore/textures/old (along_shore_empty.png) (Mossmanikin)
along_shore_lilypads_1.png Mossmanikin, Neuromancer
along_shore_lilypads_2.png Mossmanikin, Neuromancer
along_shore_lilypads_3.png Mossmanikin, Neuromancer
along_shore_lilypads_4.png Mossmanikin, Neuromancer
along_shore_pondscum_1.png Neuromancer
along_shore_seaweed_1.png Neuromancer, VanessaE
along_shore_seaweed_2.png Mossmanikin, Neuromancer, VanessaE
along_shore_seaweed_3.png Mossmanikin, Neuromancer, VanessaE
along_shore_seaweed_4.png Mossmanikin, Neuromancer, VanessaE
flowers_seaweed.png Neuromancer, VanessaE
flowers_waterlily.png Mossmanikin, VanessaE
flowers_waterlily_22.5.png Mossmanikin, VanessaE
flowers_waterlily_45.png Mossmanikin, VanessaE
flowers_waterlily_67.5.png Mossmanikin, VanessaE
lillypad3Flower16x.png Neuromancer
LillyPad3x16.png Neuromancer
lillyPad5x16.png Neuromancer
MultiLilly16x.png Neuromancer
pondscum16xc.png Neuromancer
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

View File

@ -8,30 +8,37 @@
-- support for i18n
local S = minetest.get_translator("bushes")
abstract_bushes = {}
abstract_bushes = {}
minetest.register_node("bushes:youngtree2_bottom", {
local bushes_bush_rarity = tonumber(minetest.settings:get("bushes_bush_rarity")) or 99.9
local bushes_bush_rarity_fertility = tonumber(minetest.settings:get("bushes_bush_rarity_fertility")) or 1.5
local bushes_youngtrees_rarity = tonumber(minetest.settings:get("bushes_youngtrees_rarity")) or 100
local bushes_youngtrees_rarity_fertility = tonumber(minetest.settings:get("bushes_youngtrees_rarity_fertility")) or 0.6
minetest.register_node("bushes:youngtree2_bottom", {
description = S("Young Tree 2 (bottom)"),
drawtype="nodebox",
tiles = {"bushes_youngtree2trunk.png"},
drawtype="nodebox",
tiles = {"bushes_youngtree2trunk.png"},
inventory_image = "bushes_youngtree2trunk_inv.png",
wield_image = "bushes_youngtree2trunk_inv.png",
paramtype = "light",
paramtype = "light",
walkable = false,
is_ground_content = true,
node_box = {
type = "fixed",
fixed = {
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
}
},
groups = {snappy=3,flammable=2},
node_box = {
type = "fixed",
fixed = {
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
}
},
groups = {snappy=3,flammable=2,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
drop = 'default:stick'
})
local BushBranchCenter = { {1,1}, {3,2} }
local BushBranchCenter = { {1,1}, {3,2} }
for i in pairs(BushBranchCenter) do
local Num = BushBranchCenter[i][1]
local TexNum = BushBranchCenter[i][2]
@ -42,6 +49,7 @@ for i in pairs(BushBranchCenter) do
"bushes_leaves_"..TexNum..".png",
"bushes_branches_center_"..TexNum..".png"
},
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = {
@ -55,13 +63,14 @@ for i in pairs(BushBranchCenter) do
},
inventory_image = "bushes_branches_center_"..TexNum..".png",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
snappy=3,
flammable=2,
leaves=1
leaves=1,
attached_node=1
},
sounds = default.node_sound_leaves_defaults(),
drop = 'default:stick 4'
@ -80,16 +89,17 @@ for i in pairs(BushBranchSide) do
--[[bottom]]"bushes_branches_center_"..TexNum..".png",
--[[right]] "bushes_branches_left_"..TexNum..".png",
--[[left]] "bushes_branches_right_"..TexNum..".png", -- MM: We could also mirror the previous here,
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
--[[front]] "bushes_branches_right_"..TexNum..".png"
},
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = {
-- { left , bottom , front, right , top , back }
{0.137748,-0.491944, 0.5 ,-0.125000,-0.179444,-0.007790}, --NodeBox 1
{0.262748,-0.185995, 0.5 ,-0.237252, 0.126505,-0.260269}, --NodeBox 2
{0.500000, 0.125000, 0.5 ,-0.500000, 0.500000,-0.500000}, --NodeBox 3
-- { left , bottom , front, right , top , back }
{0.137748,-0.491944, 0.5 ,-0.125000,-0.179444,-0.007790}, --NodeBox 1
{0.262748,-0.185995, 0.5 ,-0.237252, 0.126505,-0.260269}, --NodeBox 2
{0.500000, 0.125000, 0.5 ,-0.500000, 0.500000,-0.500000}, --NodeBox 3
},
},
selection_box = {
@ -98,13 +108,14 @@ for i in pairs(BushBranchSide) do
},
inventory_image = "bushes_branches_right_"..TexNum..".png",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
snappy=3,
flammable=2,
leaves=1
leaves=1,
attached_node=1
},
sounds = default.node_sound_leaves_defaults(),
drop = 'default:stick 3'
@ -118,11 +129,13 @@ for i in pairs(BushLeafNode) do
description = S("Bush Leaves @1", Num),
drawtype = "allfaces_optional",
tiles = {"bushes_leaves_"..Num..".png"},
use_texture_alpha = "clip",
paramtype = "light",
groups = { -- MM: Should we add leafdecay?
snappy=3,
flammable=2,
attached_node=1
attached_node=1,
leaves=1
},
sounds = default.node_sound_leaves_defaults(),
})
@ -158,9 +171,8 @@ abstract_bushes.grow_bush = function(pos)
abstract_bushes.grow_bush_node(pos,5,leaf_type)
end
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
@ -182,7 +194,7 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
dir = 1
end
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
minetest.swap_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
@ -197,64 +209,58 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
end
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
pl.register_on_generate({
surface = {
"default:dirt_with_grass",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
},
noise_params = pl.generate_noise_params({rarity = bushes_bush_rarity, rarity_fertility = bushes_bush_rarity_fertility}),
min_elevation = 1, -- above sea level
},
max_count = 15, --10,15
rarity = 101 - 4, --3,4
min_elevation = 1, -- above sea level
plantlife_limit = -0.9,
},
abstract_bushes.grow_bush
"bushes:bushes",
abstract_bushes.grow_bush
)
abstract_bushes.grow_youngtree2 = function(pos)
abstract_bushes.grow_youngtree2 = function(pos)
local height = math.random(4,5)
abstract_bushes.grow_youngtree_node2(pos,height)
end
abstract_bushes.grow_youngtree_node2 = function(pos, height)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
local three_above_right_here = {x=pos.x, y=pos.y+4, z=pos.z}
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
if height == 4 then
local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1}
local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1}
minetest.swap_node(right_here, {name="bushes:youngtree2_bottom"})
minetest.swap_node(above_right_here, {name="bushes:youngtree2_bottom"})
minetest.swap_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
minetest.swap_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1}
local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1}
minetest.swap_node(right_here, {name="bushes:youngtree2_bottom"})
minetest.swap_node(above_right_here, {name="bushes:youngtree2_bottom"})
minetest.swap_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
minetest.swap_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
end
end
end
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
pl.register_on_generate({
surface = {
"default:dirt_with_grass",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
},
noise_params = pl.generate_noise_params({rarity = bushes_youngtrees_rarity, rarity_fertility = bushes_youngtrees_rarity_fertility}),
min_elevation = 1, -- above sea level
},
max_count = 55, --10,15
rarity = 101 - 4, --3,4
min_elevation = 1, -- above sea level
plantlife_limit = -0.9,
},
abstract_bushes.grow_youngtree2
"bushes:youngtrees",
abstract_bushes.grow_youngtree2
)
--http://dev.minetest.net/Node_Drawtypes

View File

@ -0,0 +1,10 @@
# textdomain: bushes
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Young Tree 2 (bottom)=Strauch 2 (Ansatz)
Bush Branches @1=Buschäste @1
Bush Leaves @1=Buschblätter @1

View File

@ -0,0 +1,10 @@
# textdomain: bushes
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
Young Tree 2 (bottom)=Juna Arbo 2 (malsupro)
Bush Branches @1=Arbustaj Branĉoj @1
Bush Leaves @1=Arbustaj Folioj @1

View File

@ -1,3 +1,3 @@
name = bushes
depends = default, biome_lib
optional_depends = stonage, sumpf
optional_depends = stoneage, sumpf

17
bushes/settingtypes.txt Normal file
View File

@ -0,0 +1,17 @@
#Bush rarity %
bushes_bush_rarity (Bush rarity %) float 99.9 0 100
#How much the rarity is reduced by fertility %
bushes_bush_rarity_fertility (Bush rarity fertility reduction %) float 1.5 0 100
#Bush minimum fertility (-1 to +1)
bushes_bush_fertility (Bush minimum fertility) float -0.7 -1 1
#Youngtree (from bushes mod) rarity %
bushes_youngtrees_rarity (Youngtree bush rarity %) float 100 0 100
#How much the rarity is reduced by fertility %
bushes_youngtrees_rarity_fertility (Youngtree bush rarity fertility reduction %) float 0.6 0 100
#Youngtree (from bushes mod) minimum fertility (-1 to +1)
bushes_youngtrees_fertility (Youngtree bush minimum fertility) float -0.5 -1 1

View File

@ -30,7 +30,7 @@ local modpath = minetest.get_modpath('bushes_classic')
dofile(modpath..'/cooking.lua')
dofile(modpath..'/nodes.lua')
biome_lib:spawn_on_surfaces({
biome_lib.register_active_spawner({
spawn_delay = 3600,
spawn_plants = bushes_classic.spawn_list,
avoid_radius = 10,

View File

@ -0,0 +1,46 @@
# textdomain: bushes_classic
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Sugar=Sukero
Basket with Strawberry pies=Korbo kun Fragokukoj
Cooked Strawberry pie=Kuirita Fragokuko
Raw Strawberry pie=Kruda Fragokuko
Slice of Strawberry pie=Tranĉaĵo de Fragokuko
Strawberry=Frago
Strawberry Bush=Fraga Arbusto
Basket with Blackberry pies=Korbo kun Rubusokukoj
Cooked Blackberry pie=Kuirita Rubusokuko
Raw Blackberry pie=Kruda Rubusokuko
Slice of Blackberry pie=Tranĉaĵo de Rubusokuko
Blackberry=Rubuso
Blackberry Bush=Rubusa Arbusto
Basket with Blueberry pies=Korbo kun Mirtelokukoj
Blueberry=Mirtelo
Blueberry Bush=Mirtela Arbusto
Cooked Blueberry pie=Kuirita Mirtelokuko
Raw Blueberry pie=Kruda Mirtelokuko
Slice of Blueberry pie=Tranĉaĵo de Mirtelokuko
Basket with Raspberry pies=Korbo kun Frambokukoj
Cooked Raspberry pie=Kuirita Frambokuko
Raspberry=Frambo
Raspberry Bush=Framba Arbusto
Raw Raspberry pie=Kruda Frambokuko
Slice of Raspberry pie=Tranĉaĵo de Frambokuko
Basket with Gooseberry pies=Korbo kun Grosberkuko
Cooked Gooseberry pie=Kuirita Grosberkuko
Gooseberry=Grosbero
Gooseberry Bush=Grosberarbusto
Raw Gooseberry pie=Kruda Grosberkuko
Slice of Gooseberry pie=Tranĉaĵo de Grosberkuko
Basket with Mixed Berry pies=Korbo kun Miksitaj Beraj Kukoj
Cooked Mixed Berry pie=Kuirita Miksa Beraj Kukoj
Currently fruitless Bush=Nuntempe senfrukta Arbusto
Mixed Berry=Miksita Bero
Raw Mixed Berry pie=Kruda Miksita Bera Kuko
Slice of Mixed Berry pie=Tranĉaĵo de Miksita Bera Kuko
Basket=Korbo

View File

@ -63,7 +63,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
-- with a chance of 1/3, return 2 bushes
local amount
if math.random(1,3) == 1 then
if can_harvest and math.random(1,3) == 1 then
amount = "2"
else
amount = "1"
@ -173,6 +173,13 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
texture_top = "bushes_bush_top.png"
texture_bottom = "bushes_bush_bottom.png"
end
local node_dig_prediction
local node_placement_prediction
if bush_name ~= "fruitless" then
node_dig_prediction = "bushes:fruitless_bush"
node_placement_prediction = "bushes:fruitless_bush"
end
minetest.register_node(":bushes:" .. bush_name .. "_bush", {
description = bushes_classic.bushes_descriptions[i][6],
@ -185,6 +192,8 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
groups = groups,
sounds = default.node_sound_leaves_defaults(),
drop = "",
node_dig_prediction = node_dig_prediction,
node_placement_prediction = node_placement_prediction,
after_dig_node = function( pos, oldnode, oldmetadata, digger )
return plantlife_bushes.after_dig_node(pos, oldnode, oldmetadata, digger);
end,

View File

@ -7,6 +7,8 @@ local mname = "cavestuff"
-- support for i18n
local S = minetest.get_translator("cavestuff")
cavestuff = {}
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")

View File

@ -0,0 +1,11 @@
# textdomain: cavestuff
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# reusityback, 2022.
#
Pebble=Kieselstein
Desert Pebble=Wüstenkiesel
Stalactite=Stalaktit

View File

@ -0,0 +1,11 @@
# textdomain: cavestuff
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Pebble=Ŝtoneto
Desert Pebble=Dezerta Ŝtoneto
Stalactite=Stalaktito

View File

@ -1,52 +1,65 @@
--Map Generation Stuff
minetest.register_on_generated(function(minp, maxp, seed)
if maxp.y >= 2 and minp.y <= 0 then
-- Generate pebbles
local perlin1 = minetest.get_perlin(329, 3, 0.6, 100)
-- Assume X and Z lengths are equal
local divlen = 16
local divs = (maxp.x-minp.x)/divlen+1;
for divx=0,divs-1 do
for divz=0,divs-1 do
local x0 = minp.x + math.floor((divx+0)*divlen)
local z0 = minp.z + math.floor((divz+0)*divlen)
local x1 = minp.x + math.floor((divx+1)*divlen)
local z1 = minp.z + math.floor((divz+1)*divlen)
-- Determine pebble amount from perlin noise
local pebble_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 2 * 2)
-- Find random positions for pebbles based on this random
local pr = PseudoRandom(seed+1)
for i=0,pebble_amount do
local x = pr:next(x0, x1)
local z = pr:next(z0, z1)
-- Find ground level (0...15)
local ground_y = nil
for y=30,0,-1 do
if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
ground_y = y
break
end
end
minetest.register_decoration({
decoration = {
"cavestuff:pebble_1",
"cavestuff:pebble_2"
},
place_on = {
"default:dirt_with_grass",
"default:gravel",
"default:stone",
"default:permafrost_with_stones"
},
noise_params = {
offset = 0,
scale = 0.0078125,
spread = {
y = 100,
z = 100,
x = 100
},
seed = 0,
octaves = 3,
persist = 0.6,
flags = "absvalue",
lacunarity = 2
},
param2 = 0,
flags = "all_floors",
deco_type = "simple",
param2_max = 3,
y_min = -16,
y_max = 48
})
if ground_y then
local p = {x=x,y=ground_y+1,z=z}
local nn = minetest.get_node(p).name
-- Check if the node can be replaced
if minetest.registered_nodes[nn] and
minetest.registered_nodes[nn].buildable_to then
nn = minetest.get_node({x=x,y=ground_y,z=z}).name
-- If desert sand, add dry shrub
if nn == "default:dirt_with_grass" then
minetest.swap_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)})
elseif nn == "default:desert_sand" then
minetest.swap_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)})
end
end
end
end
end
end
end
end)
minetest.register_decoration({
decoration = {
"cavestuff:desert_pebble_1",
"cavestuff:desert_pebble_2"
},
place_on = {
"default:desert_sand",
"default:desert_stone"
},
noise_params = {
offset = 0,
scale = 0.0078125,
spread = {
y = 100,
z = 100,
x = 100
},
seed = 0,
octaves = 3,
persist = 0.6,
flags = "absvalue",
lacunarity = 2
},
param2 = 0,
flags = "all_floors",
deco_type = "simple",
param2_max = 3,
y_min = -16,
y_max = 48
})

View File

@ -1,2 +1,2 @@
name = cavestuff
depends = default
depends = default,biome_lib

View File

@ -12,65 +12,65 @@ minetest.register_node("cavestuff:pebble_1",{
description = S("Pebble"),
drawtype = "mesh",
mesh = "cavestuff_pebble.obj",
tiles = {"undergrowth_pebble.png"},
paramtype = "light",
tiles = {"undergrowth_pebble.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3, stone=1},
selection_box = cbox,
collision_box = cbox,
on_place = function(itemstack, placer, pointed_thing)
groups = {cracky=3, stone=1, attached_node=1},
selection_box = cbox,
collision_box = cbox,
on_place = function(itemstack, placer, pointed_thing)
-- place a random pebble node
local stack = ItemStack("cavestuff:pebble_"..math.random(1,2))
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("cavestuff:pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
end,
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("cavestuff:pebble_2",{
drawtype = "mesh",
mesh = "cavestuff_pebble.obj",
tiles = {"undergrowth_pebble.png"},
tiles = {"undergrowth_pebble.png"},
drop = "cavestuff:pebble_1",
tiles = {"undergrowth_pebble.png"},
paramtype = "light",
tiles = {"undergrowth_pebble.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
selection_box = cbox,
collision_box = cbox,
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("cavestuff:desert_pebble_1",{
description = S("Desert Pebble"),
drawtype = "mesh",
mesh = "cavestuff_pebble.obj",
tiles = {"default_desert_stone.png"},
paramtype = "light",
tiles = {"default_desert_stone.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3, stone=1},
groups = {cracky=3, stone=1, attached_node=1},
selection_box = cbox,
collision_box = cbox,
on_place = function(itemstack, placer, pointed_thing)
on_place = function(itemstack, placer, pointed_thing)
-- place a random pebble node
local stack = ItemStack("cavestuff:desert_pebble_"..math.random(1,2))
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("cavestuff:desert_pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
end,
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("cavestuff:desert_pebble_2",{
drawtype = "mesh",
mesh = "cavestuff_pebble.obj",
drop = "cavestuff:desert_pebble_1",
tiles = {"default_desert_stone.png"},
paramtype = "light",
tiles = {"default_desert_stone.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
selection_box = cbox,
collision_box = cbox,
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(),
})
--Staclactites
@ -85,19 +85,34 @@ minetest.register_node("cavestuff:stalactite_1",{
node_box = {
type = "fixed",
fixed = {
{-0.187500,0.425000,-0.150003,0.162500,0.500000,0.162500},
{-0.112500,0.162500,-0.100000,0.087500,0.475000,0.087500},
{-0.062500,-0.275000,-0.062500,0.062500,0.500000,0.062500},
{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},
{-0.187500,-0.425000,-0.150003,0.162500,-0.500000,0.162500},
{-0.112500,-0.162500,-0.100000,0.087500,-0.475000,0.087500},
{-0.062500,0.275000,-0.062500,0.062500,-0.500000,0.062500},
{-0.037500,0.837500,0.037500,0.037500,-0.500000,-0.025000},
}
},
on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
if minetest.get_node(pt.under).name=="default:stone"
and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
minetest.swap_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)})
local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
local base = pointed_thing.under
local place = vector.add(base, dir)
local above = vector.add(place, dir)
if not placer then return end
local playername = placer:get_player_name()
if minetest.is_protected(place, playername)
or minetest.is_protected(above, playername) then
minetest.record_protection_violation(place, playername)
return
end
if minetest.get_node(base).name == "default:stone"
and minetest.get_node(place).name == "air"
and minetest.get_node(above).name == "air"
then
minetest.swap_node(place, {
name = "cavestuff:stalactite_"..math.random(1,3),
param2 = minetest.dir_to_wallmounted(vector.multiply(dir, -1))
})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
@ -116,10 +131,10 @@ minetest.register_node("cavestuff:stalactite_2",{
node_box = {
type = "fixed",
fixed = {
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
{-0.112500,0.112500,-0.100000,0.087500,0.475000,0.087500},
{-0.062500,-0.675000,-0.062500,0.062500,0.500000,0.062500},
{-0.037500,-0.975000,0.037500,0.037500,0.500000,-0.025000},
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
{-0.112500,-0.112500,-0.100000,0.087500,-0.475000,0.087500},
{-0.062500,0.675000,-0.062500,0.062500,-0.500000,0.062500},
{-0.037500,0.975000,0.037500,0.037500,-0.500000,-0.025000},
}
},
})
@ -132,14 +147,14 @@ minetest.register_node("cavestuff:stalactite_3",{
paramtype = "light",
paramtype2 = "wallmounted",
node_box = {
type = "fixed",
fixed = {
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
{-0.112500,0.037500,-0.100000,0.087500,0.475000,0.087500},
{-0.062500,-0.437500,-0.062500,0.062500,0.500000,0.062500},
{-0.037500,-1.237500,0.037500,0.037500,0.500000,-0.025000},
}
},
type = "fixed",
fixed = {
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
{-0.112500,-0.037500,-0.100000,0.087500,-0.475000,0.087500},
{-0.062500,0.437500,-0.062500,0.062500,-0.500000,0.062500},
{-0.037500,1.237500,0.037500,0.037500,-0.500000,-0.025000},
}
},
})
--Stalagmites

View File

@ -130,6 +130,7 @@ minetest.register_node("dryplants:grass", {
paramtype = "light",
sunlight_propagates = true,
tiles = {"dryplants_grass.png"},
use_texture_alpha = "clip",
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -161,6 +162,7 @@ minetest.register_node("dryplants:hay", {
paramtype = "light",
sunlight_propagates = true,
tiles = {"dryplants_hay.png"},
use_texture_alpha = "clip",
drawtype = "nodebox",
node_box = {
type = "fixed",

View File

@ -92,44 +92,42 @@ minetest.register_node("dryplants:juncus_02", {
-- GENERATE SMALL JUNCUS
-----------------------------------------------------------------------------------------------
-- near water or swamp
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
--"default:desert_sand",
--"default:sand",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
pl.register_on_generate({
surface = {
"default:dirt_with_grass",
--"default:desert_sand",
--"default:sand",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
},
noise_params = pl.generate_noise_params({max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - JUNCUS_NEAR_WATER_RARITY}),
min_elevation = 1, -- above sea level
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
},
max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK,
rarity = 101 - JUNCUS_NEAR_WATER_RARITY,
min_elevation = 1, -- above sea level
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
abstract_dryplants.grow_juncus
"dryplants:juncus_near_water",
abstract_dryplants.grow_juncus
)
-- at dunes/beach
biome_lib:register_generate_plant({
surface = {
--"default:dirt_with_grass",
--"default:desert_sand",
"default:sand",
--"stoneage:grass_with_silex",
--"sumpf:peat",
--"sumpf:sumpf"
pl.register_on_generate({
surface = {
--"default:dirt_with_grass",
--"default:desert_sand",
"default:sand",
--"stoneage:grass_with_silex",
--"sumpf:peat",
--"sumpf:sumpf"
},
noise_params = pl.generate_noise_params({max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK, rarity = 101 - JUNCUS_AT_BEACH_RARITY}),
min_elevation = 1, -- above sea level
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
},
max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK,
rarity = 101 - JUNCUS_AT_BEACH_RARITY,
min_elevation = 1, -- above sea level
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
abstract_dryplants.grow_juncus
"dryplants:junces_at_beach",
abstract_dryplants.grow_juncus
)

View File

@ -0,0 +1,28 @@
# textdomain: dryplants
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# reusityback, 2022.
#
Sickle=Sichel
Cut Grass=Gras schneiden
Hay=Heu
Short Grass=Kurzes Gras
Juncus=Binsen
Wet Reed=Nasses Schilf
Wet Reed Slab=Nasse Schilfstufe
Wet Reed Roof=Nasses Schilfdach
Wet Reed Roof Corner=Nasser Schilfdachwinkel
Wet Reed Roof Corner 2=Nasser Schilfdachwinkel 2
Reed=Schilf
Reed Slab=Schilfstufe
Reed Roof=Schilfdach
Reed Roof Corner=Schilfdachwinkel
Reed Roof Corner 2=Schilfdachwinkel
Reedmace=Rohrkolben
Reedmace, height: 1=Rohrkolben, Höhe: 1
Reedmace, height: 2=Rohrkolben, Höhe: 2
Reedmace, height: 3=Rohrkolben, Höhe: 3
Reedmace, height: 3 & Spikes=Rohrkolben, Höhe: 3 & Rispe

View File

@ -0,0 +1,28 @@
# textdomain: dryplants
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Sickle=
Cut Grass=Tranĉita Herbenon
Hay=Fojno
Short Grass=Mallonga Herbo
Juncus=Junko
Wet Reed=Malseka Kano
Wet Reed Slab=Slabo de Malseka Kano
Wet Reed Roof=Tegmento de Malseka Kano
Wet Reed Roof Corner=Tegmentangulo de Malseka Kano
Wet Reed Roof Corner 2=Tegmentangulo 2 de Malseka Kano
Reed=Kano
Reed Slab=Slabo de Kano
Reed Roof=Tegmento de Kano
Reed Roof Corner=Tegmentangulo de Kano
Reed Roof Corner 2=Tegmentangulo 2 de Kano
Reedmace=Tifeo
Reedmace, height: 1=Tifeo, alteco: 1
Reedmace, height: 2=Tifeo, alteco: 2
Reedmace, height: 3=Tifeo, alteco: 3
Reedmace, height: 3 & Spikes=Tifeo, alteco: 3 & Pikiloj

View File

@ -12,14 +12,13 @@ abstract_dryplants.grow_grass_variation = function(pos)
minetest.swap_node(right_here, {name="dryplants:grass_short"})
end
biome_lib:register_generate_plant({
pl.register_on_generate({
surface = {
"default:dirt_with_grass",
},
max_count = 4800,
rarity = 25,
"default:dirt_with_grass",
},
noise_params = pl.generate_noise_params({max_count = 4800, rarity = 25}),
min_elevation = 1, -- above sea level
plantlife_limit = -0.9,
},
"dryplants:grass",
abstract_dryplants.grow_grass_variation
)

View File

@ -7,26 +7,23 @@
-- Looked at code from: default
-----------------------------------------------------------------------------------------------
abstract_dryplants.grow_grass = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local grass_size = math.random(1,5)
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
minetest.swap_node(right_here, {name="default:grass_"..grass_size})
end
end
biome_lib:register_generate_plant({
surface = {
minetest.register_decoration({
decoration = {
"default:grass_1",
"default:grass_2",
"default:grass_3",
"default:grass_4",
"default:grass_5"
},
place_on = {
"default:dirt_with_grass",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
},
max_count = TALL_GRASS_PER_MAPBLOCK,
rarity = 101 - TALL_GRASS_RARITY,
min_elevation = 1, -- above sea level
plantlife_limit = -0.9,
},
abstract_dryplants.grow_grass
)
noise_params = pl.generate_noise_params({max_count = TALL_GRASS_PER_MAPBLOCK, rarity = 101 - TALL_GRASS_RARITY}),
flags = "all_floors",
deco_type = "simple",
y_min = 1,
y_max = 48
})

View File

@ -264,7 +264,8 @@ minetest.register_node("dryplants:reedmace_sapling", {
groups = {
snappy=3,
flammable=2,
attached_node=1
attached_node=1,
sapling=1,
},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
@ -327,7 +328,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
-----------------------------------------------------------------------------------------------
-- SPAWN REEDMACE
-----------------------------------------------------------------------------------------------
--[[biome_lib:spawn_on_surfaces({
--[[biome_lib.register_active_spawner({
spawn_delay = 1200,
spawn_plants = {"dryplants:reedmace_sapling"},
spawn_chance = 400,
@ -348,66 +349,63 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
-- GENERATE REEDMACE
-----------------------------------------------------------------------------------------------
-- near water or swamp
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:desert_sand",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
pl.register_on_generate({
surface = {
"default:dirt_with_grass",
"default:desert_sand",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
},
noise_params = pl.generate_noise_params({max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_NEAR_WATER_RARITY}),
--rarity = 60,
min_elevation = 1, -- above sea level
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
},
max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK,
rarity = 101 - REEDMACE_NEAR_WATER_RARITY,
--rarity = 60,
min_elevation = 1, -- above sea level
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
abstract_dryplants.grow_reedmace
"dryplants:reedmace_near_water",
abstract_dryplants.grow_reedmace
)
-- in water
biome_lib:register_generate_plant({
surface = {
"default:dirt",
"default:dirt_with_grass",
--"default:desert_sand",
--"stoneage:grass_with_silex",
"stoneage:sand_with_silex",
"sumpf:peat",
"sumpf:sumpf"
pl.register_on_generate({
surface = {
"default:dirt",
"default:dirt_with_grass",
--"default:desert_sand",
--"stoneage:grass_with_silex",
"stoneage:sand_with_silex",
"sumpf:peat",
"sumpf:sumpf"
},
noise_params = pl.generate_noise_params({max_count = REEDMACE_IN_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_IN_WATER_RARITY}),
--rarity = 35,
min_elevation = 0, -- a bit below sea level
max_elevation = 0, -- ""
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
near_nodes_size = 1,
near_nodes_count = 1,
},
max_count = REEDMACE_IN_WATER_PER_MAPBLOCK,
rarity = 101 - REEDMACE_IN_WATER_RARITY,
--rarity = 35,
min_elevation = 0, -- a bit below sea level
max_elevation = 0, -- ""
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
near_nodes_size = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
abstract_dryplants.grow_reedmace_water
"dryplants:reedmace_in_water",
abstract_dryplants.grow_reedmace_water
)
-- for oases & tropical beaches & tropical swamps
biome_lib:register_generate_plant({
surface = {
"default:sand",
"sumpf:sumpf"
pl.register_on_generate({
surface = {
"default:sand",
"sumpf:sumpf"
},
noise_params = pl.generate_noise_params({max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK, 101 - REEDMACE_FOR_OASES_RARITY}),
--rarity = 10,
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
ncount = 1,
min_elevation = 1, -- above sea level
near_nodes = {"default:desert_sand","sumpf:sumpf"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
},
max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK,
rarity = 101 - REEDMACE_FOR_OASES_RARITY,
--rarity = 10,
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
ncount = 1,
min_elevation = 1, -- above sea level
near_nodes = {"default:desert_sand","sumpf:sumpf"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
abstract_dryplants.grow_reedmace
"dryplants:reemace_oases",
abstract_dryplants.grow_reedmace
)

View File

@ -87,7 +87,7 @@ end
-----------------------------------------------------------------------------------------------
if abstract_ferns.config.lady_ferns_near_tree == true then
biome_lib:register_generate_plant({ -- near trees (woodlands)
biome_lib.register_on_generate({ -- near trees (woodlands)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
@ -116,7 +116,7 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
end
if abstract_ferns.config.lady_ferns_near_rock == true then
biome_lib:register_generate_plant({ -- near stone (mountains)
biome_lib.register_on_generate({ -- near stone (mountains)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
@ -143,7 +143,7 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
end
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
biome_lib.register_on_generate({ -- near ores (potential mining sites)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
@ -183,7 +183,7 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
end
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
biome_lib:register_generate_plant({
biome_lib.register_on_generate({
surface = {
"default:dirt_with_grass",
"default:mossycobble",

View File

@ -13,6 +13,25 @@ assert(abstract_ferns.config.enable_giant_treefern == true)
local S = minetest.get_translator("ferns")
-- lot of code, lot to load
function abstract_ferns.can_grow_giant_tree_fern(pos)
local node_name = minetest.get_node(pos).name
if node_name ~= "air" and node_name ~= "ferns:sapling_giant_tree_fern" and node_name ~= "default:junglegrass" then
return false
end
local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
return false
end
local light = minetest.get_node_light(pos, 0.5)
if light <= 8 then
return false
end
return true
end
abstract_ferns.grow_giant_tree_fern = function(pos)
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
local name = minetest.get_node(pos_aux).name
@ -162,6 +181,14 @@ minetest.register_node("ferns:tree_fern_leave_big", {
},
drop = "",
sounds = default.node_sound_leaves_defaults(),
after_destruct = function(pos,oldnode)
for _, d in pairs({{x=-1,z=0},{x=1,z=0},{x=0,z=-1},{x=0,z=1}}) do
local node = minetest.get_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
if node.name == "ferns:tree_fern_leave_big" then
minetest.dig_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
end
end
end,
})
-----------------------------------------------------------------------------------------------
@ -173,6 +200,7 @@ minetest.register_node("ferns:tree_fern_leave_big_end", {
paramtype = "light",
paramtype2 = "facedir",
tiles = { "ferns_tree_fern_leave_big_end.png" },
use_texture_alpha = "clip",
walkable = false,
node_box = {
type = "fixed",
@ -205,6 +233,7 @@ minetest.register_node("ferns:fern_trunk_big_top", {
"ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png",
"ferns_fern_trunk_big.png"
},
use_texture_alpha = "clip",
node_box = {
type = "fixed",
-- {left, bottom, front, right, top, back }
@ -242,6 +271,7 @@ minetest.register_node("ferns:fern_trunk_big", {
"ferns_fern_trunk_big_top.png",
"ferns_fern_trunk_big.png"
},
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
@ -271,7 +301,7 @@ minetest.register_node("ferns:sapling_giant_tree_fern", {
tiles = {"ferns_sapling_tree_fern_giant.png"},
inventory_image = "ferns_sapling_tree_fern_giant.png",
walkable = false,
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -285,7 +315,9 @@ minetest.register_abm({
interval = 1000,
chance = 4,
action = function(pos, node, _, _)
abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
if abstract_ferns.can_grow_giant_tree_fern(pos) then
abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
end
end
})
@ -295,7 +327,7 @@ minetest.register_abm({
-- in jungles
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
biome_lib:register_generate_plant({
biome_lib.register_on_generate({
surface = {
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
@ -321,7 +353,7 @@ end
-- for oases & tropical beaches
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
biome_lib:register_generate_plant({
biome_lib.register_on_generate({
surface = {
"default:sand"--,
--"default:desert_sand"

View File

@ -75,7 +75,7 @@ create_nodes()
-- Spawning
-----------------------------------------------------------------------------------------------
if abstract_ferns.config.enable_horsetails_spawning == true then
biome_lib:spawn_on_surfaces({
biome_lib.register_active_spawner({
spawn_delay = 1200,
spawn_plants = node_names,
spawn_chance = 400,
@ -104,7 +104,7 @@ end
-----------------------------------------------------------------------------------------------
if abstract_ferns.config.enable_horsetails_on_grass == true then
biome_lib:register_generate_plant({
biome_lib.register_on_generate({
surface = {
"default:dirt_with_grass",
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
@ -137,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
end
if abstract_ferns.config.enable_horsetails_on_stones == true then
biome_lib:register_generate_plant({
biome_lib.register_on_generate({
surface = {
"default:gravel", -- roots go deep
"default:mossycobble",

23
ferns/locale/ferns.de.tr Normal file
View File

@ -0,0 +1,23 @@
# textdomain: ferns
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# reusityback, 2022.
#
Fiddlehead=Geigenkopf
Roasted Fiddlehead=Gerösteter Geigenkopf
Fern Tuber=Farnknolle
Roasted Fern Tuber=Geröstete Farnknolle
Lady-fern (Athyrium)=Frauenfarn (Athyrium)
Tree Fern Crown (Dicksonia)=Baumfarnkrone (Dicksonia)
Giant Tree Fern Leaves=Riesige Baumfarnblätter
Giant Tree Fern Leave End=Riesiges Baumfarnblattende
Giant Fern Trunk=Riesiger Baumfarnstamm
Giant Tree Fern Sapling=Riesiger Baumfarnsetzling
Young Horsetail (Equisetum)=Junger Schachtelhalm (Equisetum)
Horsetail (Equisetum)=Schachtelhalm (Equisetum)
Fern Trunk (Dicksonia)=Farnstamm (Dicksonia)
Tree Fern Sapling (Dicksonia)=Baumfarnsetzling (Dicksonia)

23
ferns/locale/ferns.eo.tr Normal file
View File

@ -0,0 +1,23 @@
# textdomain: ferns
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Fiddlehead=Filika Supro
Roasted Fiddlehead=Rostita Filika Supro
Fern Tuber=Filika Tubero
Roasted Fern Tuber=Rostita Filika Tubero
Lady-fern (Athyrium)=Afiriumo (Athyrium)
Tree Fern Crown (Dicksonia)=Krono de Arba Filiko
Giant Tree Fern Leaves=Folioj de Giganta Arba Filiko
Giant Tree Fern Leave End=Folifino de Giganta Arba Filiko
Giant Fern Trunk=Trunko de Giganta Arba Filiko
Giant Tree Fern Sapling=Arbido de Giganta Arba Filiko
Young Horsetail (Equisetum)=Juna Ekvizeto (Equisetum)
Horsetail (Equisetum)=Ekvizeto (Equisetum)
Fern Trunk (Dicksonia)=Trunko de Arba Filiko (Dicksonia)
Tree Fern Sapling (Dicksonia)=Arbido de Arba Filiko (Dicksonia)

View File

@ -11,6 +11,25 @@ local S = minetest.get_translator("ferns")
assert(abstract_ferns.config.enable_treefern == true)
function abstract_ferns.can_grow_tree_fern(pos)
local node_name = minetest.get_node(pos).name
if node_name ~= "air" and node_name ~= "ferns:sapling_tree_fern" and node_name ~= "default:junglegrass" then
return false
end
local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
return false
end
local light = minetest.get_node_light(pos, 0.5)
if light <= 8 then
return false
end
return true
end
abstract_ferns.grow_tree_fern = function(pos)
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
@ -128,6 +147,7 @@ minetest.register_node("ferns:fern_trunk", {
"ferns_fern_trunk_top.png",
"ferns_fern_trunk.png"
},
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
@ -158,7 +178,7 @@ minetest.register_node("ferns:sapling_tree_fern", {
tiles = {"ferns_sapling_tree_fern.png"},
inventory_image = "ferns_sapling_tree_fern.png",
walkable = false,
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -171,7 +191,9 @@ minetest.register_abm({
interval = 1000,
chance = 4,
action = function(pos, node, _, _)
abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
if abstract_ferns.can_grow_tree_fern(pos) then
abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
end
end
})
@ -181,7 +203,7 @@ minetest.register_abm({
-- in jungles
if abstract_ferns.config.enable_treeferns_in_jungle == true then
biome_lib:register_generate_plant({
biome_lib.register_on_generate({
surface = {
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
@ -210,7 +232,7 @@ end
-- for oases & tropical beaches
if abstract_ferns.config.enable_treeferns_in_oases == true then
biome_lib:register_generate_plant({
biome_lib.register_on_generate({
surface = {
"default:sand"--,
--"default:desert_sand"

View File

@ -1,24 +0,0 @@
Changelog
---------
2012-08-06: Tweaked selection boxes on all nodes. Tweaked seaweed to use
signlike instead of raillike drawtype, (still forced to only spawn flat as
usual). Adjusted light level limits to give it more time to grow. Created
this changelog file using github commit messages as the basis. Shrunk the
geranium flower down a bit to better match the others.
2012-08-03: Tuned out the random-numbers-inside-ABM stuff. Uses the ABM's
chance setting instead. Should be approximately the same as before, but
hopefully using a tad less CPU. Minor tweak to ABM interval/growing delay.
2012-08-01: Added blue geranium to the collection of flowers.
2012-07-31: Disable debug by default.
2012-07-30: many updates over the course of the day - first commit, removed
some redundant files, added wield/inventory image entries for each item, to
force the game to draw them properly (these shouldn't be needed, must be a
bug). Tweaked spawn code so that the radius check also includes the name of
the item being spawned as well as items in group:flower, that way all items can
have a radius test, and not just those in group:flower. Fiddled with the spawn
rates a bit.

View File

@ -1,481 +0,0 @@
-- support for i18n
local S = minetest.get_translator("flowers_plus")
-- This file supplies a few additional plants and some related crafts
-- for the plantlife modpack. Last revision: 2013-04-24
flowers_plus = {}
local SPAWN_DELAY = 1000
local SPAWN_CHANCE = 200
local flowers_seed_diff = 329
local lilies_max_count = 320
local lilies_rarity = 33
local seaweed_max_count = 320
local seaweed_rarity = 33
local sunflowers_max_count = 10
local sunflowers_rarity = 25
-- register the various rotations of waterlilies
local lilies_list = {
{ nil , nil , 1 },
{ "225", "22.5" , 2 },
{ "45" , "45" , 3 },
{ "675", "67.5" , 4 },
{ "s1" , "small_1" , 5 },
{ "s2" , "small_2" , 6 },
{ "s3" , "small_3" , 7 },
{ "s4" , "small_4" , 8 },
}
for i in ipairs(lilies_list) do
local deg1 = ""
local deg2 = ""
local lily_groups = {snappy = 3,flammable=2,flower=1}
if lilies_list[i][1] ~= nil then
deg1 = "_"..lilies_list[i][1]
deg2 = "_"..lilies_list[i][2]
lily_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:waterlily"..deg1, {
description = S("Waterlily"),
drawtype = "nodebox",
tiles = {
"flowers_waterlily"..deg2..".png",
"flowers_waterlily"..deg2..".png^[transformFY"
},
inventory_image = "flowers_waterlily.png",
wield_image = "flowers_waterlily.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = lily_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
node_placement_prediction = "",
liquids_pointable = true,
drop = "flowers:waterlily",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if place_pos and not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
if not keys["sneak"] then
local node = minetest.get_node(pt.under)
local waterlily = math.random(1,8)
if waterlily == 1 then
nodename = "flowers:waterlily"
elseif waterlily == 2 then
nodename = "flowers:waterlily_225"
elseif waterlily == 3 then
nodename = "flowers:waterlily_45"
elseif waterlily == 4 then
nodename = "flowers:waterlily_675"
elseif waterlily == 5 then
nodename = "flowers:waterlily_s1"
elseif waterlily == 6 then
nodename = "flowers:waterlily_s2"
elseif waterlily == 7 then
nodename = "flowers:waterlily_s3"
elseif waterlily == 8 then
nodename = "flowers:waterlily_s4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:waterlily", param2 = fdir})
end
if not biome_lib.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
local algae_list = { {nil}, {2}, {3}, {4} }
for i in ipairs(algae_list) do
local num = ""
local algae_groups = {snappy = 3,flammable=2,flower=1}
if algae_list[i][1] ~= nil then
num = "_"..algae_list[i][1]
algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:seaweed"..num, {
description = S("Seaweed"),
drawtype = "nodebox",
tiles = {
"flowers_seaweed"..num..".png",
"flowers_seaweed"..num..".png^[transformFY"
},
inventory_image = "flowers_seaweed_2.png",
wield_image = "flowers_seaweed_2.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = algae_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
liquids_pointable = true,
drop = "flowers:seaweed",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- :D
if not keys["sneak"] then
--local node = minetest.get_node(pt.under)
local seaweed = math.random(1,4)
if seaweed == 1 then
nodename = "flowers:seaweed"
elseif seaweed == 2 then
nodename = "flowers:seaweed_2"
elseif seaweed == 3 then
nodename = "flowers:seaweed_3"
elseif seaweed == 4 then
nodename = "flowers:seaweed_4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
end
if not biome_lib.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
local box = {
type="fixed",
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
}
local sunflower_drop = "farming:seed_wheat"
if minetest.registered_items["farming:seed_spelt"] then
sunflower_drop = "farming:seed_spelt"
end
minetest.register_node(":flowers:sunflower", {
description = S("Sunflower"),
drawtype = "mesh",
paramtype = "light",
paramtype2 = "facedir",
inventory_image = "flowers_sunflower_inv.png",
mesh = "flowers_sunflower.obj",
tiles = { "flowers_sunflower.png" },
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = { dig_immediate=3, flora=1, flammable=3 },
sounds = default.node_sound_leaves_defaults(),
selection_box = box,
collision_box = box,
drop = {
max_items = 1,
items = {
{items = {sunflower_drop}, rarity = 8},
{items = {"flowers:sunflower"}},
}
}
})
local extra_aliases = {
"waterlily",
"waterlily_225",
"waterlily_45",
"waterlily_675",
"seaweed"
}
for i in ipairs(extra_aliases) do
local flower = extra_aliases[i]
minetest.register_alias("flowers:flower_"..flower, "flowers:"..flower)
end
minetest.register_alias( "trunks:lilypad" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_1" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_2" , "flowers:waterlily_s2" )
minetest.register_alias( "along_shore:lilypads_3" , "flowers:waterlily_s3" )
minetest.register_alias( "along_shore:lilypads_4" , "flowers:waterlily_s4" )
minetest.register_alias( "along_shore:pondscum_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_2" , "flowers:seaweed_2" )
minetest.register_alias( "along_shore:seaweed_3" , "flowers:seaweed_3" )
minetest.register_alias( "along_shore:seaweed_4" , "flowers:seaweed_4" )
-- ongen registrations
flowers_plus.grow_waterlily = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
for i in ipairs(lilies_list) do
local chance = math.random(1,8)
local ext = ""
local num = lilies_list[i][3]
if lilies_list[i][1] ~= nil then
ext = "_"..lilies_list[i][1]
end
if chance == num then
minetest.swap_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
end
end
end
biome_lib:register_generate_plant({
surface = {"default:water_source"},
max_count = lilies_max_count,
rarity = lilies_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
temp_max = -0.22,
temp_min = 0.22,
},
flowers_plus.grow_waterlily
)
flowers_plus.grow_seaweed = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
minetest.swap_node(right_here, {name="along_shore:seaweed_"..math.random(1,4), param2=math.random(1,3)})
end
biome_lib:register_generate_plant({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
flowers_plus.grow_seaweed
)
-- seaweed at beaches
-- MM: not satisfied with it, but IMHO some beaches should have some algae
biome_lib:register_generate_plant({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:sand"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
flowers_plus.grow_seaweed
)
biome_lib:register_generate_plant({
surface = {"default:sand"},
max_count = seaweed_max_count*2,
rarity = seaweed_rarity/2,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:water_source"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
flowers_plus.grow_seaweed
)
biome_lib:register_generate_plant({
surface = {"default:dirt_with_grass"},
avoid_nodes = { "flowers:sunflower" },
max_count = sunflowers_max_count,
rarity = sunflowers_rarity,
min_elevation = 0,
plantlife_limit = -0.9,
temp_max = 0.53,
random_facedir = {0,3},
},
"flowers:sunflower"
)
-- spawn ABM registrations
biome_lib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY/2,
spawn_plants = {
"flowers:waterlily",
"flowers:waterlily_225",
"flowers:waterlily_45",
"flowers:waterlily_675",
"flowers:waterlily_s1",
"flowers:waterlily_s2",
"flowers:waterlily_s3",
"flowers:waterlily_s4"
},
avoid_radius = 2.5,
spawn_chance = SPAWN_CHANCE*4,
spawn_surfaces = {"default:water_source"},
avoid_nodes = {"group:flower", "group:flora" },
seed_diff = flowers_seed_diff,
light_min = 9,
depth_max = 2,
random_facedir = {0,3}
})
biome_lib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:water_source"},
avoid_nodes = {"group:flower", "group:flora"},
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:dirt_with_grass"},
facedir = 1
})
biome_lib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:dirt_with_grass"},
avoid_nodes = {"group:flower", "group:flora" },
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:water_source"},
ncount = 1,
facedir = 1
})
biome_lib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:stone"},
avoid_nodes = {"group:flower", "group:flora" },
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:water_source"},
ncount = 6,
facedir = 1
})
biome_lib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:sunflower"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:dirt_with_grass"},
avoid_nodes = {"group:flower", "flowers:sunflower"},
seed_diff = flowers_seed_diff,
light_min = 11,
light_max = 14,
min_elevation = 0,
plantlife_limit = -0.9,
temp_max = 0.53,
random_facedir = {0,3},
avoid_radius = 5
})
-- Cotton plants are now provided by the default "farming" mod.
-- old cotton plants -> farming cotton stage 8
-- cotton wads -> string (can be crafted into wool blocks)
-- potted cotton plants -> potted white dandelions
minetest.register_alias("flowers:cotton_plant", "farming:cotton_8")
minetest.register_alias("flowers:flower_cotton", "farming:cotton_8")
minetest.register_alias("flowers:flower_cotton_pot", "flowers:potted_dandelion_white")
minetest.register_alias("flowers:potted_cotton_plant", "flowers:potted_dandelion_white")
minetest.register_alias("flowers:cotton", "farming:string")
minetest.register_alias("flowers:cotton_wad", "farming:string")
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")
print("[Flowers] Loaded.")

View File

@ -1,3 +0,0 @@
minetest.register_alias("junglegrass:shortest", "air")
minetest.register_alias("junglegrass:short", "air")
minetest.register_alias("junglegrass:medium", "air")

View File

@ -1 +0,0 @@
name = junglegrass

1
modpack.conf Normal file
View File

@ -0,0 +1 @@
min_minetest_version = 5.2.0

View File

@ -1,14 +1,13 @@
-----------------------------------------------------------------------------------------------
local title = "Mole Hills"
local version = "0.0.3"
local mname = "molehills"
-----------------------------------------------------------------------------------------------
-- Idea by Sokomine
-- Code & textures by Mossmanikin
abstract_molehills = {}
dofile(minetest.get_modpath("molehills").."/molehills_settings.txt")
local molehills_rarity = tonumber(minetest.settings:get("molehills_rarity")) or 99.5
local molehills_rarity_fertility = tonumber(minetest.settings:get("molehills_rarity_fertility")) or 1
local molehills_fertility = tonumber(minetest.settings:get("molehills_fertility")) or -0.6
-- support for i18n
local S = minetest.get_translator("molehills")
@ -27,6 +26,7 @@ minetest.register_node("molehills:molehill",{
description = S("Mole Hill"),
inventory_image = "molehills_side.png",
tiles = { "molehills_dirt.png" },
use_texture_alpha = "clip",
paramtype = "light",
selection_box = mh_cbox,
collision_box = mh_cbox,
@ -49,11 +49,11 @@ minetest.register_craft({ -- molehills --> dirt
-- GeNeRaTiNG
-----------------------------------------------------------------------------------------------
abstract_molehills.place_molehill = function(pos)
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z-1}).name ~= "air"
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z-1}).name ~= "air"
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z+1}).name ~= "air"
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z-1}).name ~= "air"
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z+1}).name ~= "air"
@ -62,19 +62,14 @@ abstract_molehills.place_molehill = function(pos)
end
end
biome_lib:register_generate_plant({
surface = {"default:dirt_with_grass"},
max_count = Molehills_Max_Count,
rarity = Molehills_Rarity,
min_elevation = 1,
max_elevation = 40,
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
avoid_radius = 4,
plantlife_limit = -0.3,
},
abstract_molehills.place_molehill
pl.register_on_generate({
surface = {"default:dirt_with_grass"},
noise_params = pl.generate_noise_params({rarity = molehills_rarity, rarity_fertility = molehills_rarity_fertility}),
min_elevation = 1,
max_elevation = 40,
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"},
avoid_radius = 4,
},
"molehills:molehills",
abstract_molehills.place_molehill
)
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."]".."Loaded...")
-----------------------------------------------------------------------------------------------

View File

@ -0,0 +1,9 @@
# textdomain: molehills
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# reusityback, 2022.
#
Mole Hill=Maulwurfshügel

View File

@ -0,0 +1,9 @@
# textdomain: molehills
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Mole Hill=Talpa Monteto

View File

@ -1,6 +0,0 @@
-- Settings for generation of stuff (at map-generation time)
Molehills_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes
Molehills_Rarity = 95 -- larger values make molehills more rare (100 means chance of 0 %)

View File

@ -0,0 +1,8 @@
#Molehills rarity %
molehills_rarity (Molehills rarity %) float 99.5 0 100
#How much the rarity is reduced by fertility %
molehills_rarity_fertility (Molehills rarity fertility reduction %) float 1 0 100
#Molehills minimum fertility (-1 to +1)
molehills_fertility (Molehills minimum fertility) float -0.6 -1 1

View File

@ -0,0 +1,10 @@
# textdomain: nature_classic
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# reusityback, 2022.
#
Apple blossoms=Apfelblüten
[Nature Classic] loaded!=[Nature Classic] geladen!

View File

@ -0,0 +1,10 @@
# textdomain: nature_classic
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Apple blossoms=Poma Floroj
[Nature Classic] loaded!=[Nature Classic] ŝarĝita!

169
pl_seaweed/init.lua Normal file
View File

@ -0,0 +1,169 @@
-- support for i18n
local S = minetest.get_translator("pl_seaweed")
pl_seaweed = {}
local seaweed_max_count = tonumber(minetest.settings:get("pl_seaweed_max_count")) or 320
local seaweed_rarity = tonumber(minetest.settings:get("pl_seaweed_rarity")) or 33
local algae_list = { {nil}, {2}, {3}, {4} }
for i in ipairs(algae_list) do
local num = ""
local algae_groups = {snappy = 3,flammable=2,flower=1}
if algae_list[i][1] ~= nil then
num = "_"..algae_list[i][1]
algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:seaweed"..num, {
description = S("Seaweed"),
drawtype = "nodebox",
tiles = {
"flowers_seaweed"..num..".png",
"flowers_seaweed"..num..".png^[transformFY"
},
use_texture_alpha = "clip",
inventory_image = "flowers_seaweed_2.png",
wield_image = "flowers_seaweed_2.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = algae_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
liquids_pointable = true,
drop = "flowers:seaweed",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if pl.get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and pl.get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif pl.get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if not place_pos then return end -- something went wrong :P
if not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- :D
if not keys["sneak"] then
--local node = minetest.get_node(pt.under)
local seaweed = math.random(1,4)
if seaweed == 1 then
nodename = "flowers:seaweed"
elseif seaweed == 2 then
nodename = "flowers:seaweed_2"
elseif seaweed == 3 then
nodename = "flowers:seaweed_3"
elseif seaweed == 4 then
nodename = "flowers:seaweed_4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
end
if not pl.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
pl_seaweed.grow_seaweed = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local seaweed = math.random(1,4)
local node_name = "flowers:seaweed"
if seaweed > 1 then
node_name = node_name .. "_" .. seaweed
end
minetest.swap_node(right_here, {name=node_name, param2=math.random(1,3)})
end
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
pl_seaweed.grow_seaweed
)
-- pl_seaweed at beaches
-- MM: not satisfied with it, but IMHO some beaches should have some algae
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:sand"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
pl_seaweed.grow_seaweed
)
biome_lib.register_on_generate({
surface = {"default:sand"},
max_count = seaweed_max_count*2,
rarity = seaweed_rarity/2,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:water_source"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
pl_seaweed.grow_seaweed
)
minetest.register_alias( "flowers:flower_seaweed" , "flowers:seaweed" )
minetest.register_alias( "along_shore:pondscum_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_2" , "flowers:seaweed_2" )
minetest.register_alias( "along_shore:seaweed_3" , "flowers:seaweed_3" )
minetest.register_alias( "along_shore:seaweed_4" , "flowers:seaweed_4" )

View File

@ -0,0 +1,11 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Xanthin, 2017.
#
Seaweed=Seetang

View File

@ -0,0 +1,10 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# fat115 <fat115@framasoft.org>, 2017.
#
Seaweed=Algues

View File

@ -0,0 +1,10 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# mahmutelmas06@hotmail.com, 2017.
#
Seaweed=Deniz yosunu

View File

@ -0,0 +1,11 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Seaweed=Algo

View File

@ -0,0 +1,10 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Carlos Barraza <carlosbarrazaes@gmail.com>, 2017.
#
Seaweed=Algas marinas

View File

@ -0,0 +1,11 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
Seaweed=

View File

@ -1,3 +1,3 @@
name = flowers_plus
name = pl_seaweed
depends = biome_lib
optional_depends = farming, flowers

View File

@ -0,0 +1,5 @@
#Seaweed maximum count
pl_seaweed_max_count (Seaweed maximum count) int 320 1 1000
#Seaweed rarity
pl_seaweed_rarity (Seaweed rarity) int 33 0 100

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 222 B

View File

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

View File

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

View File

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

56
pl_sunflowers/init.lua Normal file
View File

@ -0,0 +1,56 @@
-- support for i18n
local S = minetest.get_translator("pl_sunflowers")
local sunflowers_max_count = tonumber(minetest.settings:get("pl_sunflowers_max_count")) or 10
local sunflowers_rarity = tonumber(minetest.settings:get("pl_sunflowers_rarity")) or 25
local box = {
type="fixed",
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
}
local sunflower_drop = "farming:seed_wheat"
if minetest.registered_items["farming:seed_spelt"] then
sunflower_drop = "farming:seed_spelt"
end
minetest.register_node(":flowers:sunflower", {
description = S("Sunflower"),
drawtype = "mesh",
paramtype = "light",
paramtype2 = "facedir",
inventory_image = "flowers_sunflower_inv.png",
mesh = "flowers_sunflower.obj",
tiles = { "flowers_sunflower.png" },
use_texture_alpha = "clip",
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = { dig_immediate=3, flora=1, flammable=3, attached_node=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = box,
collision_box = box,
drop = {
max_items = 1,
items = {
{items = {sunflower_drop}, rarity = 8},
{items = {"flowers:sunflower"}},
}
}
})
biome_lib.register_on_generate({
surface = {"default:dirt_with_grass"},
avoid_nodes = { "flowers:sunflower" },
max_count = sunflowers_max_count,
rarity = sunflowers_rarity,
min_elevation = 0,
plantlife_limit = -0.9,
temp_max = -0.1,
random_facedir = {0,3},
},
"flowers:sunflower"
)
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")

View File

@ -1,4 +1,4 @@
# textdomain: flowers_plus
# textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -8,6 +8,4 @@
Waterlily=Seerose
Seaweed=Seetang
Sunflower=Sonnenblume

View File

@ -0,0 +1,11 @@
# textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Sunflower=Sunfloro

View File

@ -0,0 +1,10 @@
# textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Carlos Barraza <carlosbarrazaes@gmail.com>, 2017.
#
Sunflower=Girasol

View File

@ -1,4 +1,4 @@
# textdomain: flowers_plus
# textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -7,6 +7,4 @@
#
Waterlily=Nénuphar
Seaweed=Algues
Sunflower=Tournesol

View File

@ -1,4 +1,4 @@
# textdomain: flowers_plus
# textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -7,6 +7,4 @@
#
Waterlily=Nilüfer
Seaweed=Deniz yosunu
Sunflower=Ayçiçeği

View File

@ -1,4 +1,4 @@
# textdomain: flowers_plus
# textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -8,6 +8,4 @@
Waterlily=
Seaweed=
Sunflower=

3
pl_sunflowers/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = pl_sunflowers
depends = biome_lib
optional_depends = farming, flowers

View File

@ -0,0 +1,5 @@
#Sunflowers maximum count
pl_sunflowers_max_count (Sunflowers maximum count) int 10 1 1000
#Sunflowers rarity
pl_sunflowers_rarity (Sunflowers rarity) int 25 0 100

View File

Before

Width:  |  Height:  |  Size: 811 B

After

Width:  |  Height:  |  Size: 811 B

View File

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

165
pl_waterlilies/init.lua Normal file
View File

@ -0,0 +1,165 @@
-- support for i18n
local S = minetest.get_translator("pl_waterlilies")
pl_waterlilies = {}
local lilies_max_count = tonumber(minetest.settings:get("pl_waterlilies_max_count")) or 320
local lilies_rarity = tonumber(minetest.settings:get("pl_waterlilies_rarity")) or 33
local lilies_list = {
{ nil , nil , 1 },
{ "225", "22.5" , 2 },
{ "45" , "45" , 3 },
{ "675", "67.5" , 4 },
{ "s1" , "small_1" , 5 },
{ "s2" , "small_2" , 6 },
{ "s3" , "small_3" , 7 },
{ "s4" , "small_4" , 8 },
}
for i in ipairs(lilies_list) do
local deg1 = ""
local deg2 = ""
local lily_groups = {snappy = 3,flammable=2,flower=1}
if lilies_list[i][1] ~= nil then
deg1 = "_"..lilies_list[i][1]
deg2 = "_"..lilies_list[i][2]
lily_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:waterlily"..deg1, {
description = S("Waterlily"),
drawtype = "nodebox",
tiles = {
"flowers_waterlily"..deg2..".png",
"flowers_waterlily"..deg2..".png^[transformFY"
},
use_texture_alpha = "clip",
inventory_image = "flowers_waterlily.png",
wield_image = "flowers_waterlily.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = lily_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
node_placement_prediction = "",
liquids_pointable = true,
drop = "flowers:waterlily",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if place_pos and not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
if not keys["sneak"] then
local node = minetest.get_node(pt.under)
local waterlily = math.random(1,8)
if waterlily == 1 then
nodename = "flowers:waterlily"
elseif waterlily == 2 then
nodename = "flowers:waterlily_225"
elseif waterlily == 3 then
nodename = "flowers:waterlily_45"
elseif waterlily == 4 then
nodename = "flowers:waterlily_675"
elseif waterlily == 5 then
nodename = "flowers:waterlily_s1"
elseif waterlily == 6 then
nodename = "flowers:waterlily_s2"
elseif waterlily == 7 then
nodename = "flowers:waterlily_s3"
elseif waterlily == 8 then
nodename = "flowers:waterlily_s4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:waterlily", param2 = fdir})
end
if not biome_lib.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
pl_waterlilies.grow_waterlily = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
for i in ipairs(lilies_list) do
local chance = math.random(1,8)
local ext = ""
local num = lilies_list[i][3]
if lilies_list[i][1] ~= nil then
ext = "_"..lilies_list[i][1]
end
if chance == num then
minetest.swap_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
end
end
end
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = lilies_max_count,
rarity = lilies_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
temp_max = -0.22,
temp_min = 0.22,
},
pl_waterlilies.grow_waterlily
)
minetest.register_alias( "flowers:flower_waterlily", "flowers:waterlily")
minetest.register_alias( "flowers:flower_waterlily_225", "flowers:waterlily_225")
minetest.register_alias( "flowers:flower_waterlily_45", "flowers:waterlily_45")
minetest.register_alias( "flowers:flower_waterlily_675", "flowers:waterlily_675")
minetest.register_alias( "trunks:lilypad" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_1" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_2" , "flowers:waterlily_s2" )
minetest.register_alias( "along_shore:lilypads_3" , "flowers:waterlily_s3" )
minetest.register_alias( "along_shore:lilypads_4" , "flowers:waterlily_s4" )

View File

@ -0,0 +1,11 @@
# textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Xanthin, 2017.
#
Waterlily=Seerose

View File

@ -0,0 +1,11 @@
# textdomain: pl_waterlillies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jolesh, 2022.
#
Waterlily=Akvolilio

View File

@ -1,4 +1,4 @@
# textdomain: flowers_plus
# textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -8,5 +8,3 @@
Waterlily=Lirio de agua
Seaweed=Algas marinas
Sunflower=Girasol

View File

@ -0,0 +1,10 @@
# textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# fat115 <fat115@framasoft.org>, 2017.
#
Waterlily=Nénuphar

View File

@ -0,0 +1,10 @@
# textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# mahmutelmas06@hotmail.com, 2017.
#
Waterlily=Nilüfer

View File

@ -0,0 +1,11 @@
# textdomain: pl_waterlillies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
Waterlily=

Some files were not shown because too many files have changed in this diff Show More