diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 20:02:19 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 21:09:33 -0400 |
commit | da66780a569712c23ae4f2996cfb4608a9f9d69d (patch) | |
tree | 217556029a78bc23ad4564720afc86de97228a04 /plantlife_modpack | |
parent | 615b22df4d423aded3613db7716943a2f389b047 (diff) | |
download | dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.gz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.bz2 dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.xz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.zip |
copy all standard Dreambuilder mods in from the old subgame
(exactly as last supplied there, updates to these mods will follow later)
Diffstat (limited to 'plantlife_modpack')
385 files changed, 8966 insertions, 0 deletions
diff --git a/plantlife_modpack/3dmushrooms/depends.txt b/plantlife_modpack/3dmushrooms/depends.txt new file mode 100644 index 0000000..abb01ae --- /dev/null +++ b/plantlife_modpack/3dmushrooms/depends.txt @@ -0,0 +1,2 @@ +default +flowers diff --git a/plantlife_modpack/3dmushrooms/init.lua b/plantlife_modpack/3dmushrooms/init.lua new file mode 100644 index 0000000..369da9c --- /dev/null +++ b/plantlife_modpack/3dmushrooms/init.lua @@ -0,0 +1,68 @@ + +-- 3D Mushroom mod by VanessaE +-- +-- License: WTFPL for everything. + +mushroom = {} + +minetest.override_item("flowers:mushroom_fertile_brown", { + drawtype = "mesh", + mesh = "3dmushrooms.obj", + tiles = {"3dmushrooms_brown.png"}, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3} + }, + inventory_image = "3dmushrooms_brown_inv.png" +}) + +minetest.override_item("flowers:mushroom_brown", { + drawtype = "mesh", + mesh = "3dmushrooms.obj", + tiles = {"3dmushrooms_brown.png"}, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3} + }, + inventory_image = "3dmushrooms_brown_inv.png" +}) + +minetest.override_item("flowers:mushroom_fertile_red", { + drawtype = "mesh", + mesh = "3dmushrooms.obj", + tiles = {"3dmushrooms_red.png"}, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3} + }, + inventory_image = "3dmushrooms_red_inv.png" +}) + +minetest.override_item("flowers:mushroom_red", { + drawtype = "mesh", + mesh = "3dmushrooms.obj", + tiles = {"3dmushrooms_red.png"}, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3} + }, + inventory_image = "3dmushrooms_red_inv.png" +}) + +-- aliases to the default mushrooms + +minetest.register_alias("mushroom:brown", "flowers:mushroom_brown") +minetest.register_alias("mushroom:brown_natural", "flowers:mushroom_fertile_brown") +minetest.register_alias("mushroom:spore_brown", "flowers:mushroom_spores_brown") +minetest.register_alias("mushroom:spore2", "flowers:mushroom_spores_brown") +minetest.register_alias("mushroom:brown_essence", "flowers:mushroom_brown") + +minetest.register_alias("mushroom:red", "flowers:mushroom_red") +minetest.register_alias("mushroom:red_natural", "flowers:mushroom_fertile_red") +minetest.register_alias("mushroom:spore_red", "flowers:mushroom_spores_red") +minetest.register_alias("mushroom:spore1", "flowers:mushroom_spores_red") +minetest.register_alias("mushroom:poison", "flowers:mushroom_red") + +minetest.register_alias("mushroom:identifier", "default:mese_crystal_fragment") + +print("[3D Mushrooms] loaded.") diff --git a/plantlife_modpack/3dmushrooms/models/3dmushrooms.obj b/plantlife_modpack/3dmushrooms/models/3dmushrooms.obj new file mode 100644 index 0000000..bce1ed6 --- /dev/null +++ b/plantlife_modpack/3dmushrooms/models/3dmushrooms.obj @@ -0,0 +1,329 @@ +# Blender v2.73 (sub 0) OBJ File: 'plantlife_mushroom.blend' +# www.blender.org +o Cylinder +v 0.261489 -0.177877 -0.000000 +v 0.165972 -0.203714 -0.000000 +v 0.210761 -0.224729 -0.000000 +v 0.258520 -0.211811 -0.000000 +v 0.185335 -0.171215 -0.184553 +v 0.116925 -0.199423 -0.118862 +v 0.148161 -0.219252 -0.151707 +v 0.182366 -0.205148 -0.184553 +v 0.001484 -0.155130 -0.260997 +v -0.001484 -0.189063 -0.168096 +v -0.002969 -0.206030 -0.214547 +v -0.001484 -0.189063 -0.260997 +v -0.182366 -0.139045 -0.184553 +v -0.119894 -0.178704 -0.118862 +v -0.154099 -0.192808 -0.151707 +v -0.185335 -0.172979 -0.184553 +v -0.258520 -0.132382 -0.000000 +v -0.168941 -0.174413 -0.000000 +v -0.216699 -0.187331 -0.000000 +v -0.261489 -0.166316 -0.000000 +v -0.182366 -0.139045 0.184553 +v -0.119894 -0.178704 0.118862 +v -0.154099 -0.192808 0.151707 +v -0.185335 -0.172979 0.184553 +v 0.001484 -0.155130 0.260997 +v -0.001484 -0.189063 0.168096 +v -0.002969 -0.206030 0.214547 +v -0.001484 -0.189063 0.260997 +v 0.185335 -0.171215 0.184553 +v 0.116925 -0.199423 0.118862 +v 0.148161 -0.219252 0.151708 +v 0.182366 -0.205148 0.184553 +v 0.059333 -0.075538 0.000000 +v 0.044915 -0.074277 -0.034942 +v 0.010106 -0.071232 -0.049416 +v -0.024704 -0.068186 -0.034942 +v -0.039122 -0.066925 0.000000 +v -0.024704 -0.068186 0.034942 +v 0.010106 -0.071232 0.049416 +v 0.044915 -0.074277 0.034942 +v 0.004580 -0.119744 -0.206430 +v 0.149993 -0.132466 -0.145968 +v 0.004580 -0.119744 0.206430 +v -0.140833 -0.107022 0.145968 +v 0.210225 -0.137736 -0.000000 +v 0.149993 -0.132466 0.145968 +v -0.201064 -0.101752 -0.000000 +v -0.140833 -0.107022 -0.145968 +v 0.033054 -0.500000 -0.079800 +v 0.025067 -0.177627 -0.060518 +v 0.079800 -0.500000 -0.033054 +v 0.060518 -0.177627 -0.025067 +v 0.079800 -0.500000 0.033054 +v 0.060518 -0.177627 0.025067 +v 0.033054 -0.500000 0.079800 +v 0.025067 -0.177627 0.060518 +v -0.033054 -0.500000 0.079800 +v -0.025067 -0.177627 0.060518 +v -0.079800 -0.500000 0.033054 +v -0.060518 -0.177627 0.025067 +v -0.079800 -0.500000 -0.033054 +v -0.060518 -0.177627 -0.025067 +v -0.033054 -0.500000 -0.079800 +v -0.025067 -0.177627 -0.060518 +v 0.014323 -0.253674 -0.065067 +v 0.012105 -0.382623 -0.072780 +v 0.052438 -0.253674 -0.026952 +v 0.054739 -0.382623 -0.030146 +v 0.052438 -0.253674 0.026952 +v 0.054739 -0.382623 0.030146 +v 0.014323 -0.253674 0.065067 +v 0.012105 -0.382623 0.072780 +v -0.039580 -0.253674 0.065067 +v -0.048187 -0.382623 0.072780 +v -0.077695 -0.253674 0.026952 +v -0.090820 -0.382623 0.030146 +v -0.077695 -0.253674 -0.026952 +v -0.090820 -0.382623 -0.030146 +v -0.039580 -0.253674 -0.065067 +v -0.048187 -0.382623 -0.072780 +vt 0.261010 0.917920 +vt 0.235559 0.983636 +vt 0.016350 0.764426 +vt 0.080814 0.737724 +vt 0.545568 0.235207 +vt 0.764778 0.454417 +vt 0.690996 0.484978 +vt 0.517617 0.311599 +vt 0.235559 0.235207 +vt 0.515845 0.302693 +vt 0.261010 0.302693 +vt 0.578125 0.234375 +vt 0.765625 0.234375 +vt 0.765625 0.312500 +vt 0.578125 0.312500 +vt 0.015625 0.234375 +vt 0.203125 0.234375 +vt 0.203125 0.312500 +vt 0.015625 0.312500 +vt 0.390625 0.312500 +vt 0.578125 0.390625 +vt 0.390625 0.390625 +vt 0.016350 0.454417 +vt 0.080814 0.482889 +vt 0.545569 0.983636 +vt 0.515845 0.917920 +vt 0.099043 0.730173 +vt 0.272422 0.903553 +vt 0.290733 0.368408 +vt 0.490395 0.368408 +vt 0.149550 0.709253 +vt 0.149550 0.509591 +vt 0.764778 0.764426 +vt 0.696041 0.737725 +vt 0.696041 0.482889 +vt 0.099043 0.484978 +vt 0.203125 0.390625 +vt 0.765625 0.390625 +vt 0.272422 0.311599 +vt 0.631577 0.509591 +vt 0.390625 0.234375 +vt 0.517617 0.903553 +vt 0.690996 0.730173 +vt 0.432320 0.675133 +vt 0.473823 0.633629 +vt 0.015625 0.390625 +vt 0.490395 0.850435 +vt 0.290733 0.850435 +vt 0.631577 0.709253 +vt 0.373624 0.533431 +vt 0.332121 0.574934 +vt 0.473823 0.574934 +vt 0.432320 0.533431 +vt 0.332121 0.633630 +vt 0.373624 0.675133 +vt 0.935126 0.767633 +vt 0.998032 0.830539 +vt 0.998032 0.919502 +vt 0.935126 0.982408 +vt 0.846164 0.982408 +vt 0.783257 0.919502 +vt 0.783258 0.830539 +vt 0.846164 0.767633 +vt 0.375000 0.187500 +vt 0.375000 0.031250 +vt 0.500000 0.031250 +vt 0.500000 0.187500 +vt 0.625000 0.031250 +vt 0.625000 0.187500 +vt 0.750000 0.031250 +vt 0.750000 0.187500 +vt 0.875000 0.031250 +vt 0.875000 0.187500 +vt 1.000000 0.031250 +vt 1.000000 0.187500 +vt 0.000000 0.031250 +vt 0.125000 0.031250 +vt 0.125000 0.187500 +vt 0.000000 0.187500 +vt 0.250000 0.031250 +vt 0.250000 0.187500 +vt 0.542224 0.015885 +vt 0.601585 0.075246 +vt 0.601585 0.159195 +vt 0.542224 0.218556 +vt 0.458275 0.218556 +vt 0.398914 0.159195 +vt 0.398914 0.075246 +vt 0.458275 0.015885 +vt 0.625000 0.125000 +vt 0.500000 0.125000 +vt 0.750000 0.125000 +vt 0.875000 0.125000 +vt 1.000000 0.125000 +vt 0.125000 0.125000 +vt 0.000000 0.125000 +vt 0.250000 0.125000 +vt 0.375000 0.125000 +vn -0.147000 -0.987300 0.060400 +vn -0.648700 -0.460200 0.606100 +vn -0.898800 -0.438400 0.000000 +vn -0.172000 -0.985100 0.000000 +vn 0.672500 0.376500 0.637100 +vn 0.935400 0.353500 0.000000 +vn 0.529200 0.848500 0.000000 +vn 0.396700 0.860200 0.320400 +vn -0.044900 -0.513100 -0.857100 +vn 0.558900 -0.565900 -0.606100 +vn -0.026600 -0.997800 -0.060400 +vn -0.086800 -0.992500 -0.085500 +vn -0.044900 -0.513100 0.857100 +vn 0.037800 0.432000 0.901100 +vn -0.596900 0.487600 0.637100 +vn -0.648700 -0.460200 -0.606100 +vn -0.596900 0.487600 -0.637100 +vn 0.037800 0.432000 -0.901100 +vn 0.809000 -0.587800 0.000000 +vn 0.672500 0.376500 -0.637100 +vn -0.147000 -0.987300 -0.060400 +vn -0.086800 -0.992500 0.085500 +vn -0.859800 0.510500 0.000000 +vn -0.372100 0.928200 0.000000 +vn -0.240600 0.916500 -0.319400 +vn -0.085100 -0.972600 0.216400 +vn -0.237500 -0.959200 0.153000 +vn 0.130500 -0.991400 0.000000 +vn 0.067400 -0.985900 0.153000 +vn 0.558900 -0.565900 0.606100 +vn -0.026600 -0.997800 0.060400 +vn -0.001700 -1.000000 0.000000 +vn -0.240600 0.916500 0.319400 +vn 0.077500 0.888400 0.452400 +vn -0.300700 -0.953700 0.000000 +vn 0.077500 0.888400 -0.452400 +vn 0.396700 0.860200 -0.320400 +vn 0.086200 0.978700 -0.186300 +vn 0.217800 0.967000 -0.132200 +vn -0.085100 -0.972600 -0.216400 +vn 0.067400 -0.985900 -0.153000 +vn -0.237500 -0.959200 -0.153000 +vn 0.086200 0.978700 0.186300 +vn -0.044600 0.990300 0.131300 +vn 0.272600 0.962100 0.000000 +vn 0.217800 0.967000 0.132200 +vn -0.098600 0.995100 0.000000 +vn -0.044600 0.990300 -0.131300 +vn -0.273500 -0.626100 -0.730200 +vn -0.402500 0.040600 -0.914500 +vn 0.360300 0.084000 -0.929000 +vn 0.335600 -0.581700 -0.740900 +vn 0.369900 0.027700 -0.928600 +vn 0.921100 -0.031200 -0.388000 +vn 0.913800 0.116800 -0.388800 +vn 0.921100 -0.031200 0.388000 +vn 0.913800 0.116800 0.388800 +vn 0.369900 0.027700 0.928600 +vn 0.360300 0.084000 0.929000 +vn -0.391600 0.105700 0.914000 +vn -0.402500 0.040600 0.914500 +vn -0.914200 0.156600 0.373800 +vn -0.927200 0.012400 0.374500 +vn -0.914200 0.156600 -0.373800 +vn -0.927200 0.012400 -0.374500 +vn -0.391600 0.105700 -0.914000 +vn 0.774400 -0.552100 -0.309000 +vn 0.774400 -0.552100 0.309000 +vn 0.335600 -0.581700 0.740900 +vn -0.273500 -0.626100 0.730200 +vn -0.690800 -0.658600 0.298100 +vn -0.690800 -0.658600 -0.298100 +vn 0.416700 -0.004500 -0.909100 +vn 0.925800 -0.089300 -0.367400 +vn 0.925800 -0.089300 0.367400 +vn 0.416700 -0.004500 0.909100 +vn -0.344300 0.121400 0.931000 +vn -0.896600 0.212200 0.388700 +vn -0.896600 0.212200 -0.388700 +vn -0.344300 0.121400 -0.931000 +s 1 +f 23/1/1 24/2/2 20/3/3 19/4/4 +f 29/5/5 1/6/6 45/7/7 46/8/8 +f 12/9/9 8/5/10 7/10/11 11/11/12 +f 24/12/2 28/13/13 25/14/14 21/15/15 +f 12/16/9 16/17/16 13/18/17 9/19/18 +f 4/20/19 8/15/10 5/21/20 1/22/6 +f 16/23/16 12/9/9 11/11/12 15/24/21 +f 28/25/13 24/2/2 23/1/1 27/26/22 +f 13/2/17 17/3/23 47/27/24 48/28/25 +f 10/29/26 11/11/12 7/10/11 6/30/27 +f 18/31/28 19/4/4 15/24/21 14/32/29 +f 4/6/19 32/33/30 31/34/31 3/35/32 +f 17/3/23 21/23/15 44/36/33 47/27/24 +f 32/18/30 4/20/19 1/22/6 29/37/5 +f 8/5/10 4/6/19 3/35/32 7/10/11 +f 8/15/10 12/14/9 9/38/18 5/21/20 +f 25/9/14 29/5/5 46/8/8 43/39/34 +f 6/30/27 7/10/11 3/35/32 2/40/35 +f 16/17/16 20/41/3 17/20/23 13/18/17 +f 31/34/31 32/33/30 28/25/13 27/26/22 +f 5/33/20 9/25/18 41/42/36 42/43/37 +f 41/42/36 35/44/38 34/45/39 42/43/37 +f 15/24/21 11/11/12 10/29/26 14/32/29 +f 20/41/3 24/12/2 21/15/15 17/20/23 +f 1/6/6 5/33/20 42/43/37 45/7/7 +f 19/4/4 20/3/3 16/23/16 15/24/21 +f 28/19/13 32/18/30 29/37/5 25/46/14 +f 26/47/40 27/26/22 23/1/1 22/48/41 +f 21/23/15 25/9/14 43/39/34 44/36/33 +f 9/25/18 13/2/17 48/28/25 41/42/36 +f 23/1/1 19/4/4 18/31/28 22/48/41 +f 2/40/35 3/35/32 31/34/31 30/49/42 +f 43/39/34 39/50/43 38/51/44 44/36/33 +f 45/7/7 33/52/45 40/53/46 46/8/8 +f 42/43/37 34/45/39 33/52/45 45/7/7 +f 46/8/8 40/53/46 39/50/43 43/39/34 +f 44/36/33 38/51/44 37/54/47 47/27/24 +f 47/27/24 37/54/47 36/55/48 48/28/25 +f 48/28/25 36/55/48 35/44/38 41/42/36 +f 35/44/38 36/55/48 37/54/47 38/51/44 39/50/43 40/53/46 33/52/45 34/45/39 +f 6/56/27 2/57/35 30/58/42 26/59/40 22/60/41 18/61/28 14/62/29 10/63/26 +f 63/64/49 80/65/50 66/66/51 49/67/52 +f 65/66/53 67/68/54 68/69/55 66/67/51 +f 67/68/54 69/70/56 70/71/57 68/69/55 +f 69/70/56 71/72/58 72/73/59 70/71/57 +f 71/72/58 73/74/60 74/75/61 72/73/59 +f 73/76/60 75/77/62 76/78/63 74/79/61 +f 75/77/62 77/80/64 78/81/65 76/78/63 +f 77/80/64 79/65/66 80/64/50 78/81/65 +f 49/82/52 51/83/67 53/84/68 55/85/69 57/86/70 59/87/71 61/88/72 63/89/49 +f 50/66/73 52/68/74 67/90/54 65/91/53 +f 52/68/74 54/70/75 69/92/56 67/90/54 +f 66/66/51 68/68/55 51/69/67 49/67/52 +f 54/70/75 56/72/76 71/93/58 69/92/56 +f 68/68/55 70/70/57 53/71/68 51/69/67 +f 56/72/76 58/74/77 73/94/60 71/93/58 +f 70/70/57 72/72/59 55/73/69 53/71/68 +f 58/76/77 60/77/78 75/95/62 73/96/60 +f 72/72/59 74/74/61 57/75/70 55/73/69 +f 60/77/78 62/80/79 77/97/64 75/95/62 +f 74/76/61 76/77/63 59/78/71 57/79/70 +f 62/80/79 64/65/80 79/98/66 77/97/64 +f 76/77/63 78/80/65 61/81/72 59/78/71 +f 31/34/31 27/26/22 26/47/40 30/49/42 +f 78/80/65 80/65/50 63/64/49 61/81/72 +f 79/98/66 64/65/80 50/66/73 65/91/53 +f 79/65/66 65/66/53 66/67/51 80/64/50 diff --git a/plantlife_modpack/3dmushrooms/textures/3dmushrooms_brown.png b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_brown.png Binary files differnew file mode 100644 index 0000000..c36f524 --- /dev/null +++ b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_brown.png diff --git a/plantlife_modpack/3dmushrooms/textures/3dmushrooms_brown_inv.png b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_brown_inv.png Binary files differnew file mode 100644 index 0000000..c9a7b3c --- /dev/null +++ b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_brown_inv.png diff --git a/plantlife_modpack/3dmushrooms/textures/3dmushrooms_red.png b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_red.png Binary files differnew file mode 100644 index 0000000..dc80e32 --- /dev/null +++ b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_red.png diff --git a/plantlife_modpack/3dmushrooms/textures/3dmushrooms_red_inv.png b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_red_inv.png Binary files differnew file mode 100644 index 0000000..796f867 --- /dev/null +++ b/plantlife_modpack/3dmushrooms/textures/3dmushrooms_red_inv.png diff --git a/plantlife_modpack/LICENSE b/plantlife_modpack/LICENSE new file mode 100644 index 0000000..594ea2a --- /dev/null +++ b/plantlife_modpack/LICENSE @@ -0,0 +1,336 @@ +Sunflower model and textures by kaeza (CC-BY-SA 3.0). + +For the code, Ironzorg's textures, and everything else: WTFPL + +For Mossmanikin's mods (Ferns, Dryplans, and the components +from the Undergrowth modpack), and all of my own textures: +CC-By-SA 3.0 + +---------- + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + + This license is also known as "WTFPL" + +----------- + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS +CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS +PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE +WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW +IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND +AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS +LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS +YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE +OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + "Collective Work" means a work, such as a periodical issue, +anthology or encyclopedia, in which the Work in its entirety in +unmodified form, along with one or more other contributions, +constituting separate and independent works in themselves, are +assembled into a collective whole. A work that constitutes a +Collective Work will not be considered a Derivative Work (as +defined below) for the purposes of this License. + "Creative Commons Compatible License" means a license that is +listed at http://creativecommons.org/compatiblelicenses that has +been approved by Creative Commons as being essentially equivalent +to this License, including, at a minimum, because that license: +(i) contains terms that have the same purpose, meaning and effect +as the License Elements of this License; and, (ii) explicitly +permits the relicensing of derivatives of works made available +under that license under this License or either a Creative Commons +unported license or a Creative Commons jurisdiction license with +the same License Elements as this License. + "Derivative Work" means a work based upon the Work or upon the +Work and other pre-existing works, such as a translation, musical +arrangement, dramatization, fictionalization, motion picture +version, sound recording, art reproduction, abridgment, +condensation, or any other form in which the Work may be recast, +transformed, or adapted, except that a work that constitutes a +Collective Work will not be considered a Derivative Work for the +purpose of this License. For the avoidance of doubt, where the +Work is a musical composition or sound recording, the +synchronization of the Work in timed-relation with a moving image +("synching") will be considered a Derivative Work for the purpose +of this License. + "License Elements" means the following high-level license +attributes as selected by Licensor and indicated in the title of +this License: Attribution, ShareAlike. + "Licensor" means the individual, individuals, entity or +entities that offers the Work under the terms of this License. + "Original Author" means the individual, individuals, entity or +entities who created the Work. + "Work" means the copyrightable work of authorship offered +under the terms of this License. + "You" means an individual or entity exercising rights under +this License who has not previously violated the terms of this +License with respect to the Work, or who has received express +permission from the Licensor to exercise rights under this License +despite a previous violation. + +2. Fair Use Rights. Nothing in this license is intended to reduce, +limit, or restrict any rights arising from fair use, first sale or +other limitations on the exclusive rights of the copyright owner +under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this +License, Licensor hereby grants You a worldwide, royalty-free, +non-exclusive, perpetual (for the duration of the applicable +copyright) license to exercise the rights in the Work as stated +below: + + to reproduce the Work, to incorporate the Work into one or +more Collective Works, and to reproduce the Work as incorporated +in the Collective Works; + to create and reproduce Derivative Works provided that any +such Derivative Work, including any translation in any medium, +takes reasonable steps to clearly label, demarcate or otherwise +identify that changes were made to the original Work. For example, +a translation could be marked "The original work was translated +from English to Spanish," or a modification could indicate "The +original work has been modified."; + to distribute copies or phonorecords of, display publicly, +perform publicly, and perform publicly by means of a digital audio +transmission the Work including as incorporated in Collective +Works; + to distribute copies or phonorecords of, display publicly, +perform publicly, and perform publicly by means of a digital audio +transmission Derivative Works. + + For the avoidance of doubt, where the Work is a musical +composition: + Performance Royalties Under Blanket Licenses. Licensor +waives the exclusive right to collect, whether individually or, in +the event that Licensor is a member of a performance rights +society (e.g. ASCAP, BMI, SESAC), via that society, royalties for +the public performance or public digital performance (e.g. +webcast) of the Work. + Mechanical Rights and Statutory Royalties. Licensor waives +the exclusive right to collect, whether individually or via a +music rights agency or designated agent (e.g. Harry Fox Agency), +royalties for any phonorecord You create from the Work ("cover +version") and distribute, subject to the compulsory license +created by 17 USC Section 115 of the US Copyright Act (or the +equivalent in other jurisdictions). + Webcasting Rights and Statutory Royalties. For the avoidance +of doubt, where the Work is a sound recording, Licensor waives the +exclusive right to collect, whether individually or via a +performance-rights society (e.g. SoundExchange), royalties for the +public digital performance (e.g. webcast) of the Work, subject to +the compulsory license created by 17 USC Section 114 of the US +Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether +now known or hereafter devised. The above rights include the right +to make such modifications as are technically necessary to +exercise the rights in other media and formats. All rights not +expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is +expressly made subject to and limited by the following +restrictions: + + You may distribute, publicly display, publicly perform, or +publicly digitally perform the Work only under the terms of this +License, and You must include a copy of, or the Uniform Resource +Identifier for, this License with every copy or phonorecord of the +Work You distribute, publicly display, publicly perform, or +publicly digitally perform. You may not offer or impose any terms +on the Work that restrict the terms of this License or the ability +of a recipient of the Work to exercise of the rights granted to +that recipient under the terms of the License. You may not +sublicense the Work. You must keep intact all notices that refer +to this License and to the disclaimer of warranties. When You +distribute, publicly display, publicly perform, or publicly +digitally perform the Work, You may not impose any technological +measures on the Work that restrict the ability of a recipient of +the Work from You to exercise of the rights granted to that +recipient under the terms of the License. This Section 4(a) +applies to the Work as incorporated in a Collective Work, but this +does not require the Collective Work apart from the Work itself to +be made subject to the terms of this License. If You create a +Collective Work, upon notice from any Licensor You must, to the +extent practicable, remove from the Collective Work any credit as +required by Section 4(c), as requested. If You create a Derivative +Work, upon notice from any Licensor You must, to the extent +practicable, remove from the Derivative Work any credit as +required by Section 4(c), as requested. + You may distribute, publicly display, publicly perform, or +publicly digitally perform a Derivative Work only under: (i) the +terms of this License; (ii) a later version of this License with +the same License Elements as this License; (iii) either the +Creative Commons (Unported) license or a Creative Commons +jurisdiction license (either this or a later license version) that +contains the same License Elements as this License (e.g. +Attribution-ShareAlike 3.0 (Unported)); (iv) a Creative Commons +Compatible License. If you license the Derivative Work under one +of the licenses mentioned in (iv), you must comply with the terms +of that license. If you license the Derivative Work under the +terms of any of the licenses mentioned in (i), (ii) or (iii) (the +"Applicable License"), you must comply with the terms of the +Applicable License generally and with the following provisions: +(I) You must include a copy of, or the Uniform Resource Identifier +for, the Applicable License with every copy or phonorecord of each +Derivative Work You distribute, publicly display, publicly +perform, or publicly digitally perform; (II) You may not offer or +impose any terms on the Derivative Works that restrict the terms +of the Applicable License or the ability of a recipient of the +Work to exercise the rights granted to that recipient under the +terms of the Applicable License; (III) You must keep intact all +notices that refer to the Applicable License and to the disclaimer +of warranties; and, (IV) when You distribute, publicly display, +publicly perform, or publicly digitally perform the Work, You may +not impose any technological measures on the Derivative Work that +restrict the ability of a recipient of the Derivative Work from +You to exercise the rights granted to that recipient under the +terms of the Applicable License. This Section 4(b) applies to the +Derivative Work as incorporated in a Collective Work, but this +does not require the Collective Work apart from the Derivative +Work itself to be made subject to the terms of the Applicable +License. + If You distribute, publicly display, publicly perform, or +publicly digitally perform the Work (as defined in Section 1 +above) or any Derivative Works (as defined in Section 1 above) or +Collective Works (as defined in Section 1 above), You must, unless +a request has been made pursuant to Section 4(a), keep intact all +copyright notices for the Work and provide, reasonable to the +medium or means You are utilizing: (i) the name of the Original +Author (or pseudonym, if applicable) if supplied, and/or (ii) if +the Original Author and/or Licensor designate another party or +parties (e.g. a sponsor institute, publishing entity, journal) for +attribution ("Attribution Parties") in Licensor's copyright +notice, terms of service or by other reasonable means, the name of +such party or parties; the title of the Work if supplied; to the +extent reasonably practicable, the Uniform Resource Identifier, if +any, that Licensor specifies to be associated with the Work, +unless such URI does not refer to the copyright notice or +licensing information for the Work; and, consistent with Section +3(b) in the case of a Derivative Work, a credit identifying the +use of the Work in the Derivative Work (e.g., "French translation +of the Work by Original Author," or "Screenplay based on original +Work by Original Author"). The credit required by this Section +4(c) may be implemented in any reasonable manner; provided, +however, that in the case of a Derivative Work or Collective Work, +at a minimum such credit will appear, if a credit for all +contributing authors of the Derivative Work or Collective Work +appears, then as part of these credits and in a manner at least as +prominent as the credits for the other contributing authors. For +the avoidance of doubt, You may only use the credit required by +this Section for the purpose of attribution in the manner set out +above and, by exercising Your rights under this License, You may +not implicitly or explicitly assert or imply any connection with, +sponsorship or endorsement by the Original Author, Licensor and/or +Attribution Parties, as appropriate, of You or Your use of the +Work, without the separate, express prior written permission of +the Original Author, Licensor and/or Attribution Parties. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, +LICENSOR OFFERS THE WORK AS-IS AND ONLY TO THE EXTENT OF ANY +RIGHTS HELD IN THE LICENSED WORK BY THE LICENSOR. THE LICENSOR +MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE +WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT +LIMITATION, WARRANTIES OF TITLE, MARKETABILITY, MERCHANTIBILITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE +OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE +OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT +ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY +NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY +APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY +LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE +OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE +WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +7. Termination + + This License and the rights granted hereunder will terminate +automatically upon any breach by You of the terms of this License. +Individuals or entities who have received Derivative Works or +Collective Works from You under this License, however, will not +have their licenses terminated provided such individuals or +entities remain in full compliance with those licenses. Sections +1, 2, 5, 6, 7, and 8 will survive any termination of this License. + Subject to the above terms and conditions, the license granted +here is perpetual (for the duration of the applicable copyright in +the Work). Notwithstanding the above, Licensor reserves the right +to release the Work under different license terms or to stop +distributing the Work at any time; provided, however that any such +election will not serve to withdraw this License (or any other +license that has been, or is required to be, granted under the +terms of this License), and this License will continue in full +force and effect unless terminated as stated above. + +8. Miscellaneous + + Each time You distribute or publicly digitally perform the +Work (as defined in Section 1 above) or a Collective Work (as +defined in Section 1 above), the Licensor offers to the recipient +a license to the Work on the same terms and conditions as the +license granted to You under this License. + Each time You distribute or publicly digitally perform a +Derivative Work, Licensor offers to the recipient a license to the +original Work on the same terms and conditions as the license +granted to You under this License. + If any provision of this License is invalid or unenforceable +under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this License, and +without further action by the parties to this agreement, such +provision shall be reformed to the minimum extent necessary to +make such provision valid and enforceable. + No term or provision of this License shall be deemed waived +and no breach consented to unless such waiver or consent shall be +in writing and signed by the party to be charged with such waiver +or consent. + This License constitutes the entire agreement between the +parties with respect to the Work licensed here. There are no +understandings, agreements or representations with respect to the +Work not specified here. Licensor shall not be bound by any +additional provisions that may appear in any communication from +You. This License may not be modified without the mutual written +agreement of the Licensor and You. + + Creative Commons Notice + + Creative Commons is not a party to this License, and makes no +warranty whatsoever in connection with the Work. Creative Commons +will not be liable to You or any party on any legal theory for any +damages whatsoever, including without limitation any general, +special, incidental or consequential damages arising in connection +to this license. Notwithstanding the foregoing two (2) sentences, +if Creative Commons has expressly identified itself as the +Licensor hereunder, it shall have all rights and obligations of +Licensor. + + Except for the limited purpose of indicating to the public +that the Work is licensed under the CCPL, Creative Commons does +not authorize the use by either party of the trademark "Creative +Commons" or any related trademark or logo of Creative Commons +without the prior written consent of Creative Commons. Any +permitted use will be in compliance with Creative Commons' +then-current trademark usage guidelines, as may be published on +its website or otherwise made available upon request from time to +time. For the avoidance of doubt, this trademark restriction does +not form part of this License. + + Creative Commons may be contacted at +http://creativecommons.org/. + diff --git a/plantlife_modpack/README b/plantlife_modpack/README new file mode 100644 index 0000000..8c62e49 --- /dev/null +++ b/plantlife_modpack/README @@ -0,0 +1,72 @@ +README file for Plantlife mod, by Vanessa Ezekowitz +--------------------------------------------------- + +Plantlife is a combined form of my Flowers and Poison Ivy mods and an expanded +version of the old Bushes mod, now called bushes_classic. The entire package +has been significantly rewritten and re-organized. This mod supplies all +three of these components and should be 100% compatible with mods that used +the old versions. + +Its purpose is to add various kinds of flowers, cotton plants, water foliage, +poison ivy, and fruit bushes, obviously. :-) All of these are spawned as +normal nodes and can be collected and used in any recipes that depend on the +old mods. + +Spawning of plants is sensitive to the amount of available light. Flowers, +cotton, and waterlilies only spawn when there at least a signficant amount of +light. Seaweed will grow only in dimly-lit areas. Poison ivy also grows only +in the daytime, but require less light than flowers. + +Growing of poison ivy will only occur for plants that are on the same surface +that is necessary for them to spawn on, so they won't grow if placed on e.g. +cobble or homedecor flower pot, etc. This doesn't affect wall-climbing poison +ivy, since it uses a different growth pattern. + +All plants use multiple controls provided by biome_lib, to keep where they +grow under control - no more random spread of plants! In addition, the density +of the plants in any region they appear in has been fixed and brought under +control. + +Poison ivy is found sparsely among junglegrass, but will not grow near flowers. + +------------------------------------------------------------------------------ + +Important details: + +Configuration: Any of the three components of this mod can be disabled +by just removing their respective directories. + +Dependencies: Just the game's default stuff. + +Recommends: Nothing in particular. + +Conflicts: This mod should not be installed alongside the original, separate +Poison Ivy, or old Bushes mods. If those exist, delete them, as this mod +supplies their functionality. If you still use the old Jungle Grass mod +either as previously supplied with this modpack, or in its standalone form, +you'll want to delete the "junglegrass" directory from this modpack to get rid +of the aliases-to-air that it supplies. + +Software Requirements: This mod requires Minetest 0.4.11 or later. It is +unlikely to work with old versions. + +------------------------------------------------------------------------------ + +Crafting: + +For crafting recipes, please see the forum thread for this modpack: + +https://forum.minetest.net/viewtopic.php?f=11&t=3898 + +------------------------------------------------------------------------------ + +Notes: + +Poison Ivy will spawn on grass and in some cases, on vertical surfaces +including trees and jungle trees where they meet the dirt or grass. Ivy +previously spawned on the ground taller/thicker or start climbing up said +vertical surfaces and trees. + +At present, the poison ivy presents little more than an annoyance - they can +only be cut down and either re-planted or thrown away. No damage is done by +harvesting them, yet. ;-) diff --git a/plantlife_modpack/along_shore/depends.txt b/plantlife_modpack/along_shore/depends.txt new file mode 100644 index 0000000..a63765a --- /dev/null +++ b/plantlife_modpack/along_shore/depends.txt @@ -0,0 +1,3 @@ +default +biome_lib +flowers_plus?
\ No newline at end of file diff --git a/plantlife_modpack/along_shore/init.lua b/plantlife_modpack/along_shore/init.lua new file mode 100644 index 0000000..719d324 --- /dev/null +++ b/plantlife_modpack/along_shore/init.lua @@ -0,0 +1,9 @@ +----------------------------------------------------------------------------------------------- +local title = "Along the Shore" +local version = "0.0.4" +local mname = "along_shore" +----------------------------------------------------------------------------------------------- + +----------------------------------------------------------------------------------------------- +print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") +-----------------------------------------------------------------------------------------------
\ No newline at end of file diff --git a/plantlife_modpack/along_shore/textures/along_shore_seaweed_1Darker.png b/plantlife_modpack/along_shore/textures/along_shore_seaweed_1Darker.png Binary files differnew file mode 100644 index 0000000..b5bd99c --- /dev/null +++ b/plantlife_modpack/along_shore/textures/along_shore_seaweed_1Darker.png diff --git a/plantlife_modpack/along_shore/textures/credit_textures.txt b/plantlife_modpack/along_shore/textures/credit_textures.txt new file mode 100644 index 0000000..89b4ce7 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/credit_textures.txt @@ -0,0 +1,30 @@ +------------------------------------------------------------- +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 +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/plantlife_modpack/along_shore/textures/old/LillyPad3x16.png b/plantlife_modpack/along_shore/textures/old/LillyPad3x16.png Binary files differnew file mode 100644 index 0000000..7d840bd --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/LillyPad3x16.png diff --git a/plantlife_modpack/along_shore/textures/old/MultiLilly16x.png b/plantlife_modpack/along_shore/textures/old/MultiLilly16x.png Binary files differnew file mode 100644 index 0000000..474ad05 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/MultiLilly16x.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_empty.png b/plantlife_modpack/along_shore/textures/old/along_shore_empty.png Binary files differnew file mode 100644 index 0000000..2f6464b --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_empty.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_1.png b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_1.png Binary files differnew file mode 100644 index 0000000..a075ba9 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_1.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_2.png b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_2.png Binary files differnew file mode 100644 index 0000000..90f5364 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_2.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_3.png b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_3.png Binary files differnew file mode 100644 index 0000000..94d00d2 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_3.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_4.png b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_4.png Binary files differnew file mode 100644 index 0000000..9b6387f --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_lilypads_4.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_pondscum_1.png b/plantlife_modpack/along_shore/textures/old/along_shore_pondscum_1.png Binary files differnew file mode 100644 index 0000000..3502354 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_pondscum_1.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_1.png b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_1.png Binary files differnew file mode 100644 index 0000000..7595ebc --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_1.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_2.png b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_2.png Binary files differnew file mode 100644 index 0000000..0b24730 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_2.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_3.png b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_3.png Binary files differnew file mode 100644 index 0000000..d9b7f43 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_3.png diff --git a/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_4.png b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_4.png Binary files differnew file mode 100644 index 0000000..887c183 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/along_shore_seaweed_4.png diff --git a/plantlife_modpack/along_shore/textures/old/flowers_seaweed.png b/plantlife_modpack/along_shore/textures/old/flowers_seaweed.png Binary files differnew file mode 100644 index 0000000..7595ebc --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/flowers_seaweed.png diff --git a/plantlife_modpack/along_shore/textures/old/flowers_waterlily.png b/plantlife_modpack/along_shore/textures/old/flowers_waterlily.png Binary files differnew file mode 100644 index 0000000..040a397 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/flowers_waterlily.png diff --git a/plantlife_modpack/along_shore/textures/old/flowers_waterlily_22.5.png b/plantlife_modpack/along_shore/textures/old/flowers_waterlily_22.5.png Binary files differnew file mode 100644 index 0000000..c409bcb --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/flowers_waterlily_22.5.png diff --git a/plantlife_modpack/along_shore/textures/old/flowers_waterlily_45.png b/plantlife_modpack/along_shore/textures/old/flowers_waterlily_45.png Binary files differnew file mode 100644 index 0000000..c870df4 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/flowers_waterlily_45.png diff --git a/plantlife_modpack/along_shore/textures/old/flowers_waterlily_67.5.png b/plantlife_modpack/along_shore/textures/old/flowers_waterlily_67.5.png Binary files differnew file mode 100644 index 0000000..5b9291b --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/flowers_waterlily_67.5.png diff --git a/plantlife_modpack/along_shore/textures/old/lillyPad5x16.png b/plantlife_modpack/along_shore/textures/old/lillyPad5x16.png Binary files differnew file mode 100644 index 0000000..761beb9 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/lillyPad5x16.png diff --git a/plantlife_modpack/along_shore/textures/old/lillypad3Flower16x.png b/plantlife_modpack/along_shore/textures/old/lillypad3Flower16x.png Binary files differnew file mode 100644 index 0000000..541200f --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/lillypad3Flower16x.png diff --git a/plantlife_modpack/along_shore/textures/old/pondscum16xc.png b/plantlife_modpack/along_shore/textures/old/pondscum16xc.png Binary files differnew file mode 100644 index 0000000..3502354 --- /dev/null +++ b/plantlife_modpack/along_shore/textures/old/pondscum16xc.png diff --git a/plantlife_modpack/bushes/depends.txt b/plantlife_modpack/bushes/depends.txt new file mode 100644 index 0000000..f82a423 --- /dev/null +++ b/plantlife_modpack/bushes/depends.txt @@ -0,0 +1,4 @@ +default +biome_lib +stonage? +sumpf? diff --git a/plantlife_modpack/bushes/init.lua b/plantlife_modpack/bushes/init.lua new file mode 100644 index 0000000..3dc9801 --- /dev/null +++ b/plantlife_modpack/bushes/init.lua @@ -0,0 +1,257 @@ +-- Bushes Mod by Mossmanikin, Evergreen, & Neuromancer +-- The initial code for this was taken from Mossmanikin's Grasses Mod, then heavilly modified by Neuromancer for this mod. +-- Mossmanikin also greatly helped with providing samples for coding. +-- bush leaf textures are cc-by-sa 3.0. from VannessaE's moretrees mod. (Leaf texture created by RealBadAngel or VanessaE) +-- Branch textures created by Neuromancer. +-- Licence for Code and Non-Bush leaf code is WTFPL. + + abstract_bushes = {} + + minetest.register_node("bushes:youngtree2_bottom", { + description = "Young Tree 2 (bottom)", + drawtype="nodebox", + tiles = {"bushes_youngtree2trunk.png"}, + inventory_image = "bushes_youngtree2trunk_inv.png", + wield_image = "bushes_youngtree2trunk_inv.png", +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}, + sounds = default.node_sound_leaves_defaults(), + drop = 'default:stick' +}) + + local BushBranchCenter = { {1,1}, {3,2} } +for i in pairs(BushBranchCenter) do + local Num = BushBranchCenter[i][1] + local TexNum = BushBranchCenter[i][2] + minetest.register_node("bushes:bushbranches"..Num, { + description = "Bush Branches "..Num, + drawtype = "nodebox", + tiles = { + "bushes_leaves_"..TexNum..".png", + "bushes_branches_center_"..TexNum..".png" + }, + node_box = { + type = "fixed", + fixed = { + {0, -1/2, -1/2, -1/4, 1/2, 1/2}, + {0, -1/2, -1/2, 1/4, 1/2, 1/2} + }, + }, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, 1/2, 1/2}, + }, + inventory_image = "bushes_branches_center_"..TexNum..".png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + groups = { + -- tree=1, -- MM: disabled because some recipes use group:tree for trunks + snappy=3, + flammable=2, + leaves=1 + }, + sounds = default.node_sound_leaves_defaults(), + drop = 'default:stick 4' + }) +end + +local BushBranchSide = { {2,1}, {4,2} } +for i in pairs(BushBranchSide) do + local Num = BushBranchSide[i][1] + local TexNum = BushBranchSide[i][2] + minetest.register_node("bushes:bushbranches"..Num, { + description = "Bush Branches "..Num, + drawtype = "nodebox", + tiles = { +--[[top]] "bushes_leaves_"..TexNum..".png", +--[[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 +--[[front]] "bushes_branches_right_"..TexNum..".png" + }, + 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 + }, + }, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, 1/2, 1/2}, + }, + inventory_image = "bushes_branches_right_"..TexNum..".png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + groups = { + -- tree=1, -- MM: disabled because some recipes use group:tree for trunks + snappy=3, + flammable=2, + leaves=1 + }, + sounds = default.node_sound_leaves_defaults(), + drop = 'default:stick 3' + }) +end + +local BushLeafNode = { {1}, {2}} +for i in pairs(BushLeafNode) do + local Num = BushLeafNode[i][1] + minetest.register_node("bushes:BushLeaves"..Num, { + description = "Bush Leaves "..Num, + drawtype = "allfaces_optional", + tiles = {"bushes_leaves_"..Num..".png"}, + paramtype = "light", + groups = { -- MM: Should we add leafdecay? + snappy=3, + flammable=2, + attached_node=1 + }, + sounds = default.node_sound_leaves_defaults(), + }) +end + +abstract_bushes.grow_bush = function(pos) + local leaf_type = math.random(1,2) + local bush_side_height = math.random(0,1) + local chance_of_bush_node_right = math.random(1,10) + if chance_of_bush_node_right> 5 then + local right_pos = {x=pos.x+1, y=pos.y+bush_side_height, z=pos.z} + abstract_bushes.grow_bush_node(right_pos,3,leaf_type) + end + local chance_of_bush_node_left = math.random(1,10) + if chance_of_bush_node_left> 5 then + bush_side_height = math.random(0,1) + local left_pos = {x=pos.x-1, y=pos.y+bush_side_height, z=pos.z} + abstract_bushes.grow_bush_node(left_pos,1,leaf_type) + end + local chance_of_bush_node_front = math.random(1,10) + if chance_of_bush_node_front> 5 then + bush_side_height = math.random(0,1) + local front_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z+1} + abstract_bushes.grow_bush_node(front_pos,2,leaf_type) + end + local chance_of_bush_node_back = math.random(1,10) + if chance_of_bush_node_back> 5 then + bush_side_height = math.random(0,1) + local back_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z-1} + abstract_bushes.grow_bush_node(back_pos,0,leaf_type) + end + +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} + + local bush_branch_type = 2 + + -- MM: I'm not sure if it's slower now than before... + if dir ~= 5 and leaf_type == 1 then + bush_branch_type = 2 + end + if dir ~= 5 and leaf_type == 2 then + bush_branch_type = 4 + end + if dir == 5 and leaf_type == 1 then + bush_branch_type = 1 + dir = 1 + end + if dir == 5 and leaf_type == 2 then + bush_branch_type = 3 + dir = 1 + end + + if minetest.get_node(right_here).name == "air" -- instead of check_air = true, + or minetest.get_node(right_here).name == "default:junglegrass" then + minetest.set_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir}) + --minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")") + minetest.set_node(above_right_here, {name="bushes:BushLeaves"..leaf_type}) + local chance_of_high_leaves = math.random(1,10) + if chance_of_high_leaves> 5 then + local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z} + --minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")") + minetest.set_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type}) + end + end +end + + +biome_lib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + "stoneage:grass_with_silex", + "sumpf:peat", + "sumpf:sumpf" + }, + max_count = 15, --10,15 + rarity = 101 - 4, --3,4 + min_elevation = 1, -- above sea level + plantlife_limit = -0.9, + }, + abstract_bushes.grow_bush +) + + 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, + 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.set_node(right_here, {name="bushes:youngtree2_bottom"}) + minetest.set_node(above_right_here, {name="bushes:youngtree2_bottom"}) + minetest.set_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2}) + minetest.set_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0}) + minetest.set_node(three_above_right_here, {name="bushes:BushLeaves1" }) + minetest.set_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" + }, + max_count = 55, --10,15 + rarity = 101 - 4, --3,4 + min_elevation = 1, -- above sea level + plantlife_limit = -0.9, + }, + abstract_bushes.grow_youngtree2 +) + + --http://dev.minetest.net/Node_Drawtypes diff --git a/plantlife_modpack/bushes/textures/bushes_branches_center_1.png b/plantlife_modpack/bushes/textures/bushes_branches_center_1.png Binary files differnew file mode 100644 index 0000000..bac3ee4 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_branches_center_1.png diff --git a/plantlife_modpack/bushes/textures/bushes_branches_center_2.png b/plantlife_modpack/bushes/textures/bushes_branches_center_2.png Binary files differnew file mode 100644 index 0000000..c21edf6 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_branches_center_2.png diff --git a/plantlife_modpack/bushes/textures/bushes_branches_left_1.png b/plantlife_modpack/bushes/textures/bushes_branches_left_1.png Binary files differnew file mode 100644 index 0000000..120f100 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_branches_left_1.png diff --git a/plantlife_modpack/bushes/textures/bushes_branches_left_2.png b/plantlife_modpack/bushes/textures/bushes_branches_left_2.png Binary files differnew file mode 100644 index 0000000..1c17bac --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_branches_left_2.png diff --git a/plantlife_modpack/bushes/textures/bushes_branches_right_1.png b/plantlife_modpack/bushes/textures/bushes_branches_right_1.png Binary files differnew file mode 100644 index 0000000..af5de67 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_branches_right_1.png diff --git a/plantlife_modpack/bushes/textures/bushes_branches_right_2.png b/plantlife_modpack/bushes/textures/bushes_branches_right_2.png Binary files differnew file mode 100644 index 0000000..8fb8332 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_branches_right_2.png diff --git a/plantlife_modpack/bushes/textures/bushes_leaves_1.png b/plantlife_modpack/bushes/textures/bushes_leaves_1.png Binary files differnew file mode 100644 index 0000000..594c958 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_leaves_1.png diff --git a/plantlife_modpack/bushes/textures/bushes_leaves_2.png b/plantlife_modpack/bushes/textures/bushes_leaves_2.png Binary files differnew file mode 100644 index 0000000..e6de482 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_leaves_2.png diff --git a/plantlife_modpack/bushes/textures/bushes_youngtree2trunk.png b/plantlife_modpack/bushes/textures/bushes_youngtree2trunk.png Binary files differnew file mode 100644 index 0000000..ea685e3 --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_youngtree2trunk.png diff --git a/plantlife_modpack/bushes/textures/bushes_youngtree2trunk_inv.png b/plantlife_modpack/bushes/textures/bushes_youngtree2trunk_inv.png Binary files differnew file mode 100644 index 0000000..7d6728f --- /dev/null +++ b/plantlife_modpack/bushes/textures/bushes_youngtree2trunk_inv.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BlockBranch1.png b/plantlife_modpack/bushes/textures/old & unused/BlockBranch1.png Binary files differnew file mode 100644 index 0000000..28fe91f --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BlockBranch1.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BlockBranch1L.png b/plantlife_modpack/bushes/textures/old & unused/BlockBranch1L.png Binary files differnew file mode 100644 index 0000000..1d8a8e2 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BlockBranch1L.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BlockBranch1R.png b/plantlife_modpack/bushes/textures/old & unused/BlockBranch1R.png Binary files differnew file mode 100644 index 0000000..514b888 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BlockBranch1R.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranches1.png b/plantlife_modpack/bushes/textures/old & unused/BushBranches1.png Binary files differnew file mode 100644 index 0000000..5bb2b46 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranches1.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm.png b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm.png Binary files differnew file mode 100644 index 0000000..5574f38 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm2.png b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm2.png Binary files differnew file mode 100644 index 0000000..6ffd2f3 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm2.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm3.png b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm3.png Binary files differnew file mode 100644 index 0000000..5bb9bf5 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm3.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm4.png b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm4.png Binary files differnew file mode 100644 index 0000000..b204fef --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranches1sm4.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranchesCenter.png b/plantlife_modpack/bushes/textures/old & unused/BushBranchesCenter.png Binary files differnew file mode 100644 index 0000000..0c9b5af --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranchesCenter.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranchesSide1.png b/plantlife_modpack/bushes/textures/old & unused/BushBranchesSide1.png Binary files differnew file mode 100644 index 0000000..ca95dd3 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranchesSide1.png diff --git a/plantlife_modpack/bushes/textures/old & unused/BushBranchesSide2.png b/plantlife_modpack/bushes/textures/old & unused/BushBranchesSide2.png Binary files differnew file mode 100644 index 0000000..d62499e --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/BushBranchesSide2.png diff --git a/plantlife_modpack/bushes/textures/old & unused/blank.png b/plantlife_modpack/bushes/textures/old & unused/blank.png Binary files differnew file mode 100644 index 0000000..ed495a8 --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/blank.png diff --git a/plantlife_modpack/bushes/textures/old & unused/moretrees_pine_leaves3.png b/plantlife_modpack/bushes/textures/old & unused/moretrees_pine_leaves3.png Binary files differnew file mode 100644 index 0000000..57d077d --- /dev/null +++ b/plantlife_modpack/bushes/textures/old & unused/moretrees_pine_leaves3.png diff --git a/plantlife_modpack/bushes_classic/cooking.lua b/plantlife_modpack/bushes_classic/cooking.lua new file mode 100644 index 0000000..c672975 --- /dev/null +++ b/plantlife_modpack/bushes_classic/cooking.lua @@ -0,0 +1,118 @@ +local S = biome_lib.intllib + +-- Basket + +minetest.register_craft({ + output = "bushes:basket_empty", + recipe = { + { "default:stick", "default:stick", "default:stick" }, + { "", "default:stick", "" }, + }, +}) + +-- Sugar + +minetest.register_craftitem(":bushes:sugar", { + description = S("Sugar"), + inventory_image = "bushes_sugar.png", + on_use = minetest.item_eat(1), + groups = {food_sugar=1} +}) + +minetest.register_craft({ + output = "bushes:sugar 1", + recipe = { + { "default:papyrus", "default:papyrus" }, + }, +}) + +for i, berry in ipairs(bushes_classic.bushes) do + local desc = bushes_classic.bushes_descriptions[i] + + minetest.register_craftitem(":bushes:"..berry.."_pie_raw", { + description = S("Raw "..desc.." pie"), + inventory_image = "bushes_"..berry.."_pie_raw.png", + on_use = minetest.item_eat(4), + }) + + if berry ~= "mixed_berry" then + + if berry == "strawberry" and minetest.registered_nodes["farming_plus:strawberry"] then + -- Special case for strawberries, when farming_plus is in use. Use + -- the item from that mod, but redefine it so it has the right + -- groups and does't look so ugly! + minetest.register_craftitem(":farming_plus:strawberry_item", { + description = S("Strawberry"), + inventory_image = "bushes_"..berry..".png", + on_use = minetest.item_eat(2), + groups = {berry=1, strawberry=1} + }) + minetest.register_alias("bushes:strawberry", "farming_plus:strawberry_item") + else + minetest.register_craftitem(":bushes:"..berry, { + description = desc, + inventory_image = "bushes_"..berry..".png", + groups = {berry = 1, [berry] = 1}, + on_use = minetest.item_eat(1), + }) + end + minetest.register_craft({ + output = "bushes:"..berry.."_pie_raw 1", + recipe = { + { "group:food_sugar", "farming:flour", "group:food_sugar" }, + { "group:"..berry, "group:"..berry, "group:"..berry }, + }, + }) + end + + -- Cooked pie + + minetest.register_craftitem(":bushes:"..berry.."_pie_cooked", { + description = S("Cooked "..desc.." pie"), + inventory_image = "bushes_"..berry.."_pie_cooked.png", + on_use = minetest.item_eat(6), + }) + + minetest.register_craft({ + type = "cooking", + output = "bushes:"..berry.."_pie_cooked", + recipe = "bushes:"..berry.."_pie_raw", + cooktime = 30, + }) + + -- slice of pie + + minetest.register_craftitem(":bushes:"..berry.."_pie_slice", { + description = S("Slice of "..desc.." pie"), + inventory_image = "bushes_"..berry.."_pie_slice.png", + on_use = minetest.item_eat(1), + }) + + minetest.register_craft({ + output = "bushes:"..berry.."_pie_slice 6", + recipe = { + { "bushes:"..berry.."_pie_cooked" }, + }, + }) + + -- Basket with pies + + minetest.register_craft({ + output = "bushes:basket_"..berry.." 1", + recipe = { + { "bushes:"..berry.."_pie_cooked", "bushes:"..berry.."_pie_cooked", "bushes:"..berry.."_pie_cooked" }, + { "", "bushes:basket_empty", "" }, + }, + }) +end + +minetest.register_craft({ + output = "bushes:mixed_berry_pie_raw 2", + recipe = { + { "group:food_sugar", "farming:flour", "group:food_sugar" }, + { "group:berry", "group:berry", "group:berry" }, + { "group:berry", "group:berry", "group:berry" }, + }, +}) + + diff --git a/plantlife_modpack/bushes_classic/depends.txt b/plantlife_modpack/bushes_classic/depends.txt new file mode 100644 index 0000000..16347c6 --- /dev/null +++ b/plantlife_modpack/bushes_classic/depends.txt @@ -0,0 +1,3 @@ +biome_lib +farming? +farming_plus? diff --git a/plantlife_modpack/bushes_classic/image_credits.txt b/plantlife_modpack/bushes_classic/image_credits.txt new file mode 100644 index 0000000..a4ddc51 --- /dev/null +++ b/plantlife_modpack/bushes_classic/image_credits.txt @@ -0,0 +1,5 @@ +strawberry: http://www.clker.com/clipart-4060.html +blueberry: http://www.clker.com/clipart-cerezafiro12.html +blackberry: http://www.clker.com/clipart-blackberry-2.html +raspberry: http://www.clker.com/clipart-simple-raspberry.html +gooseberry: http://www.clker.com/clipart-26281.html diff --git a/plantlife_modpack/bushes_classic/init.lua b/plantlife_modpack/bushes_classic/init.lua new file mode 100644 index 0000000..021f569 --- /dev/null +++ b/plantlife_modpack/bushes_classic/init.lua @@ -0,0 +1,59 @@ +-- Bushes classic mod originally by unknown +-- now maintained by VanessaE +-- +-- License: WTFPL + +local S = biome_lib.intllib + +bushes_classic = {} + +bushes_classic.bushes = { + "strawberry", + "blackberry", + "blueberry", + "raspberry", + "gooseberry", + "mixed_berry" +} + +bushes_classic.bushes_descriptions = { + "Strawberry", + "Blackberry", + "Blueberry", + "Raspberry", + "Gooseberry", + "Mixed Berry" +} + +bushes_classic.spawn_list = {} + +local modpath = minetest.get_modpath('bushes_classic') +dofile(modpath..'/cooking.lua') +dofile(modpath..'/nodes.lua') + +biome_lib:spawn_on_surfaces({ + spawn_delay = 3600, + spawn_plants = bushes_classic.spawn_list, + avoid_radius = 10, + spawn_chance = 100, + spawn_surfaces = { + "default:dirt_with_grass", + "woodsoils:dirt_with_leaves_1", + "woodsoils:grass_with_leaves_1", + "woodsoils:grass_with_leaves_2", + "farming:soil", + "farming:soil_wet" + }, + avoid_nodes = {"group:bush"}, + seed_diff = 545342534, -- chosen by a fair mashing of the keyboard - guaranteed to be random :P + plantlife_limit = -0.1, + light_min = 10, + temp_min = 0.15, -- approx 20C + temp_max = -0.15, -- approx 35C + humidity_min = 0, -- 50% RH + humidity_max = -1, -- 100% RH +}) + +minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry") + +print(S("[Bushes] Loaded.")) diff --git a/plantlife_modpack/bushes_classic/locale/de.txt b/plantlife_modpack/bushes_classic/locale/de.txt new file mode 100644 index 0000000..3724274 --- /dev/null +++ b/plantlife_modpack/bushes_classic/locale/de.txt @@ -0,0 +1,43 @@ +# Translation by Xanthin + +Strawberry = Erdbeere +Blackberry = Brombeere +Blueberry = Blaubeere +Raspberry = Himbeere +Gooseberry = Stachelbeere +Mixed Berry = Beerenmix +Basket with Strawberry Pies = Korb mit Erdbeertorten +Basket with Blackberry Pies = Korb mit Brombeertorten +Basket with Blueberry Pies = Korb mit Blaubeertorten +Basket with Raspberry Pies = Korb mit Himbeertorten +Basket with Gooseberry Pies = Korb mit Stachelbeertorten +Basket with Mixed Berry Pies = Korb mit Beerenmixtorten +currently fruitless = zur Zeit fruechteloser +Strawberry Bush = Erdbeerbusch +Blackberry Bush = Brombeerbusch +Blueberry Bush = Blaubeerbusch +Raspberry Bush = Himbeerbusch +Gooseberry Bush = Stachelbeerbusch +Mixed Berry Bush = Beerenmixbusch +Basket = Korb +Sugar = Zucker +Raw Strawberry pie = Rohe Erdbeertorte +Raw Blackberry pie = Rohe Brombeertorte +Raw Blueberry pie = Rohe Blaubeertorte +Raw Raspberry pie = Rohe Himbeertorte +Raw Gooseberry pie = Rohe Stachelbeertorte +Raw Mixed Berry pie = Rohe Beerenmixtorte +Cooked Strawberry pie = Erdbeertorte +Cooked Blackberry pie = Brombeertorte +Cooked Blueberry pie = Blaubeertorte +Cooked Raspberry pie = Himbeertorte +Cooked Gooseberry pie = Stachelbeertorte +Cooked Mixed Berry pie = Beerenmixtorte +Slice of Strawberry pie = Erdbeertortenstueck +Slice of Blackberry pie = Brombeertortenstueck +Slice of Blueberry pie = Blaubeertortenstueck +Slice of Raspberry pie = Himbeertortenstueck +Slice of Gooseberry pie = Stachelbeertortenstueck +Slice of Mixed Berry pie = Beerenmixtortenstueck + +[Bushes] Loaded. = [Bushes] Geladen. diff --git a/plantlife_modpack/bushes_classic/locale/fr.txt b/plantlife_modpack/bushes_classic/locale/fr.txt new file mode 100644 index 0000000..ce80613 --- /dev/null +++ b/plantlife_modpack/bushes_classic/locale/fr.txt @@ -0,0 +1,43 @@ +# Template + +Strawberry = Fraise +Blackberry = Mûre +Blueberry = Myrtille +Raspberry = Framboise +Gooseberry = Groseille +Mixed Berry = Mélange de baies +Basket with Strawberry Pies = Panier de tartes aux fraises +Basket with Blackberry Pies = Panier de tartes aux mûres +Basket with Blueberry Pies = Panier de tartes aux myrtilles +Basket with Raspberry Pies = Panier de tartes aux framboises +Basket with Gooseberry Pies = Panier de tartes aux groseilles +Basket with Mixed Berry Pies = Panier de tartes au mélange de baies +currently fruitless = actuellement sans fruit +Strawberry Bush = Buisson à fraise +Blackberry Bush = Buisson à mûre +Blueberry Bush = Buisson à myrtille +Raspberry Bush = Buisson à framboise +Gooseberry Bush = Buisson à groseille +Mixed Berry Bush = Buisson de baies mélangées +Basket = Panier +Sugar = Sucre +Raw Strawberry pie = Tarte crue aux fraises +Raw Blackberry pie = Tarte crue aux mûres +Raw Blueberry pie = Tarte crue aux myrtilles +Raw Raspberry pie = Tarte crue aux framboises +Raw Gooseberry pie = Tarte crue aux groseilles +Raw Mixed Berry pie = Tarte crue au mélange de baies +Cooked Strawberry pie = Tarte cuite aux fraises +Cooked Blackberry pie = Tarte cuite aux mûres +Cooked Blueberry pie = Tarte cuite aux myrtilles +Cooked Raspberry pie = Tarte cuite aux framboises +Cooked Gooseberry pie = Tarte cuite aux groseilles +Cooked Mixed Berry pie = Tarte cuite au mélange de baies +Slice of Strawberry pie = Part de tarte aux fraises +Slice of Blackberry pie = Part de tarte aux mûres +Slice of Blueberry pie = Part de tarte aux myrtilles +Slice of Raspberry pie = Part de tarts aux framboises +Slice of Gooseberry pie = Part de tarte aux groseilles +Slice of Mixed Berry pie = Part de tarte au mélange de baies + +[Bushes] Loaded. = [Buissons] Chargés. diff --git a/plantlife_modpack/bushes_classic/locale/template.txt b/plantlife_modpack/bushes_classic/locale/template.txt new file mode 100644 index 0000000..6c35312 --- /dev/null +++ b/plantlife_modpack/bushes_classic/locale/template.txt @@ -0,0 +1,43 @@ +# Template + +Strawberry = +Blackberry = +Blueberry = +Raspberry = +Gooseberry = +Mixed Berry = +Basket with Strawberry Pies = +Basket with Blackberry Pies = +Basket with Blueberry Pies = +Basket with Raspberry Pies = +Basket with Gooseberry Pies = +Basket with Mixed Berry Pies = +currently fruitless = +Strawberry Bush = +Blackberry Bush = +Blueberry Bush = +Raspberry Bush = +Gooseberry Bush = +Mixed Berry Bush = +Basket = +Sugar = +Raw Strawberry pie = +Raw Blackberry pie = +Raw Blueberry pie = +Raw Raspberry pie = +Raw Gooseberry pie = +Raw Mixed Berry pie = +Cooked Strawberry pie = +Cooked Blackberry pie = +Cooked Blueberry pie = +Cooked Raspberry pie = +Cooked Gooseberry pie = +Cooked Mixed Berry pie = +Slice of Strawberry pie = +Slice of Blackberry pie = +Slice of Blueberry pie = +Slice of Raspberry pie = +Slice of Gooseberry pie = +Slice of Mixed Berry pie = + +[Bushes] Loaded. = diff --git a/plantlife_modpack/bushes_classic/locale/tr.txt b/plantlife_modpack/bushes_classic/locale/tr.txt new file mode 100644 index 0000000..0472921 --- /dev/null +++ b/plantlife_modpack/bushes_classic/locale/tr.txt @@ -0,0 +1,44 @@ +# Turkish translation +# mahmutelmas06@hotmail.com + +Strawberry = Çilek +Blackberry = Böğürtlen +Blueberry = Yaban mersini +Raspberry = Ahududu +Gooseberry = Bektaşi üzümü +Mixed Berry = Dut +Basket with Strawberry Pies = Çilekli pasta sepeti +Basket with Blackberry Pies = Böğürtlenli pasta sepeti +Basket with Blueberry Pies = Yaban mersini pastalı sepet +Basket with Raspberry Pies = Ahududulu pasta sepeti +Basket with Gooseberry Pies = Bektaşi üzümlü pasta sepeti +Basket with Mixed Berry Pies = Dutlu pasta sepeti +currently fruitless = şu anda meyvesiz +Strawberry Bush = Çilek fidanı +Blackberry Bush = Böğürtlen fidanı +Blueberry Bush = Yaban mersini fidanı +Raspberry Bush = Ahududu fidanı +Gooseberry Bush = Bektaşi üzümü fidanı +Mixed Berry Bush = Dut fidanı +Basket = Sepet +Sugar = Şeker +Raw Strawberry pie = Çilekli çiğ pasta +Raw Blackberry pie = Böğürtlenli çiğ pasta +Raw Blueberry pie = Yaban mersinli çiğ pasta +Raw Raspberry pie = Ahududulu çiğ pasta +Raw Gooseberry pie = Bektaşi üzümlü çiğ pasta +Raw Mixed Berry pie = Dutlu çiğ pasta +Cooked Strawberry pie = Pişmiş çilekli pasta +Cooked Blackberry pie = Pişmiş böğürtlenli pasta +Cooked Blueberry pie = Pişmiş yaban mersinli pasta +Cooked Raspberry pie = Pişmiş ahududulu pasta +Cooked Gooseberry pie = Pişmiş bektaşi üzümlü pasta +Cooked Mixed Berry pie = Pişmiş dutlu pasta +Slice of Strawberry pie = Çilekli pasta dilimi +Slice of Blackberry pie = Böğürtlenli pasta dilimi +Slice of Blueberry pie = Yaban mersinli pasta dilimi +Slice of Raspberry pie = Ahududulu pasta dilimi +Slice of Gooseberry pie = Bektaşi üzümlü pasta dilimi +Slice of Mixed Berry pie = Dutlu pasta dilimi + +[Bushes] Loaded. = [Bushes] yüklendi. diff --git a/plantlife_modpack/bushes_classic/models/bushes_basket_empty.obj b/plantlife_modpack/bushes_classic/models/bushes_basket_empty.obj new file mode 100644 index 0000000..0179c31 --- /dev/null +++ b/plantlife_modpack/bushes_classic/models/bushes_basket_empty.obj @@ -0,0 +1,46 @@ +# Blender v2.73 (sub 0) OBJ File: 'basket-of-pies.blend' +# www.blender.org +o basket_Cube.001 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v -0.500000 0.500000 -0.500000 +v 0.500000 0.500000 -0.500000 +v 0.500000 0.500000 0.500000 +v -0.437500 0.500000 0.437500 +v -0.437500 0.500000 -0.437500 +v 0.437500 0.500000 -0.437500 +v 0.437500 0.500000 0.437500 +v -0.437500 -0.437500 0.437500 +v -0.437500 -0.437500 -0.437500 +v 0.437500 -0.437500 -0.437500 +v 0.437500 -0.437500 0.437500 +vt 0.484848 0.984848 +vt 0.015152 0.984848 +vt 0.015152 0.515152 +vt 0.484848 0.515152 +vt 0.515152 0.984848 +vt 0.515152 0.515152 +vt 0.984848 0.515152 +vt 0.984848 0.984848 +vt 0.954545 0.545455 +vt 0.545455 0.545455 +vt 0.954545 0.954545 +vt 0.545455 0.954545 +s off +f 5/1 6/2 2/3 1/4 +f 6/1 7/2 3/3 2/4 +f 7/1 8/2 4/3 3/4 +f 8/1 5/2 1/3 4/4 +f 1/5 2/6 3/7 4/8 +f 5/6 8/7 12/9 9/10 +f 8/7 7/8 11/11 12/9 +f 7/8 6/5 10/12 11/11 +f 6/5 5/6 9/10 10/12 +f 9/1 12/2 16/3 13/4 +f 12/1 11/2 15/3 16/4 +f 11/1 10/2 14/3 15/4 +f 10/1 9/2 13/3 14/4 +f 13/10 16/9 15/11 14/12 diff --git a/plantlife_modpack/bushes_classic/models/bushes_basket_full.obj b/plantlife_modpack/bushes_classic/models/bushes_basket_full.obj new file mode 100644 index 0000000..5a3e1a8 --- /dev/null +++ b/plantlife_modpack/bushes_classic/models/bushes_basket_full.obj @@ -0,0 +1,330 @@ +# Blender v2.73 (sub 0) OBJ File: 'basket-of-pies.blend' +# www.blender.org +o pies_Cylinder +v -0.089468 -0.116804 -0.438000 +v -0.116691 -0.091480 -0.438000 +v 0.024696 0.005921 -0.404659 +v -0.002527 0.031245 -0.404659 +v 0.121480 0.109962 -0.309713 +v 0.094258 0.135286 -0.309713 +v 0.186149 0.179480 -0.167615 +v 0.158927 0.204804 -0.167615 +v 0.208858 0.203891 0.000000 +v 0.181635 0.229215 0.000000 +v 0.186149 0.179480 0.167615 +v 0.158927 0.204804 0.167615 +v 0.121480 0.109962 0.309713 +v 0.094258 0.135286 0.309713 +v 0.024696 0.005921 0.404659 +v -0.002527 0.031245 0.404659 +v -0.089468 -0.116804 0.438000 +v -0.116691 -0.091480 0.438000 +v -0.230856 -0.214204 0.404659 +v -0.327640 -0.318245 0.309713 +v -0.392309 -0.387763 0.167615 +v -0.415018 -0.412175 -0.000000 +v -0.392309 -0.387763 -0.167615 +v -0.327640 -0.318245 -0.309713 +v -0.230856 -0.214204 -0.404659 +v -0.135230 -0.074234 -0.383250 +v -0.035336 0.033150 -0.354077 +v 0.049350 0.124186 -0.270999 +v 0.105936 0.185014 -0.146663 +v 0.125806 0.206374 0.000000 +v 0.105936 0.185014 0.146663 +v 0.049350 0.124186 0.270999 +v -0.035336 0.033150 0.354077 +v -0.135230 -0.074234 0.383250 +v -0.235124 -0.181618 0.354077 +v -0.319810 -0.272654 0.270999 +v -0.376395 -0.333482 0.146663 +v -0.396266 -0.354842 -0.000000 +v -0.376395 -0.333482 -0.146664 +v -0.319810 -0.272654 -0.270999 +v -0.235124 -0.181618 -0.354077 +v 0.071215 -0.085999 -0.438000 +v 0.041377 -0.063816 -0.438000 +v 0.171221 0.048513 -0.404659 +v 0.141384 0.070697 -0.404659 +v 0.256002 0.162547 -0.309713 +v 0.226165 0.184731 -0.309713 +v 0.312652 0.238743 -0.167615 +v 0.282814 0.260926 -0.167615 +v 0.332544 0.265499 0.000000 +v 0.302707 0.287682 0.000000 +v 0.312652 0.238743 0.167615 +v 0.282814 0.260926 0.167615 +v 0.256002 0.162547 0.309713 +v 0.226165 0.184731 0.309713 +v 0.171221 0.048513 0.404659 +v 0.141383 0.070697 0.404659 +v 0.071215 -0.085999 0.438000 +v 0.041377 -0.063816 0.438000 +v -0.058629 -0.198328 0.404659 +v -0.058629 -0.198328 -0.404659 +v 0.021058 -0.048709 -0.383250 +v 0.108564 0.068989 -0.354077 +v 0.182747 0.168769 -0.270999 +v 0.232315 0.235440 -0.146663 +v 0.249721 0.258852 0.000000 +v 0.232315 0.235440 0.146663 +v 0.182747 0.168769 0.270999 +v 0.108564 0.068989 0.354077 +v 0.021058 -0.048709 0.383250 +v -0.066448 -0.166408 0.354077 +v -0.140632 -0.266188 0.270999 +v -0.190200 -0.332858 0.146663 +v -0.207605 -0.356270 -0.000000 +v -0.190199 -0.332858 -0.146664 +v -0.140631 -0.266188 -0.270999 +v -0.066448 -0.166408 -0.354077 +v 0.220377 -0.057101 -0.438000 +v 0.188086 -0.038671 -0.438000 +v 0.303465 0.088470 -0.404659 +v 0.271175 0.106901 -0.404659 +v 0.373905 0.211880 -0.309713 +v 0.341614 0.230311 -0.309713 +v 0.420971 0.294340 -0.167615 +v 0.388680 0.312771 -0.167615 +v 0.437498 0.323296 0.000000 +v 0.405208 0.341727 0.000000 +v 0.420971 0.294340 0.167615 +v 0.388680 0.312771 0.167615 +v 0.373905 0.211880 0.309713 +v 0.341614 0.230311 0.309713 +v 0.303465 0.088470 0.404659 +v 0.271175 0.106901 0.404659 +v 0.220377 -0.057101 0.438000 +v 0.188086 -0.038671 0.438000 +v 0.104997 -0.184242 0.404659 +v 0.104997 -0.184242 -0.404659 +v 0.166096 -0.026119 -0.383250 +v 0.238799 0.101256 -0.354077 +v 0.300433 0.209240 -0.270999 +v 0.341616 0.281392 -0.146663 +v 0.356078 0.306728 0.000000 +v 0.341616 0.281392 0.146664 +v 0.300433 0.209240 0.270999 +v 0.238799 0.101256 0.354077 +v 0.166096 -0.026119 0.383250 +v 0.093393 -0.153495 0.354077 +v 0.031759 -0.261478 0.270999 +v -0.009424 -0.333631 0.146663 +v -0.023885 -0.358967 -0.000000 +v -0.009424 -0.333631 -0.146664 +v 0.031759 -0.261478 -0.270999 +v 0.093394 -0.153495 -0.354077 +vt 0.000000 0.054054 +vt 0.000000 0.000000 +vt 0.062500 0.000000 +vt 0.062500 0.054054 +vt 0.125000 0.000000 +vt 0.125000 0.054054 +vt 0.187500 0.000000 +vt 0.187500 0.054054 +vt 0.250000 0.000000 +vt 0.250000 0.054054 +vt 0.312500 0.000000 +vt 0.312500 0.054054 +vt 0.375000 0.000000 +vt 0.375000 0.054054 +vt 0.437500 0.000000 +vt 0.437500 0.054054 +vt 0.500000 0.000000 +vt 0.500000 0.054054 +vt 0.055610 0.293778 +vt 0.110171 0.184656 +vt 0.123905 0.225763 +vt 0.076165 0.321244 +vt 0.316174 0.801264 +vt 0.253798 0.852938 +vt 0.186282 0.852938 +vt 0.123905 0.801264 +vt 0.076165 0.705782 +vt 0.050327 0.581029 +vt 0.050327 0.445997 +vt 0.186282 0.174088 +vt 0.253798 0.174089 +vt 0.316174 0.225763 +vt 0.363915 0.321245 +vt 0.389752 0.445997 +vt 0.389752 0.581029 +vt 0.363915 0.705782 +vt 0.384468 0.733249 +vt 0.329907 0.842371 +vt 0.055610 0.733249 +vt 0.026082 0.590674 +vt 0.384468 0.293778 +vt 0.413996 0.436353 +vt 0.258619 0.901428 +vt 0.181458 0.901428 +vt 0.181458 0.125599 +vt 0.258619 0.125599 +vt 0.026082 0.436353 +vt 0.413996 0.590674 +vt 0.110171 0.842371 +vt 0.329907 0.184656 +vt 0.076566 0.705251 +vt 0.050729 0.580498 +vt 0.050729 0.445466 +vt 0.076566 0.320713 +vt 0.124307 0.225232 +vt 0.186684 0.173557 +vt 0.254199 0.173557 +vt 0.316576 0.225232 +vt 0.364317 0.320713 +vt 0.390154 0.445466 +vt 0.390154 0.580498 +vt 0.364317 0.705251 +vt 0.316576 0.800732 +vt 0.254199 0.852407 +vt 0.186684 0.852407 +vt 0.124307 0.800732 +vt 0.110573 0.841838 +vt 0.056012 0.732716 +vt 0.330309 0.841838 +vt 0.259022 0.900894 +vt 0.026484 0.590141 +vt 0.026484 0.435819 +vt 0.414398 0.435819 +vt 0.414398 0.590141 +vt 0.181861 0.900894 +vt 0.384870 0.732716 +vt 0.384870 0.293245 +vt 0.389637 0.582094 +vt 0.363799 0.706847 +vt 0.316059 0.802329 +vt 0.253682 0.854003 +vt 0.186166 0.854003 +vt 0.123790 0.802329 +vt 0.076049 0.706847 +vt 0.050212 0.582094 +vt 0.050212 0.447062 +vt 0.076049 0.322309 +vt 0.123790 0.226828 +vt 0.186166 0.175153 +vt 0.253682 0.175153 +vt 0.316058 0.226828 +vt 0.363799 0.322310 +vt 0.389637 0.447062 +vt 0.413881 0.437419 +vt 0.413881 0.591741 +vt 0.258504 0.126666 +vt 0.329792 0.185722 +vt 0.384353 0.734315 +vt 0.329792 0.843437 +vt 0.055495 0.294844 +vt 0.110056 0.185722 +vt 0.384353 0.294844 +vt 0.181343 0.126666 +vt 0.025967 0.437419 +g pies_Cylinder_pie +s off +f 1/1 2/2 4/3 3/4 +f 3/4 4/3 6/5 5/6 +f 5/6 6/5 8/7 7/8 +f 7/8 8/7 10/9 9/10 +f 9/10 10/9 12/11 11/12 +f 11/12 12/11 14/13 13/14 +f 13/14 14/13 16/15 15/16 +f 15/16 16/15 18/17 17/18 +f 20/19 19/20 35/21 36/22 +f 27/23 26/24 41/25 40/26 39/27 38/28 37/29 36/22 35/21 34/30 33/31 32/32 31/33 30/34 29/35 28/36 +f 6/37 4/38 27/23 28/36 +f 23/39 22/40 38/28 39/27 +f 12/41 10/42 30/34 31/33 +f 2/43 25/44 41/25 26/24 +f 4/38 2/43 26/24 27/23 +f 18/45 16/46 33/31 34/30 +f 21/47 20/19 36/22 37/29 +f 8/48 6/37 28/36 29/35 +f 24/49 23/39 39/27 40/26 +f 14/50 12/41 31/33 32/32 +f 19/20 18/45 34/30 35/21 +f 22/40 21/47 37/29 38/28 +f 10/42 8/48 29/35 30/34 +f 25/44 24/49 40/26 41/25 +f 16/46 14/50 32/32 33/31 +f 42/1 43/2 45/3 44/4 +f 44/4 45/3 47/5 46/6 +f 46/6 47/5 49/7 48/8 +f 48/8 49/7 51/9 50/10 +f 50/10 51/9 53/11 52/12 +f 52/12 53/11 55/13 54/14 +f 54/14 55/13 57/15 56/16 +f 56/16 57/15 59/17 58/18 +f 63/51 62/52 77/53 76/54 75/55 74/56 73/57 72/58 71/59 70/60 69/61 68/62 67/63 66/64 65/65 64/66 +f 47/67 45/68 63/51 64/66 +f 53/69 51/70 66/64 67/63 +f 43/71 61/72 77/53 62/52 +f 45/68 43/71 62/52 63/51 +f 59/73 57/74 69/61 70/60 +f 49/75 47/67 64/66 65/65 +f 55/76 53/69 67/63 68/62 +f 60/77 59/73 70/60 71/59 +f 51/70 49/75 65/65 66/64 +f 57/74 55/76 68/62 69/61 +f 78/1 79/2 81/3 80/4 +f 80/4 81/3 83/5 82/6 +f 82/6 83/5 85/7 84/8 +f 84/8 85/7 87/9 86/10 +f 86/10 87/9 89/11 88/12 +f 88/12 89/11 91/13 90/14 +f 90/14 91/13 93/15 92/16 +f 92/16 93/15 95/17 94/18 +f 99/78 98/79 113/80 112/81 111/82 110/83 109/84 108/85 107/86 106/87 105/88 104/89 103/90 102/91 101/92 100/93 +f 83/94 81/95 99/78 100/93 +f 89/96 87/97 102/91 103/90 +f 79/98 97/99 113/80 98/79 +f 81/95 79/98 98/79 99/78 +f 95/100 93/101 105/88 106/87 +f 85/102 83/94 100/93 101/92 +f 91/103 89/96 103/90 104/89 +f 96/104 95/100 106/87 107/86 +f 87/97 85/102 101/92 102/91 +f 93/101 91/103 104/89 105/88 +o basket_Cube.001 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v -0.500000 0.500000 -0.500000 +v 0.500000 0.500000 -0.500000 +v 0.500000 0.500000 0.500000 +v -0.437500 0.500000 0.437500 +v -0.437500 0.500000 -0.437500 +v 0.437500 0.500000 -0.437500 +v 0.437500 0.500000 0.437500 +v -0.437500 -0.437500 0.437500 +v -0.437500 -0.437500 -0.437500 +v 0.437500 -0.437500 -0.437500 +v 0.437500 -0.437500 0.437500 +vt 0.484848 0.984848 +vt 0.015152 0.984848 +vt 0.015152 0.515152 +vt 0.484848 0.515152 +vt 0.515152 0.984848 +vt 0.515152 0.515152 +vt 0.984848 0.515152 +vt 0.984848 0.984848 +vt 0.954545 0.545455 +vt 0.545455 0.545455 +vt 0.954545 0.954545 +vt 0.545455 0.954545 +g basket_Cube.001_basket +s off +f 118/105 119/106 115/107 114/108 +f 119/105 120/106 116/107 115/108 +f 120/105 121/106 117/107 116/108 +f 121/105 118/106 114/107 117/108 +f 114/109 115/110 116/111 117/112 +f 118/110 121/111 125/113 122/114 +f 121/111 120/112 124/115 125/113 +f 120/112 119/109 123/116 124/115 +f 119/109 118/110 122/114 123/116 +f 122/105 125/106 129/107 126/108 +f 125/105 124/106 128/107 129/108 +f 124/105 123/106 127/107 128/108 +f 123/105 122/106 126/107 127/108 +f 126/114 129/113 128/115 127/116 diff --git a/plantlife_modpack/bushes_classic/models/bushes_bush.obj b/plantlife_modpack/bushes_classic/models/bushes_bush.obj new file mode 100644 index 0000000..a69bfce --- /dev/null +++ b/plantlife_modpack/bushes_classic/models/bushes_bush.obj @@ -0,0 +1,329 @@ +# Blender v2.73 (sub 0) OBJ File: 'bush.blend' +# www.blender.org +o nodebox-4 +v 0.467076 -0.122686 -0.190481 +v -0.453590 -0.119789 -0.192145 +v 0.420865 -0.181680 -0.171396 +v -0.429008 -0.188000 -0.182314 +v -0.450977 0.041977 -0.191409 +v -0.271687 -0.294075 -0.114977 +v -0.096925 -0.495759 -0.044091 +v -0.070286 -0.344209 -0.030750 +v -0.163971 -0.173437 -0.403793 +v -0.188139 -0.116431 0.446425 +v 0.069865 0.462329 0.170043 +v -0.175980 -0.180649 0.417932 +v -0.184276 0.039248 0.437271 +v -0.121692 -0.319322 0.290049 +v -0.039557 -0.495759 0.097032 +v -0.029307 -0.346230 0.070496 +v -0.440307 0.205163 -0.203598 +v -0.440281 0.206327 0.191785 +v -0.339366 0.327086 -0.144329 +v -0.267923 0.418413 0.108270 +v -0.264994 0.405691 -0.113216 +v 0.173823 0.186657 0.424935 +v -0.172109 0.470396 -0.073638 +v -0.090743 0.491063 -0.039539 +v -0.173625 0.180559 0.412022 +v 0.108534 0.404586 0.263698 +v -0.137870 0.317286 0.327397 +v 0.149454 0.342906 0.361857 +v -0.115069 0.426252 0.274637 +v 0.116858 -0.311812 0.284557 +v -0.074459 0.465500 0.178311 +v -0.036397 0.486640 0.094150 +v 0.044199 -0.495759 -0.101459 +v 0.034559 -0.377127 -0.079219 +v 0.116886 -0.299764 -0.276145 +v -0.172864 0.462259 0.069984 +v 0.173974 -0.178414 -0.411782 +v 0.191827 0.042411 -0.453422 +v 0.190055 -0.117435 -0.449613 +v -0.136929 0.321997 -0.339476 +v 0.101567 -0.495759 0.039664 +v 0.076778 -0.365788 0.030191 +v 0.292232 -0.320027 0.121743 +v -0.067752 0.451498 -0.167691 +v 0.433751 -0.189348 0.181586 +v 0.457624 0.044950 0.184732 +v 0.473778 -0.128221 0.198329 +v -0.113891 -0.307852 -0.282552 +v 0.081961 0.458662 -0.191580 +v 0.042947 0.491063 -0.093885 +v 0.109202 0.397842 -0.257691 +v 0.145450 0.328672 -0.343352 +v 0.191241 0.038411 0.444768 +v -0.184306 0.045052 -0.456452 +v -0.289997 -0.318897 0.117161 +v 0.182461 0.185982 -0.431178 +v 0.180190 0.469152 0.074510 +v 0.097292 0.491063 0.039804 +v 0.264954 0.412421 0.110505 +v 0.355939 0.336100 0.148277 +v -0.474575 0.042725 0.191924 +v -0.169486 0.185035 -0.418844 +v -0.445009 -0.118527 0.180804 +v 0.427054 0.187979 0.172057 +v 0.350926 0.339079 -0.143384 +v 0.189060 -0.125023 0.462241 +v 0.269270 -0.290650 -0.109472 +v 0.175816 -0.186803 0.429367 +v 0.259570 0.406980 -0.105942 +v -0.103158 0.398344 -0.255462 +v -0.339105 0.330270 0.137302 +v -0.186029 -0.123369 -0.460126 +v -0.418539 -0.180131 0.169838 +v 0.041492 0.491063 0.094145 +v 0.487251 0.041118 -0.191308 +v 0.173059 0.459504 -0.070716 +v 0.460259 0.206607 -0.196213 +v 0.108065 0.487446 -0.045199 +v -0.103423 0.491173 0.040772 +v -0.040665 0.496765 -0.107957 +v -0.070153 -0.343292 0.028053 +v -0.028215 -0.347521 -0.072596 +v 0.028031 -0.329368 0.067986 +v 0.075170 -0.358957 -0.031186 +v -0.037332 -0.495759 -0.099759 +v 0.099867 -0.495759 -0.041867 +v -0.095225 -0.495759 0.037440 +v 0.041974 -0.495759 0.095332 +v 0.001777 0.503796 -0.003546 +v 0.002321 -0.495758 -0.002214 +vt 0.875000 0.281250 +vt 1.000000 0.281250 +vt 1.000000 0.421875 +vt 0.875000 0.421875 +vt 0.375000 0.125000 +vt 0.500000 0.125000 +vt 0.500000 0.234375 +vt 0.375000 0.234375 +vt 0.625000 0.234375 +vt 0.625000 0.281250 +vt 0.500000 0.281250 +vt 0.500000 0.609375 +vt 0.500000 0.656250 +vt 0.375000 0.656250 +vt 0.375000 0.609375 +vt 0.625000 0.421875 +vt 0.500000 0.421875 +vt 0.375000 0.281250 +vt 0.375000 0.421875 +vt 0.125000 0.609375 +vt 0.125000 0.656250 +vt 0.000000 0.656250 +vt 0.000000 0.609375 +vt 0.846670 0.983596 +vt 0.823789 0.862038 +vt 0.861831 0.862038 +vt 0.500000 0.531250 +vt 0.375000 0.531250 +vt 0.234375 0.609375 +vt 0.234375 0.531250 +vt 0.875000 0.234375 +vt 0.750000 0.234375 +vt 0.750000 0.125000 +vt 0.875000 0.125000 +vt 0.125000 0.234375 +vt 0.125000 0.125000 +vt 0.234375 0.125000 +vt 0.234375 0.234375 +vt 0.125000 0.281250 +vt 0.234375 0.281250 +vt 0.234375 0.421875 +vt 0.125000 0.421875 +vt 0.125000 0.703125 +vt 0.000000 0.703125 +vt 0.875000 0.656250 +vt 0.750000 0.656250 +vt 0.750000 0.609375 +vt 0.875000 0.609375 +vt 0.625000 0.656250 +vt 0.625000 0.609375 +vt 0.234375 0.656250 +vt 0.375000 0.703125 +vt 0.234375 0.703125 +vt 0.125000 0.531250 +vt 0.875000 0.531250 +vt 1.000000 0.531250 +vt 1.000000 0.609375 +vt 0.500000 0.703125 +vt 0.000000 0.421875 +vt 0.000000 0.531250 +vt 0.875000 0.703125 +vt 0.750000 0.703125 +vt 0.328125 0.812500 +vt 0.328125 0.875000 +vt 0.265625 0.890625 +vt 0.265625 0.781250 +vt 0.750000 0.531250 +vt 1.000000 0.234375 +vt -0.000000 0.281250 +vt 0.000000 0.234375 +vt 0.375000 0.921875 +vt 0.328125 0.984375 +vt 0.562500 0.812500 +vt 0.500000 0.828125 +vt 0.625000 0.125000 +vt 0.625000 0.531250 +vt 0.970570 0.983596 +vt 0.918853 0.862038 +vt 0.983390 0.862038 +vt 1.000000 0.703125 +vt 1.000000 0.656250 +vt 0.694849 0.983596 +vt 0.653099 0.862038 +vt 0.703461 0.862038 +vt 0.453125 1.000000 +vt 0.437500 0.937500 +vt 0.546875 0.937500 +vt 0.375000 0.765625 +vt 0.625000 0.703125 +vt 0.750000 0.281250 +vt 0.000000 0.125000 +vt 0.781059 0.974219 +vt 0.740272 0.862038 +vt 0.773590 0.862038 +vt 0.823762 0.862067 +vt 0.773656 0.862066 +vt 0.800723 0.801332 +vt 0.750000 0.421875 +vt 1.000000 0.125000 +vt 0.881508 0.980225 +vt 0.923791 0.982865 +vt 0.819499 0.959318 +vt 0.634200 0.973424 +vt 0.659430 0.971277 +vt 0.724959 0.956989 +vt 0.755822 0.968617 +vt 0.125000 0.000000 +vt 0.234375 0.000000 +vt 0.375000 0.000000 +vt 0.500000 0.000000 +vt 0.750000 0.000000 +vt 0.875000 0.000000 +vt 1.000000 0.000000 +vt 0.625000 0.000000 +vt 0.000000 0.000000 +vt 0.618713 0.862038 +vt 0.453125 0.781250 +vt 0.484375 0.890625 +vt 0.406250 0.859375 +vt 0.738525 0.828462 +vt 0.741806 0.778103 +vt 0.777683 0.740596 +vt 0.827789 0.740597 +vt 0.862920 0.774201 +vt 0.859639 0.824560 +s off +f 63/1 10/2 13/3 61/4 +f 67/5 35/6 37/7 3/8 +f 9/9 72/10 39/11 37/7 +f 52/12 51/13 69/14 65/15 +f 72/10 54/16 38/17 39/11 +f 1/18 39/11 38/17 75/19 +f 28/20 26/21 29/22 27/23 +f 82/24 33/25 85/26 +f 75/19 38/17 56/27 77/28 +f 77/28 65/15 60/29 64/30 +f 73/31 4/32 6/33 55/34 +f 68/35 30/36 43/37 45/38 +f 66/39 47/40 46/41 53/42 +f 11/43 31/44 29/22 26/21 +f 20/45 21/46 19/47 71/48 +f 70/49 40/50 19/47 21/46 +f 59/51 69/14 76/52 57/53 +f 3/8 37/7 39/11 1/18 +f 28/20 22/54 64/30 60/29 +f 71/48 18/55 25/56 27/57 +f 69/14 51/13 49/58 76/52 +f 13/59 53/42 22/54 25/60 +f 36/61 23/62 21/46 20/45 +f 58/63 74/64 11/65 57/66 +f 57/53 11/43 26/21 59/51 +f 19/47 17/67 18/55 71/48 +f 73/31 12/68 10/2 63/1 +f 68/35 66/39 10/69 12/70 +f 74/64 32/71 31/72 11/65 +f 53/42 46/41 64/30 22/54 +f 25/56 18/55 61/4 13/3 +f 49/58 44/73 80/74 +f 45/38 3/8 1/18 47/40 +f 9/9 48/75 6/33 4/32 +f 62/76 40/50 52/12 56/27 +f 81/77 7/78 87/79 +f 31/80 36/61 20/45 29/81 +f 83/82 15/83 88/84 +f 36/85 79/86 23/87 +f 78/88 58/63 57/66 +f 17/67 19/47 40/50 62/76 +f 45/38 47/40 66/39 68/35 +f 51/13 70/49 44/89 49/58 +f 4/32 73/31 63/1 2/90 +f 12/70 14/91 30/36 68/35 +f 84/92 41/93 86/94 +f 33/95 86/96 90/97 +f 70/49 21/46 23/62 44/89 +f 54/16 62/76 56/27 38/17 +f 29/81 20/45 71/48 27/57 +f 37/7 35/6 48/75 9/9 +f 5/98 17/67 62/76 54/16 +f 18/55 17/67 5/98 61/4 +f 10/69 66/39 53/42 13/59 +f 12/68 73/31 55/34 14/99 +f 51/13 52/12 40/50 70/49 +f 27/23 25/60 22/54 28/20 +f 65/15 69/14 59/51 60/29 +f 56/27 52/12 65/15 77/28 +f 46/41 75/19 77/28 64/30 +f 60/29 59/51 26/21 28/20 +f 47/40 1/18 75/19 46/41 +f 2/90 5/98 54/16 72/10 +f 4/32 2/90 72/10 9/9 +f 43/37 67/5 3/8 45/38 +f 2/90 63/1 61/4 5/98 +f 82/100 7/78 8/101 +f 82/24 34/102 33/25 +f 81/103 15/83 16/104 +f 81/77 8/101 7/78 +f 83/82 41/93 42/105 +f 83/82 16/104 15/83 +f 84/92 33/25 34/102 +f 84/92 42/106 41/93 +f 30/36 83/107 42/108 43/37 +f 42/108 84/109 67/5 43/37 +f 67/5 84/109 34/110 35/6 +f 55/34 6/33 8/111 81/112 +f 55/34 81/112 16/113 14/99 +f 34/110 82/114 48/75 35/6 +f 48/75 82/114 8/111 6/33 +f 30/36 14/91 16/115 83/107 +f 7/78 82/100 85/26 +f 15/83 81/103 87/116 +f 41/93 83/82 88/84 +f 33/25 84/92 86/94 +f 80/74 50/117 49/58 +f 23/87 24/118 80/74 +f 80/74 44/73 23/87 +f 79/86 36/85 31/72 +f 79/86 24/118 23/87 +f 31/72 32/71 79/86 +f 78/88 49/58 50/117 +f 78/88 57/66 76/52 +f 76/52 49/58 78/88 +f 24/118 79/86 89/119 +f 79/86 32/71 89/119 +f 32/71 74/64 89/119 +f 74/64 58/63 89/119 +f 58/63 78/88 89/119 +f 78/88 50/117 89/119 +f 50/117 80/74 89/119 +f 80/74 24/118 89/119 +f 86/96 41/120 90/97 +f 41/120 88/121 90/97 +f 88/121 15/122 90/97 +f 15/122 87/123 90/97 +f 87/123 7/124 90/97 +f 7/124 85/125 90/97 +f 85/125 33/95 90/97 diff --git a/plantlife_modpack/bushes_classic/nodes.lua b/plantlife_modpack/bushes_classic/nodes.lua new file mode 100644 index 0000000..352e2a9 --- /dev/null +++ b/plantlife_modpack/bushes_classic/nodes.lua @@ -0,0 +1,214 @@ +local S = biome_lib.intllib + +plantlife_bushes = {} + +-- TODO: add support for nodebreakers? those dig like mese picks +plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger) + if not (digger and pos and oldnode) then + return + end + + -- find out which bush type we are dealing with + local bush_name = "" + local can_harvest = false + + if oldnode.name == "bushes:fruitless_bush" then + -- this bush has not grown fruits yet (but will eventually) + bush_name = oldmetadata.fields.bush_type + -- no fruits to be found, so can_harvest stays false + else + local name_parts = oldnode.name:split(":") + if #name_parts >= 2 and name_parts[2] ~= nil then + + name_parts = name_parts[2]:split("_") + + if #name_parts >= 2 and name_parts[1] ~= nil then + bush_name = name_parts[1] + -- this bush really carries fruits + can_harvest = true + end + end + end + + -- find out which tool the digger was wielding (if any) + local toolstack = digger:get_wielded_item() + local capabilities = toolstack:get_tool_capabilities() + + -- what the player will get + local harvested + + -- failure to find out what the tool can do: destroy the bush and return nothing + local groupcaps = capabilities.groupcaps + if not groupcaps then + return + + -- digging with the hand or something like that + elseif groupcaps.snappy then + + -- plant a new bush without fruits + minetest.set_node(pos, {type = "node", name = "bushes:fruitless_bush"}) + local meta = minetest.get_meta(pos) + meta:set_string('bush_type', bush_name) + + -- construct the stack of fruits the player will get + -- only bushes that have grown fruits can actually give fruits + if can_harvest then + local amount = "4" + harvested = "bushes:" .. bush_name .. " " .. amount + end + + -- something like a shovel + elseif groupcaps.crumbly then + + -- with a chance of 1/3, return 2 bushes + local amount + if math.random(1,3) == 1 then + amount = "2" + else + amount = "1" + end + -- return the bush itself + harvested = "bushes:" .. bush_name .. "_bush "..amount + + -- something like an axe + elseif groupcaps.choppy then + + -- the amount of sticks may vary + local amount = math.random(4, 20) + -- return some sticks + harvested = "default:stick " .. amount + + -- nothing known - destroy the plant + else + return + end + + -- give the harvested result to the player + if harvested then + --minetest.chat_send_player("singleplayer","you would now get "..tostring( harvested ) ); + local itemstack = ItemStack(harvested) + local inventory = digger:get_inventory() + if inventory:room_for_item("main", itemstack) then + inventory:add_item("main", itemstack) + else + minetest.item_drop(itemstack, digger, pos) + end + end +end + +plantlife_bushes.after_place_node = function(pos, placer, itemstack) + + if not (itemstack and pos) then + return + end + + local name_parts = itemstack:get_name():split(":") + if #name_parts < 2 or name_parts[2] == nil then + return + end + + name_parts = name_parts[2]:split("_") + + if #name_parts < 2 or name_parts[1] == nil then + return + end + + minetest.set_node(pos, {name = "bushes:fruitless_bush"}) + local meta = minetest.get_meta(pos) + meta:set_string("bush_type", name_parts[1]) +end + +-- regrow berries (uses a base abm instead of biome_lib because of the use of metadata). + +minetest.register_abm({ + nodenames = {"bushes:fruitless_bush"}, + neighbors = {"group:soil", "group:potting_soil"}, + interval = 500, + chance = 5, + action = function(pos, node, active_object_count, active_object_count_wider) + + local meta = minetest.get_meta(pos) + local bush_name = meta:get_string("bush_type") + + if bush_name and bush_name ~= "" then + local dirtpos = {x = pos.x, y = pos.y-1, z = pos.z} + local dirt = minetest.get_node(dirtpos) + local is_soil = minetest.get_item_group(dirt.name, "soil") or minetest.get_item_group(dirt.name, "potting_soil") + + if is_soil and (dirt.name == "farming:soil_wet" or math.random(1,3) == 1) then + minetest.set_node( pos, {name = "bushes:" .. bush_name .. "_bush"}) + end + end + end +}) + +-- Define the basket and bush nodes + +for i, bush_name in ipairs(bushes_classic.bushes) do + + local desc = bushes_classic.bushes_descriptions[i] + + minetest.register_node(":bushes:basket_"..bush_name, { + description = S("Basket with "..desc.." Pies"), + drawtype = "mesh", + mesh = "bushes_basket_full.obj", + tiles = { + "bushes_basket_pie_"..bush_name..".png", + "bushes_basket.png" + }, + paramtype = "light", + paramtype2 = "facedir", + on_use = minetest.item_eat(18), + groups = { dig_immediate = 3 }, + }) + + local texture_top, texture_bottom + + local groups = {snappy = 3, bush = 1, flammable = 2, attached_node=1} + if bush_name == "mixed_berry" then + bush_name = "fruitless"; + desc = S("currently fruitless"); + texture_top = "bushes_fruitless_bush_top.png" + texture_bottom = "bushes_fruitless_bush_bottom.png" + groups.not_in_creative_inventory = 1 + else + texture_top = "bushes_bush_top.png" + texture_bottom = "bushes_bush_bottom.png" + end + + minetest.register_node(":bushes:" .. bush_name .. "_bush", { + description = S(desc.." Bush"), + drawtype = "mesh", + mesh = "bushes_bush.obj", + tiles = {"bushes_bush_"..bush_name..".png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + groups = groups, + sounds = default.node_sound_leaves_defaults(), + drop = "", + after_dig_node = function( pos, oldnode, oldmetadata, digger ) + return plantlife_bushes.after_dig_node(pos, oldnode, oldmetadata, digger); + end, + after_place_node = function( pos, placer, itemstack ) + return plantlife_bushes.after_place_node(pos, placer, itemstack); + end, + }) + + -- do not spawn fruitless bushes + if bush_name ~= "fruitless" then + table.insert(bushes_classic.spawn_list, "bushes:"..bush_name.."_bush") + end +end + +minetest.register_node(":bushes:basket_empty", { + description = S("Basket"), + drawtype = "mesh", + mesh = "bushes_basket_empty.obj", + tiles = { "bushes_basket.png" }, + paramtype = "light", + paramtype2 = "facedir", + groups = { dig_immediate = 3 }, +}) + + diff --git a/plantlife_modpack/bushes_classic/textures/bushes_basket.png b/plantlife_modpack/bushes_classic/textures/bushes_basket.png Binary files differnew file mode 100644 index 0000000..4384fba --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_basket.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_blackberry.png b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_blackberry.png Binary files differnew file mode 100644 index 0000000..83ee63c --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_blackberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_blueberry.png b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_blueberry.png Binary files differnew file mode 100644 index 0000000..9f9b2c6 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_blueberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_gooseberry.png b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_gooseberry.png Binary files differnew file mode 100644 index 0000000..d6bdff4 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_gooseberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_mixed_berry.png b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_mixed_berry.png Binary files differnew file mode 100644 index 0000000..ff271ff --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_mixed_berry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_raspberry.png b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_raspberry.png Binary files differnew file mode 100644 index 0000000..3bfd42f --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_raspberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_strawberry.png b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_strawberry.png Binary files differnew file mode 100644 index 0000000..c27b0b3 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_basket_pie_strawberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blackberry.png b/plantlife_modpack/bushes_classic/textures/bushes_blackberry.png Binary files differnew file mode 100644 index 0000000..76b742b --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blackberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_cooked.png b/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_cooked.png Binary files differnew file mode 100644 index 0000000..a6af5ca --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_cooked.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_raw.png b/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_raw.png Binary files differnew file mode 100644 index 0000000..c37f987 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_raw.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_slice.png b/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_slice.png Binary files differnew file mode 100644 index 0000000..90be80e --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blackberry_pie_slice.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blueberry.png b/plantlife_modpack/bushes_classic/textures/bushes_blueberry.png Binary files differnew file mode 100644 index 0000000..e15047f --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blueberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_cooked.png b/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_cooked.png Binary files differnew file mode 100644 index 0000000..11ce60f --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_cooked.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_raw.png b/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_raw.png Binary files differnew file mode 100644 index 0000000..6e8dd9e --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_raw.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_slice.png b/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_slice.png Binary files differnew file mode 100644 index 0000000..eb6bf5a --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_blueberry_pie_slice.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_bush_blackberry.png b/plantlife_modpack/bushes_classic/textures/bushes_bush_blackberry.png Binary files differnew file mode 100644 index 0000000..fa76c61 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_bush_blackberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_bush_blueberry.png b/plantlife_modpack/bushes_classic/textures/bushes_bush_blueberry.png Binary files differnew file mode 100644 index 0000000..3a305ca --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_bush_blueberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_bush_fruitless.png b/plantlife_modpack/bushes_classic/textures/bushes_bush_fruitless.png Binary files differnew file mode 100644 index 0000000..ffa2e0a --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_bush_fruitless.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_bush_gooseberry.png b/plantlife_modpack/bushes_classic/textures/bushes_bush_gooseberry.png Binary files differnew file mode 100644 index 0000000..52eca60 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_bush_gooseberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_bush_raspberry.png b/plantlife_modpack/bushes_classic/textures/bushes_bush_raspberry.png Binary files differnew file mode 100644 index 0000000..01809de --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_bush_raspberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_bush_strawberry.png b/plantlife_modpack/bushes_classic/textures/bushes_bush_strawberry.png Binary files differnew file mode 100644 index 0000000..a5060e2 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_bush_strawberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_gooseberry.png b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry.png Binary files differnew file mode 100644 index 0000000..e712cad --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_cooked.png b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_cooked.png Binary files differnew file mode 100644 index 0000000..caa4e92 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_cooked.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_raw.png b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_raw.png Binary files differnew file mode 100644 index 0000000..baf5af7 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_raw.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_slice.png b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_slice.png Binary files differnew file mode 100644 index 0000000..5cf2844 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_gooseberry_pie_slice.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_cooked.png b/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_cooked.png Binary files differnew file mode 100644 index 0000000..351a269 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_cooked.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_raw.png b/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_raw.png Binary files differnew file mode 100644 index 0000000..6486989 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_raw.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_slice.png b/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_slice.png Binary files differnew file mode 100644 index 0000000..8844c3d --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_mixed_berry_pie_slice.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_raspberry.png b/plantlife_modpack/bushes_classic/textures/bushes_raspberry.png Binary files differnew file mode 100644 index 0000000..034fd48 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_raspberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_cooked.png b/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_cooked.png Binary files differnew file mode 100644 index 0000000..afeb7d8 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_cooked.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_raw.png b/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_raw.png Binary files differnew file mode 100644 index 0000000..bb76a1d --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_raw.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_slice.png b/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_slice.png Binary files differnew file mode 100644 index 0000000..a094488 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_raspberry_pie_slice.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_strawberry.png b/plantlife_modpack/bushes_classic/textures/bushes_strawberry.png Binary files differnew file mode 100644 index 0000000..b6a74b6 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_strawberry.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_cooked.png b/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_cooked.png Binary files differnew file mode 100644 index 0000000..3d034ea --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_cooked.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_raw.png b/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_raw.png Binary files differnew file mode 100644 index 0000000..932c073 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_raw.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_slice.png b/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_slice.png Binary files differnew file mode 100644 index 0000000..f8d1d36 --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_strawberry_pie_slice.png diff --git a/plantlife_modpack/bushes_classic/textures/bushes_sugar.png b/plantlife_modpack/bushes_classic/textures/bushes_sugar.png Binary files differnew file mode 100644 index 0000000..726196b --- /dev/null +++ b/plantlife_modpack/bushes_classic/textures/bushes_sugar.png diff --git a/plantlife_modpack/cavestuff/depends.txt b/plantlife_modpack/cavestuff/depends.txt new file mode 100644 index 0000000..3a7daa1 --- /dev/null +++ b/plantlife_modpack/cavestuff/depends.txt @@ -0,0 +1,2 @@ +default + diff --git a/plantlife_modpack/cavestuff/init.lua b/plantlife_modpack/cavestuff/init.lua new file mode 100644 index 0000000..f2bed1a --- /dev/null +++ b/plantlife_modpack/cavestuff/init.lua @@ -0,0 +1,12 @@ +----------------------------------------------------------------------------------------------- +local title = "Cave Stuff" +local version = "0.0.3" +local mname = "cavestuff" +----------------------------------------------------------------------------------------------- + +dofile(minetest.get_modpath("cavestuff").."/nodes.lua") +dofile(minetest.get_modpath("cavestuff").."/mapgen.lua") + +----------------------------------------------------------------------------------------------- + +print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") diff --git a/plantlife_modpack/cavestuff/mapgen.lua b/plantlife_modpack/cavestuff/mapgen.lua new file mode 100644 index 0000000..a91a2f0 --- /dev/null +++ b/plantlife_modpack/cavestuff/mapgen.lua @@ -0,0 +1,52 @@ +--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 + + 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.set_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)}) + elseif nn == "default:desert_sand" then + minetest.set_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)}) + end + end + end + + end + end + end + end +end) diff --git a/plantlife_modpack/cavestuff/models/cavestuff_pebble.obj b/plantlife_modpack/cavestuff/models/cavestuff_pebble.obj new file mode 100644 index 0000000..243d1ce --- /dev/null +++ b/plantlife_modpack/cavestuff/models/cavestuff_pebble.obj @@ -0,0 +1,279 @@ +# Blender v2.69 (sub 0) OBJ File: '' +# www.blender.org +mtllib cavestuff_pebble.mtl +o Icosphere.001_Icosphere.002 +v -0.000327 -0.410467 0.180121 +v -0.235610 -0.410468 0.155391 +v -0.284796 -0.410468 -0.076018 +v -0.121985 -0.209219 0.205980 +v -0.284738 -0.218753 0.040139 +v -0.201573 -0.219323 -0.168447 +v -0.100950 -0.116906 0.005837 +v -0.088586 -0.496875 -0.111804 +v -0.196648 -0.428134 -0.159917 +v -0.209011 -0.497294 -0.042276 +v -0.041805 -0.497429 0.108278 +v -0.180101 -0.487871 0.093742 +v -0.120956 -0.428134 0.196184 +v -0.288163 -0.428135 0.045629 +v -0.147553 -0.309844 -0.213938 +v -0.268157 -0.309844 -0.144718 +v -0.192465 -0.309844 0.211384 +v -0.054169 -0.309844 0.225920 +v -0.324717 -0.309844 -0.017682 +v -0.288965 -0.319377 0.114387 +v -0.023183 -0.210866 0.195570 +v -0.221888 -0.201086 0.143956 +v -0.275798 -0.233149 -0.072011 +v -0.160094 -0.150509 -0.096605 +v -0.113314 -0.150508 0.123477 +v -0.216653 -0.160042 0.030431 +v 0.073364 -0.397538 -0.267606 +v 0.268711 -0.397538 -0.091716 +v 0.161795 -0.397537 0.148424 +v 0.199614 -0.173928 -0.211396 +v 0.254265 -0.173928 0.045725 +v 0.026620 -0.195887 0.177156 +v -0.061812 -0.173929 -0.238874 +v 0.049992 -0.055394 -0.045225 +v 0.178551 -0.485125 -0.072552 +v 0.063729 -0.498396 -0.175936 +v 0.192289 -0.417167 -0.203264 +v -0.056339 -0.417167 -0.229396 +v -0.070077 -0.496109 -0.098684 +v 0.115708 -0.497252 0.068599 +v 0.244268 -0.417167 0.041273 +v 0.027763 -0.417167 0.166272 +v -0.001987 -0.285733 -0.289762 +v -0.109557 -0.285733 -0.245455 +v 0.258217 -0.285733 -0.165444 +v 0.151676 -0.285733 -0.273611 +v 0.235777 -0.285733 0.122059 +v 0.298622 -0.285733 -0.019093 +v 0.101971 -0.285733 0.199312 +v 0.072221 -0.154299 -0.256722 +v 0.258006 -0.154298 -0.089439 +v 0.156323 -0.154299 0.138946 +v 0.137937 -0.086893 -0.142897 +v -0.015725 -0.073070 -0.159049 +v 0.170060 -0.073069 0.008234 +v 0.036254 -0.095028 0.085487 +v -0.059660 -0.090744 -0.028814 +v -0.016904 -0.495185 -0.020480 +v -0.038530 -0.134593 0.104482 +v 0.018559 -0.297788 0.203363 +vt 0.999784 0.777888 +vt 0.781916 0.751069 +vt 0.930695 0.535842 +vt 0.718554 0.493678 +vt 0.498343 0.500066 +vt 0.612704 0.301958 +vt 0.278288 0.491767 +vt 0.136170 0.301428 +vt 0.385039 0.315647 +vt 0.861174 0.302958 +vt 0.817615 0.924676 +vt 0.662334 0.996212 +vt 0.719667 0.785775 +vt 0.955856 0.540882 +vt 0.919844 0.749017 +vt 0.810792 0.580191 +vt 0.698724 0.249779 +vt 0.882029 0.358101 +vt 0.648319 0.423681 +vt 0.738504 0.311189 +vt 0.859769 0.100574 +vt 0.955856 0.301223 +vt 0.603011 0.109855 +vt 0.889116 0.979094 +vt 0.625593 0.954685 +vt 0.572947 0.723101 +vt 0.629662 0.708272 +vt 0.361849 0.694965 +vt 0.626863 0.523494 +vt 0.877334 0.514944 +vt 0.753445 0.687054 +vt 0.678897 0.522004 +vt 0.804007 0.322784 +vt 0.508145 0.125975 +vt 0.614686 0.322544 +vt 0.274631 0.088482 +vt 0.046907 0.080882 +vt 0.724191 0.150589 +vt 0.955856 0.101994 +vt 0.459738 0.810380 +vt 0.524431 0.596612 +vt 0.614955 0.619521 +vt 0.385224 0.455707 +vt 0.518113 0.743431 +vt 0.397247 0.481913 +vt 0.473092 0.333636 +vt 0.593136 0.806842 +vt 0.542133 0.566645 +vt 0.245991 0.361941 +vt 0.291514 0.126530 +vt 0.515385 0.289890 +vt 0.348981 0.560141 +vt 0.480373 0.537386 +vt 0.705144 0.472239 +vt 0.601667 0.722403 +vt 0.283471 0.700220 +vt 0.061144 0.812481 +vt 0.120014 0.502516 +vt 0.080353 0.535703 +vt 0.356859 0.719702 +vt 0.417004 0.243099 +vt 0.001005 0.468262 +vt 0.186797 0.314823 +vt 0.187216 0.555587 +vt 0.094383 0.931756 +vt 0.003057 0.709324 +vt 0.238065 0.772821 +vt 0.569632 0.999536 +vt 0.323797 1.000000 +vt 0.482075 0.313011 +vt 0.735871 0.182001 +vt 0.032983 0.251846 +vt 0.574313 0.080491 +vt 0.318361 0.961238 +vt 0.229901 0.178033 +vt 0.256609 0.467686 +vt 0.464307 0.768933 +vt 0.865183 0.712997 +vt 0.725052 0.926500 +vt 0.093408 0.705147 +vt 0.230523 0.921209 +vt 0.968797 0.984796 +vt 0.210756 0.792236 +vt 0.477482 0.962103 +vt 0.256493 0.223509 +vt 0.000000 0.255402 +vt 0.543998 0.500902 +vt 0.362414 0.637562 +vt 0.469769 0.648982 +vt 0.379376 0.894841 +vt 0.246514 0.544201 +vt 0.117965 0.884444 +vt 0.047032 0.632888 +vt 0.079441 0.605161 +vt 0.000000 0.325670 +vt 0.241712 0.163133 +vt 0.470206 0.343559 +usemtl None +s off +f 2/1 13/2 17/3 +f 3/4 14/5 19/6 +f 2/7 17/8 20/9 +f 3/4 19/6 16/10 +f 4/11 21/12 25/13 +f 5/14 22/15 26/16 +f 6/17 23/18 24/19 +f 9/20 10/21 3/22 +f 9/20 8/23 10/21 +f 12/24 13/2 2/1 +f 12/24 11/25 13/2 +f 11/25 1/26 13/2 +f 10/27 14/5 3/4 +f 10/27 12/28 14/5 +f 12/28 2/7 14/5 +f 15/29 16/30 6/31 +f 15/29 9/20 16/30 +f 9/20 3/22 16/30 +f 17/3 18/32 4/33 +f 17/3 13/2 18/32 +f 13/2 1/26 18/32 +f 19/6 20/9 5/34 +f 19/6 14/5 20/9 +f 14/5 2/7 20/9 +f 18/32 21/35 4/33 +f 20/9 22/36 5/34 +f 20/9 17/8 22/36 +f 17/8 4/37 22/36 +f 16/10 23/38 6/39 +f 16/10 19/6 23/38 +f 19/6 5/34 23/38 +f 56/40 57/41 7/42 +f 57/41 54/43 24/19 +f 1/26 42/44 49/45 +f 38/46 9/20 15/29 +f 25/13 21/12 59/47 +f 15/29 6/31 44/48 +f 26/16 25/13 7/42 +f 26/16 22/15 25/13 +f 22/15 4/11 25/13 +f 24/19 26/16 7/42 +f 24/19 23/18 26/16 +f 23/18 5/14 26/16 +f 27/49 36/50 38/46 +f 32/51 21/35 49/45 +f 27/49 38/46 43/52 +f 28/53 37/54 45/55 +f 29/56 41/57 47/58 +f 1/26 11/25 42/44 +f 27/49 43/52 46/59 +f 28/53 45/55 48/60 +f 29/56 47/58 49/45 +f 6/17 24/19 33/61 +f 30/62 50/63 53/64 +f 31/65 51/66 55/67 +f 32/68 52/69 56/40 +f 35/70 37/54 28/53 +f 35/70 36/71 37/54 +f 36/50 27/49 37/72 +f 9/20 38/46 8/23 +f 38/46 36/50 39/73 +f 40/74 41/57 29/56 +f 40/75 35/70 41/76 +f 35/70 28/53 41/76 +f 44/48 38/46 15/29 +f 38/46 39/73 8/23 +f 40/74 29/56 42/44 +f 43/52 44/48 33/77 +f 43/52 38/46 44/48 +f 45/55 46/78 30/79 +f 45/55 37/54 46/78 +f 37/72 27/49 46/59 +f 47/80 48/60 31/81 +f 47/80 41/76 48/60 +f 41/76 28/53 48/60 +f 11/25 40/74 42/44 +f 42/44 29/56 49/45 +f 46/78 50/82 30/79 +f 46/59 43/52 50/83 +f 43/52 33/77 50/83 +f 48/60 51/84 31/81 +f 48/60 45/55 51/84 +f 45/55 30/79 51/84 +f 49/45 52/85 32/51 +f 49/45 47/58 52/85 +f 47/58 31/86 52/85 +f 18/32 1/26 60/87 +f 21/35 18/32 60/87 +f 6/31 33/77 44/48 +f 53/64 54/43 34/88 +f 53/64 50/63 54/43 +f 50/63 33/61 54/43 +f 55/67 53/64 34/88 +f 55/67 51/66 53/64 +f 51/66 30/62 53/64 +f 56/40 55/67 34/88 +f 56/40 52/69 55/67 +f 52/69 31/65 55/67 +f 57/41 56/40 34/88 +f 21/12 32/68 56/40 +f 25/13 59/47 7/42 +f 54/43 57/41 34/88 +f 7/42 57/41 24/19 +f 33/61 24/19 54/43 +f 11/89 12/90 58/91 +f 12/90 10/92 58/91 +f 10/92 8/93 58/91 +f 8/93 39/94 58/91 +f 39/94 36/95 58/91 +f 36/95 35/96 58/91 +f 35/96 40/97 58/91 +f 40/97 11/89 58/91 +f 21/12 56/40 59/47 +f 59/47 56/40 7/42 +f 1/26 49/45 60/87 +f 49/45 21/35 60/87 diff --git a/plantlife_modpack/cavestuff/nodes.lua b/plantlife_modpack/cavestuff/nodes.lua new file mode 100644 index 0000000..dc537cf --- /dev/null +++ b/plantlife_modpack/cavestuff/nodes.lua @@ -0,0 +1,145 @@ +--Rocks + +local cbox = { + type = "fixed", + fixed = {-5/16, -8/16, -6/16, 5/16, -1/32, 5/16}, +} + +minetest.register_node("cavestuff:pebble_1",{ + description = "Pebble", + drawtype = "mesh", + mesh = "cavestuff_pebble.obj", + 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) + -- 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(), +}) + +minetest.register_node("cavestuff:pebble_2",{ + drawtype = "mesh", + mesh = "cavestuff_pebble.obj", + tiles = {"undergrowth_pebble.png"}, + drop = "cavestuff:pebble_1", + tiles = {"undergrowth_pebble.png"}, + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=3, stone=1, not_in_creative_inventory=1}, + selection_box = cbox, + collision_box = cbox, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("cavestuff:desert_pebble_1",{ + description = "Desert Pebble", + drawtype = "mesh", + mesh = "cavestuff_pebble.obj", + tiles = {"default_desert_stone.png"}, + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=3, stone=1}, + selection_box = cbox, + collision_box = cbox, + 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(), +}) + +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", + paramtype2 = "facedir", + groups = {cracky=3, stone=1, not_in_creative__inventory=1}, + selection_box = cbox, + collision_box = cbox, + sounds = default.node_sound_stone_defaults(), +}) + +--Staclactites + +minetest.register_node("cavestuff:stalactite_1",{ + drawtype="nodebox", + tiles = {"undergrowth_pebble.png"}, + groups = {cracky=3,attached_node=1}, + description = "Stalactite", + paramtype = "light", + paramtype2 = "wallmounted", + 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}, + } + }, + + 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.set_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + end + return itemstack + end, +}) + +minetest.register_node("cavestuff:stalactite_2",{ + drawtype="nodebox", + tiles = {"undergrowth_pebble.png"}, + groups = {cracky=3,attached_node=1,not_in_creative_inventory=1}, + drop = "cavestuff:stalactite_1", + paramtype = "light", + paramtype2 = "wallmounted", + 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}, + } + }, +}) + +minetest.register_node("cavestuff:stalactite_3",{ + drawtype="nodebox", + tiles = {"undergrowth_pebble.png"}, + groups = {cracky=3,attached_node=1,not_in_creative_inventory=1}, + drop = "cavestuff:stalactite_1", + 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}, + } + }, +}) + +--Stalagmites + + + diff --git a/plantlife_modpack/cavestuff/textures/undergrowth_desert_pebble.png b/plantlife_modpack/cavestuff/textures/undergrowth_desert_pebble.png Binary files differnew file mode 100644 index 0000000..966e937 --- /dev/null +++ b/plantlife_modpack/cavestuff/textures/undergrowth_desert_pebble.png diff --git a/plantlife_modpack/cavestuff/textures/undergrowth_pebble.png b/plantlife_modpack/cavestuff/textures/undergrowth_pebble.png Binary files differnew file mode 100644 index 0000000..306ca6a --- /dev/null +++ b/plantlife_modpack/cavestuff/textures/undergrowth_pebble.png diff --git a/plantlife_modpack/copyright.txt b/plantlife_modpack/copyright.txt new file mode 100644 index 0000000..63d2431 --- /dev/null +++ b/plantlife_modpack/copyright.txt @@ -0,0 +1,10 @@ +Ironzorg's Flowers mod served as the basis for the three mods that eventually +went into creating this file. Any code still remaining from that mod is +entirely his work (though I'm pretty sure it's all been phased out). + +Flowers textures by Ironzorg. + +Junglegrass textures are modified copies of the original one from the game's +default set. + +All remaining code, textures, etc. by Vanessa Ezekowitz. diff --git a/plantlife_modpack/dryplants/crafting.lua b/plantlife_modpack/dryplants/crafting.lua new file mode 100644 index 0000000..69154b5 --- /dev/null +++ b/plantlife_modpack/dryplants/crafting.lua @@ -0,0 +1,360 @@ +-----------------------------------------------------------------------------------------------
+-- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Looked at code from: darkage, default, farming, sickle, stairs
+-- Dependencies: default, farming
+-- Supports: flint, stoneage, sumpf
+-----------------------------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------------------------
+-- Short Grass
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({
+ output = "default:dirt",
+ recipe = {
+ {"dryplants:grass_short"},
+ }
+})
+
+-----------------------------------------------------------------------------------------------
+-- Cut Grass
+-----------------------------------------------------------------------------------------------
+-- grass recipes (remove roots)
+minetest.register_craft({
+ output = "dryplants:grass",
+ recipe = {
+ {"default:grass_1"},
+ }
+})
+minetest.register_craft({
+ output = "dryplants:grass",
+ recipe = {
+ {"default:junglegrass"},
+ }
+})
+if minetest.get_modpath("sumpf") ~= nil then
+ minetest.register_craft({
+ output = "dryplants:grass",
+ recipe = {
+ {"sumpf:gras"},
+ }
+ })
+end
+
+-----------------------------------------------------------------------------------------------
+-- Sickle
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({
+ output = "dryplants:sickle",
+ recipe = {
+ {"group:stone",""},
+ {"", "default:stick"},
+ {"default:stick",""}
+ }
+})
+if minetest.get_modpath("flint") ~= nil then
+ minetest.register_craft({
+ output = "dryplants:sickle",
+ recipe = {
+ {"flint:flintstone",""},
+ {"", "default:stick"},
+ {"default:stick",""}
+ }
+ })
+end
+if minetest.get_modpath("stoneage") ~= nil then
+ minetest.register_craft({
+ output = "dryplants:sickle",
+ recipe = {
+ {"stoneage:silex",""},
+ {"", "default:stick"},
+ {"default:stick",""}
+ }
+ })
+end
+
+-----------------------------------------------------------------------------------------------
+-- Hay
+-----------------------------------------------------------------------------------------------
+--cooking
+minetest.register_craft({
+ type = "cooking",
+ output = "dryplants:hay",
+ recipe = "dryplants:grass",
+ cooktime = 2,
+})
+
+minetest.register_craft({
+ type = "fuel",
+ recipe = "dryplants:hay",
+ burntime = 1,
+})
+
+-----------------------------------------------------------------------------------------------
+-- Wet Reed
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({ -- papyrus -> wetreed
+ output = "dryplants:wetreed 2",
+ recipe = {
+ {"default:papyrus","default:papyrus"},
+ {"default:papyrus","default:papyrus"},
+ }
+})
+minetest.register_craft({ -- reedmace_sapling -> wetreed
+ output = "dryplants:wetreed 2",
+ recipe = {
+ {"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
+ {"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
+ }
+})
+minetest.register_craft({ -- reedmace_top -> wetreed
+ output = "dryplants:wetreed 2",
+ recipe = {
+ {"dryplants:reedmace_top","dryplants:reedmace_top"},
+ {"dryplants:reedmace_top","dryplants:reedmace_top"},
+ }
+})
+minetest.register_craft({ -- reedmace -> wetreed
+ output = "dryplants:wetreed 2",
+ recipe = {
+ {"dryplants:reedmace","dryplants:reedmace"},
+ {"dryplants:reedmace","dryplants:reedmace"},
+ }
+})
+minetest.register_craft({ -- reedmace_bottom -> wetreed
+ output = "dryplants:wetreed 2",
+ recipe = {
+ {"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
+ {"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
+ }
+})
+
+
+local ReeD = {
+ {"wetreed"},
+ {"reed"}
+}
+for i in pairs(ReeD) do
+ local reed = "dryplants:"..ReeD[i][1]
+ local slab = reed.."_slab"
+ local roof = reed.."_roof"
+ local corner = roof.."_corner"
+ local corner_2 = corner.."_2"
+-----------------------------------------------------------------------------------------------
+-- Block
+-----------------------------------------------------------------------------------------------
+ minetest.register_craft({ -- slab -> block
+ output = reed,
+ recipe = {
+ {slab},
+ {slab},
+ }
+ })
+ minetest.register_craft({ -- roof -> block
+ output = reed,
+ recipe = {
+ {roof},
+ {roof},
+ }
+ })
+ minetest.register_craft({ -- corner -> block
+ type = "shapeless",
+ output = reed.." 3",
+ recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
+ })
+ minetest.register_craft({ -- corner_2 -> block
+ type = "shapeless",
+ output = reed.." 3",
+ recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
+ })
+-----------------------------------------------------------------------------------------------
+-- Slab
+-----------------------------------------------------------------------------------------------
+ minetest.register_craft({ -- block -> slab
+ output = slab.." 6",
+ recipe = {
+ {reed,reed,reed},
+ }
+ })
+ minetest.register_craft({ -- roof -> slab
+ output = slab,
+ recipe = {
+ {roof},
+ }
+ })
+ minetest.register_craft({ -- corner -> slab
+ output = slab.." 3",
+ recipe = {
+ {corner,corner},
+ {corner,corner},
+ }
+ })
+ minetest.register_craft({ -- corner_2 -> slab
+ output = slab.." 3",
+ recipe = {
+ {corner_2,corner_2},
+ {corner_2,corner_2},
+ }
+ })
+-----------------------------------------------------------------------------------------------
+-- Roof
+-----------------------------------------------------------------------------------------------
+ minetest.register_craft({ -- block -> roof
+ output = roof.." 4",
+ recipe = {
+ {reed,""},
+ {"",reed},
+ }
+ })
+ minetest.register_craft({ -- block -> roof
+ output = roof.." 4",
+ recipe = {
+ {"",reed},
+ {reed,""},
+ }
+ })
+ minetest.register_craft({ -- slab -> roof
+ output = roof,
+ recipe = {
+ {slab},
+ }
+ })
+-----------------------------------------------------------------------------------------------
+-- Roof Corner
+-----------------------------------------------------------------------------------------------
+ minetest.register_craft({ -- block -> corner
+ output = corner.." 8",
+ recipe = {
+ {"",reed,""},
+ {reed,"",reed},
+ }
+ })
+ minetest.register_craft({ -- corner_2 -> corner
+ output = corner,
+ recipe = {
+ {corner_2},
+ }
+ })
+-----------------------------------------------------------------------------------------------
+-- Roof Corner 2
+-----------------------------------------------------------------------------------------------
+ minetest.register_craft({ -- block -> corner_2
+ output = corner_2.." 8",
+ recipe = {
+ {reed,"",reed},
+ {"",reed,""},
+ }
+ })
+ minetest.register_craft({ -- corner -> corner_2
+ output = corner_2,
+ recipe = {
+ {corner},
+ }
+ })
+end
+
+-----------------------------------------------------------------------------------------------
+-- Reed
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({ -- hay -> reed
+ output = "dryplants:reed 2",
+ recipe = {
+ {"dryplants:hay","dryplants:hay"},
+ {"dryplants:hay","dryplants:hay"},
+ }
+})
+--cooking
+minetest.register_craft({ -- wetreed -> reed
+ type = "cooking",
+ output = "dryplants:reed",
+ recipe = "dryplants:wetreed",
+ cooktime = 2,
+})
+--fuel
+minetest.register_craft({
+ type = "fuel",
+ recipe = "dryplants:reed",
+ burntime = 4,
+})
+-----------------------------------------------------------------------------------------------
+-- Reed Slab
+-----------------------------------------------------------------------------------------------
+--cooking
+minetest.register_craft({ -- wetreed_slab -> reed_slab
+ type = "cooking",
+ output = "dryplants:reed_slab",
+ recipe = "dryplants:wetreed_slab",
+ cooktime = 1,
+})
+--fuel
+minetest.register_craft({
+ type = "fuel",
+ recipe = "dryplants:reed_slab",
+ burntime = 2,
+})
+-----------------------------------------------------------------------------------------------
+-- Reed Roof
+-----------------------------------------------------------------------------------------------
+--cooking
+minetest.register_craft({ -- wetreed_roof -> reed_roof
+ type = "cooking",
+ output = "dryplants:reed_roof",
+ recipe = "dryplants:wetreed_roof",
+ cooktime = 1,
+})
+--fuel
+minetest.register_craft({
+ type = "fuel",
+ recipe = "dryplants:reed_roof",
+ burntime = 2,
+})
+-----------------------------------------------------------------------------------------------
+-- Reed Roof Corner
+-----------------------------------------------------------------------------------------------
+--cooking
+minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
+ type = "cooking",
+ output = "dryplants:reed_roof_corner",
+ recipe = "dryplants:wetreed_roof_corner",
+ cooktime = 1,
+})
+--fuel
+minetest.register_craft({
+ type = "fuel",
+ recipe = "dryplants:reed_roof_corner",
+ burntime = 2,
+})
+-----------------------------------------------------------------------------------------------
+-- Wet Reed Roof Corner 2
+-----------------------------------------------------------------------------------------------
+--cooking
+minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
+ type = "cooking",
+ output = "dryplants:reed_roof_corner_2",
+ recipe = "dryplants:wetreed_roof_corner_2",
+ cooktime = 1,
+})
+--fuel
+minetest.register_craft({
+ type = "fuel",
+ recipe = "dryplants:reed_roof_corner_2",
+ burntime = 2,
+})
+-----------------------------------------------------------------------------------------------
+-- Dandelion Leave
+-----------------------------------------------------------------------------------------------
+--[[minetest.register_craftitem("dryplants:dandelion_leave", {
+ description = "Dandelion Leave",
+ inventory_image = "dryplants_dandelion_leave.png",
+ on_use = minetest.item_eat(1),
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "dryplants:dandelion_leave 4",
+ recipe = {"flowers:dandelion_yellow"},
+ replacements = {
+ {"flowers:dandelion_yellow", "dye:yellow"}
+ },
+})]]
\ No newline at end of file diff --git a/plantlife_modpack/dryplants/depends.txt b/plantlife_modpack/dryplants/depends.txt new file mode 100644 index 0000000..059033e --- /dev/null +++ b/plantlife_modpack/dryplants/depends.txt @@ -0,0 +1,3 @@ +default
+biome_lib
+farming?
diff --git a/plantlife_modpack/dryplants/init.lua b/plantlife_modpack/dryplants/init.lua new file mode 100644 index 0000000..e6baa7a --- /dev/null +++ b/plantlife_modpack/dryplants/init.lua @@ -0,0 +1,203 @@ +-----------------------------------------------------------------------------------------------
+local title = "Grasses" -- former "Dry plants"
+local version = "0.1.5"
+local mname = "dryplants"
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- textures & ideas partly by Neuromancer
+
+-- License (everything): WTFPL
+-- Contains code from: default, farming
+-- Looked at code from: darkage, sickle, stairs
+-- Dependencies: default, farming, biome_lib
+-- Supports:
+-----------------------------------------------------------------------------------------------
+abstract_dryplants = {}
+
+dofile(minetest.get_modpath("dryplants").."/crafting.lua")
+dofile(minetest.get_modpath("dryplants").."/settings.txt")
+dofile(minetest.get_modpath("dryplants").."/reed.lua")
+if REEDMACE_GENERATES == true then
+dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
+end
+if SMALL_JUNCUS_GENERATES == true then
+dofile(minetest.get_modpath("dryplants").."/juncus.lua")
+end
+if EXTRA_TALL_GRASS_GENERATES == true then
+dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
+end
+--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
+
+-----------------------------------------------------------------------------------------------
+-- Sickle
+-----------------------------------------------------------------------------------------------
+local function sickle_can_break(pos, deff, player)
+ local def = ItemStack({name=deff.name}):get_definition()
+
+ if not def.diggable or (def.can_dig and not def.can_dig(pos,player)) then
+ minetest.log("info", player:get_player_name() .. " tried to sickle "
+ .. def.name .. " which is not diggable "
+ .. minetest.pos_to_string(pos))
+ return
+ end
+
+ if minetest.is_protected(pos, player:get_player_name()) then
+ minetest.log("action", player:get_player_name()
+ .. " tried to sickle " .. def.name
+ .. " at protected position "
+ .. minetest.pos_to_string(pos))
+ minetest.record_protection_violation(pos, player:get_player_name())
+ return
+ end
+
+ return true
+end
+-- turns nodes with group flora=1 & flower=0 into cut grass
+local function sickle_on_use(itemstack, user, pointed_thing, uses)
+ local pt = pointed_thing
+ -- check if pointing at a node
+ if not pt then
+ return
+ end
+ if pt.type ~= "node" then
+ return
+ end
+
+ local under = minetest.get_node(pt.under)
+ local above_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
+ local above = minetest.get_node(above_pos)
+
+ -- return if any of the nodes is not registered
+ if not minetest.registered_nodes[under.name] then
+ return
+ end
+ if not minetest.registered_nodes[above.name] then
+ return
+ end
+
+ if not sickle_can_break(pt.under, under, user) then
+ return
+ end
+ -- check if something that can be cut using fine tools
+ if minetest.get_item_group(under.name, "snappy") > 0 then
+ -- check if flora but no flower
+ if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
+ -- turn the node into cut grass, wear out item and play sound
+ minetest.set_node(pt.under, {name="dryplants:grass"})
+ else -- otherwise dig the node
+ if not minetest.node_dig(pt.under, under, user) then
+ return
+ end
+ end
+ minetest.sound_play("default_dig_crumbly", {
+ pos = pt.under,
+ gain = 0.5,
+ })
+ itemstack:add_wear(65535/(uses-1))
+ return itemstack
+ elseif string.find(under.name, "default:dirt_with_grass") then
+ if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
+ return
+ end
+ minetest.set_node(pt.under, {name="dryplants:grass_short"})
+ minetest.set_node(above_pos, {name="dryplants:grass"})
+ minetest.sound_play("default_dig_crumbly", {
+ pos = pt.under,
+ gain = 0.5,
+ })
+ itemstack:add_wear(65535/(uses-1))
+ return itemstack
+ end
+end
+-- the tool
+minetest.register_tool("dryplants:sickle", {
+ description = "Sickle",
+ inventory_image = "dryplants_sickle.png",
+ on_use = function(itemstack, user, pointed_thing)
+ return sickle_on_use(itemstack, user, pointed_thing, 220)
+ end,
+})
+
+-----------------------------------------------------------------------------------------------
+-- Cut Grass
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:grass", {
+ description = "Cut Grass",
+ inventory_image = "dryplants_grass.png",
+ wield_image = "dryplants_grass.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ tiles = {"dryplants_grass.png"},
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Cut Grass becomes Hay over time
+-----------------------------------------------------------------------------------------------
+minetest.register_abm({
+ nodenames = {"dryplants:grass"},
+ interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
+ chance = 1,
+ action = function(pos)
+ minetest.set_node(pos, {name="dryplants:hay"})
+ end,
+})
+
+-----------------------------------------------------------------------------------------------
+-- Hay
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:hay", {
+ description = "Hay",
+ inventory_image = "dryplants_hay.png",
+ wield_image = "dryplants_hay.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ tiles = {"dryplants_hay.png"},
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Short Grass
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:grass_short", {
+ description = "Short Grass",
+ tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
+ is_ground_content = true,
+ groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
+ --drop = 'default:dirt',
+ sounds = default.node_sound_dirt_defaults({
+ footstep = {name="default_grass_footstep", gain=0.4},
+ }),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Short Grass becomes Dirt with Grass over time
+-----------------------------------------------------------------------------------------------
+minetest.register_abm({
+ nodenames = {"dryplants:grass_short"},
+ interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
+ chance = 100/GRASS_REGROWING_CHANCE,
+ action = function(pos)
+ -- Only become dirt with grass if no cut grass or hay lies on top + local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) + if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then + minetest.set_node(pos, {name="default:dirt_with_grass"})
+ end + end,
+})
+
+-----------------------------------------------------------------------------------------------
+print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
+-----------------------------------------------------------------------------------------------
diff --git a/plantlife_modpack/dryplants/juncus.lua b/plantlife_modpack/dryplants/juncus.lua new file mode 100644 index 0000000..bfbf23c --- /dev/null +++ b/plantlife_modpack/dryplants/juncus.lua @@ -0,0 +1,133 @@ +----------------------------------------------------------------------------------------------- +-- Grasses - Juncus 0.0.5 +----------------------------------------------------------------------------------------------- +-- by Mossmanikin +-- textures & ideas partly by Neuromancer + +-- License (everything): WTFPL +-- Contains code from: biome_lib +-- Looked at code from: default +----------------------------------------------------------------------------------------------- + +abstract_dryplants.grow_juncus = function(pos) + local juncus_type = math.random(2,3) + local right_here = {x=pos.x, y=pos.y+1, z=pos.z} + if minetest.get_node(right_here).name == "air" -- instead of check_air = true, + or minetest.get_node(right_here).name == "default:junglegrass" then + if juncus_type == 2 then + minetest.set_node(right_here, {name="dryplants:juncus_02"}) + else + minetest.set_node(right_here, {name="dryplants:juncus"}) + end + end +end + +minetest.register_node("dryplants:juncus", { + description = "Juncus", + drawtype = "plantlike", + visual_scale = 2, + paramtype = "light", + tiles = {"dryplants_juncus_03.png"}, + inventory_image = "dryplants_juncus_inv.png", + walkable = false, + buildable_to = true, + groups = { + snappy=3, + flammable=2, + attached_node=1, + flora=1 + --not_in_creative_inventory=1 + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16}, + }, + on_place = function(itemstack, placer, pointed_thing) + local playername = placer:get_player_name() + if minetest.is_protected(pointed_thing.above, playername) or + minetest.is_protected(pointed_thing.under, playername) then + minetest.chat_send_player(playername, "Someone else owns that spot.") + return + end + local pos = pointed_thing.under + local juncus_type = math.random(2,3) + local right_here = {x=pos.x, y=pos.y+1, z=pos.z} + if juncus_type == 2 then + minetest.set_node(right_here, {name="dryplants:juncus_02"}) + else + minetest.set_node(right_here, {name="dryplants:juncus"}) + end + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + return itemstack + end, +}) +minetest.register_node("dryplants:juncus_02", { + description = "Juncus", + drawtype = "plantlike", + visual_scale = 2, + paramtype = "light", + tiles = {"dryplants_juncus_02.png"}, + walkable = false, + buildable_to = true, + groups = { + snappy=3, + flammable=2, + attached_node=1, + flora=1, + not_in_creative_inventory=1 + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16}, + }, + drop = "dryplants:juncus", +}) +----------------------------------------------------------------------------------------------- +-- 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" + }, + 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 +) +-- 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" + }, + 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 +) diff --git a/plantlife_modpack/dryplants/meadowvariation.lua b/plantlife_modpack/dryplants/meadowvariation.lua new file mode 100644 index 0000000..8477657 --- /dev/null +++ b/plantlife_modpack/dryplants/meadowvariation.lua @@ -0,0 +1,26 @@ +----------------------------------------------------------------------------------------------- +-- Grasses - Meadow Variation 0.0.1 +----------------------------------------------------------------------------------------------- +-- by Mossmanikin + +-- License (everything): WTFPL +-- Contains code from: biome_lib +-- Looked at code from: default +----------------------------------------------------------------------------------------------- + +abstract_dryplants.grow_grass_variation = function(pos) + local right_here = {x=pos.x, y=pos.y, z=pos.z} + minetest.set_node(right_here, {name="dryplants:grass_short"}) +end + +biome_lib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + }, + max_count = 4800, + rarity = 25, + min_elevation = 1, -- above sea level + plantlife_limit = -0.9, + }, + abstract_dryplants.grow_grass_variation +) diff --git a/plantlife_modpack/dryplants/models/plantlike.obj b/plantlife_modpack/dryplants/models/plantlike.obj new file mode 100644 index 0000000..4b38d39 --- /dev/null +++ b/plantlife_modpack/dryplants/models/plantlike.obj @@ -0,0 +1,28 @@ +# Blender v2.73 (sub 0) OBJ File: '' +# www.blender.org +o Cylinder +v 0.359670 -0.500000 0.347329 +v 0.359670 0.500000 0.347329 +v -0.359670 -0.500000 -0.347329 +v -0.359670 0.500000 -0.347329 +v 0.347329 0.500000 -0.359670 +v 0.347329 -0.500000 -0.359670 +v -0.347329 0.500000 0.359670 +v -0.347329 -0.500000 0.359670 +v 0.359670 -0.500000 0.347329 +v 0.359670 0.500000 0.347329 +v -0.359670 -0.500000 -0.347329 +v -0.359670 0.500000 -0.347329 +v 0.347329 0.500000 -0.359670 +v 0.347329 -0.500000 -0.359670 +v -0.347329 0.500000 0.359670 +v -0.347329 -0.500000 0.359670 +vt 1.000000 -0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt -0.000000 0.000000 +s off +f 1/1 2/2 4/3 3/4 +f 8/1 7/2 5/3 6/4 +f 9/1 11/4 12/3 10/2 +f 16/1 14/4 13/3 15/2 diff --git a/plantlife_modpack/dryplants/moregrass.lua b/plantlife_modpack/dryplants/moregrass.lua new file mode 100644 index 0000000..88761c8 --- /dev/null +++ b/plantlife_modpack/dryplants/moregrass.lua @@ -0,0 +1,33 @@ +-----------------------------------------------------------------------------------------------
+-- Grasses - More Tall Grass 0.0.2
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
+-- 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.set_node(right_here, {name="default:grass_"..grass_size})
+ end
+end
+
+biome_lib:register_generate_plant({
+ surface = {
+ "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
+)
diff --git a/plantlife_modpack/dryplants/reed.lua b/plantlife_modpack/dryplants/reed.lua new file mode 100644 index 0000000..6f29028 --- /dev/null +++ b/plantlife_modpack/dryplants/reed.lua @@ -0,0 +1,380 @@ +-----------------------------------------------------------------------------------------------
+-- Dry Plants - Reed 0.0.5
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Looked at code from: darkage, default, stairs
+-- Dependencies: default
+-----------------------------------------------------------------------------------------------
+minetest.register_alias("stairs:stair_wetreed", "dryplants:wetreed_roof")
+minetest.register_alias("stairs:slab_wetreed", "dryplants:wetreed_slab")
+minetest.register_alias("stairs:stair_reed", "dryplants:reed_roof")
+minetest.register_alias("stairs:slab_reed", "dryplants:reed_slab")
+
+
+-----------------------------------------------------------------------------------------------
+-- Wet Reed
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:wetreed", {
+ description = "Wet Reed",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed_wet.png"},
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Wet Reed Slab
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:wetreed_slab", {
+ description = "Wet Reed Slab",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed_wet.png"},
+ node_box = {
+ type = "fixed",
+ fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Wet Reed Roof
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:wetreed_roof", {
+ description = "Wet Reed Roof",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed_wet.png"},
+ node_box = {
+ type = "fixed",
+-- { left , bottom , front , right , top , back }
+ fixed = {
+ {-1/2, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, -1/2, -1/2, 1/2, 0, 0},
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-1/2, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, -1/2, -1/2, 1/2, 0, 0},
+ }
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+if AUTO_ROOF_CORNER == true then
+
+ local CoRNeR = {
+-- MaTeRiaL
+ {"wetreed"},
+ {"reed"}
+ }
+
+ for i in pairs(CoRNeR) do
+
+ local MaTeRiaL = CoRNeR[i][1]
+ local roof = "dryplants:"..MaTeRiaL.."_roof"
+ local corner = "dryplants:"..MaTeRiaL.."_roof_corner"
+ local corner_2 = "dryplants:"..MaTeRiaL.."_roof_corner_2"
+
+ minetest.register_abm({
+ nodenames = {roof},
+ interval = 1,
+ chance = 1,
+ action = function(pos)
+
+ local node_east = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z })
+ local node_west = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z })
+ local node_north = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
+ local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
+ -- corner 1
+ if ((node_west.name == roof and node_west.param2 == 0)
+ or (node_west.name == corner and node_west.param2 == 1))
+ and ((node_north.name == roof and node_north.param2 == 3)
+ or (node_north.name == corner and node_north.param2 == 3))
+ then
+ minetest.set_node(pos, {name=corner, param2=0})
+ end
+
+ if ((node_north.name == roof and node_north.param2 == 1)
+ or (node_north.name == corner and node_north.param2 == 2))
+ and ((node_east.name == roof and node_east.param2 == 0)
+ or (node_east.name == corner and node_east.param2 == 0))
+ then
+ minetest.set_node(pos, {name=corner, param2=1})
+ end
+
+ if ((node_east.name == roof and node_east.param2 == 2)
+ or (node_east.name == corner and node_east.param2 == 3))
+ and ((node_south.name == roof and node_south.param2 == 1)
+ or (node_south.name == corner and node_south.param2 == 1))
+ then
+ minetest.set_node(pos, {name=corner, param2=2})
+ end
+
+ if ((node_south.name == roof and node_south.param2 == 3)
+ or (node_south.name == corner and node_south.param2 == 0))
+ and ((node_west.name == roof and node_west.param2 == 2)
+ or (node_west.name == corner and node_west.param2 == 2))
+ then
+ minetest.set_node(pos, {name=corner, param2=3})
+ end
+ -- corner 2
+ if ((node_west.name == roof and node_west.param2 == 2)
+ or (node_west.name == corner_2 and node_west.param2 == 1))
+ and ((node_north.name == roof and node_north.param2 == 1)
+ or (node_north.name == corner_2 and node_north.param2 == 3))
+ then
+ minetest.set_node(pos, {name=corner_2, param2=0})
+ end
+
+ if ((node_north.name == roof and node_north.param2 == 3)
+ or (node_north.name == corner_2 and node_north.param2 == 2))
+ and ((node_east.name == roof and node_east.param2 == 2)
+ or (node_east.name == corner_2 and node_east.param2 == 0))
+ then
+ minetest.set_node(pos, {name=corner_2, param2=1})
+ end
+
+ if ((node_east.name == roof and node_east.param2 == 0)
+ or (node_east.name == corner_2 and node_east.param2 == 3))
+ and ((node_south.name == roof and node_south.param2 == 3)
+ or (node_south.name == corner_2 and node_south.param2 == 1))
+ then
+ minetest.set_node(pos, {name=corner_2, param2=2})
+ end
+
+ if ((node_south.name == roof and node_south.param2 == 1)
+ or (node_south.name == corner_2 and node_south.param2 == 0))
+ and ((node_west.name == roof and node_west.param2 == 0)
+ or (node_west.name == corner_2 and node_west.param2 == 2))
+ then
+ minetest.set_node(pos, {name=corner_2, param2=3})
+ end
+
+ end,
+ })
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+-- Wet Reed Roof Corner
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:wetreed_roof_corner", {
+ description = "Wet Reed Roof Corner",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed_wet.png"},
+ node_box = {
+ type = "fixed",
+-- { left , bottom , front , right , top , back }
+ fixed = {
+ {-1/2, 0, 0, 0, 1/2, 1/2},
+ {0, -1/2, 0, 1/2, 0, 1/2},
+ {-1/2, -1/2, -1/2, 0, 0, 0},
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-1/2, 0, 0, 0, 1/2, 1/2},
+ {0, -1/2, 0, 1/2, 0, 1/2},
+ {-1/2, -1/2, -1/2, 0, 0, 0},
+ }
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Wet Reed Roof Corner 2
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:wetreed_roof_corner_2", {
+ description = "Wet Reed Roof Corner 2",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed_wet.png"},
+ node_box = {
+ type = "fixed",
+-- { left , bottom , front , right , top , back }
+ fixed = {
+ {-1/2, -1/2, 0, 0, 0, 1/2},
+ {0, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, 0, -1/2, 0, 1/2, 0},
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-1/2, -1/2, 0, 0, 0, 1/2},
+ {0, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, 0, -1/2, 0, 1/2, 0},
+ }
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Wet Reed becomes (dry) Reed over time
+-----------------------------------------------------------------------------------------------
+if REED_WILL_DRY == true then
+
+ local DRyiNG = {
+-- WeT DRy
+ {"dryplants:wetreed", "dryplants:reed"},
+ {"dryplants:wetreed_slab", "dryplants:reed_slab"},
+ {"dryplants:wetreed_roof", "dryplants:reed_roof"},
+ {"dryplants:wetreed_roof_corner", "dryplants:reed_roof_corner"},
+ {"dryplants:wetreed_roof_corner_2", "dryplants:reed_roof_corner_2"}
+ }
+ for i in pairs(DRyiNG) do
+
+ local WeT = DRyiNG[i][1]
+ local DRy = DRyiNG[i][2]
+
+ minetest.register_abm({
+ nodenames = {WeT},
+ interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
+ chance = 1,
+ action = function(pos)
+ local direction = minetest.get_node(pos).param2
+ minetest.set_node(pos, {name=DRy, param2=direction})
+ end,
+ })
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+-- Reed
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:reed", {
+ description = "Reed",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed.png"},
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Reed Slab
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:reed_slab", {
+ description = "Reed Slab",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed.png"},
+ node_box = {
+ type = "fixed",
+ fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Reed Roof
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:reed_roof", {
+ description = "Reed Roof",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed.png"},
+ node_box = {
+ type = "fixed",
+-- { left , bottom , front , right , top , back }
+ fixed = {
+ {-1/2, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, -1/2, -1/2, 1/2, 0, 0},
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-1/2, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, -1/2, -1/2, 1/2, 0, 0},
+ }
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Reed Roof Corner
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:reed_roof_corner", {
+ description = "Reed Roof Corner",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed.png"},
+ node_box = {
+ type = "fixed",
+-- { left , bottom , front , right , top , back }
+ fixed = {
+ {-1/2, 0, 0, 0, 1/2, 1/2},
+ {0, -1/2, 0, 1/2, 0, 1/2},
+ {-1/2, -1/2, -1/2, 0, 0, 0},
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-1/2, 0, 0, 0, 1/2, 1/2},
+ {0, -1/2, 0, 1/2, 0, 1/2},
+ {-1/2, -1/2, -1/2, 0, 0, 0},
+ }
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- Reed Roof Corner 2
+-----------------------------------------------------------------------------------------------
+minetest.register_node("dryplants:reed_roof_corner_2", {
+ description = "Reed Roof Corner 2",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"dryplants_reed.png"},
+ node_box = {
+ type = "fixed",
+-- { left , bottom , front , right , top , back }
+ fixed = {
+ {-1/2, -1/2, 0, 0, 0, 1/2},
+ {0, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, 0, -1/2, 0, 1/2, 0},
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-1/2, -1/2, 0, 0, 0, 1/2},
+ {0, 0, 0, 1/2, 1/2, 1/2},
+ {-1/2, 0, -1/2, 0, 1/2, 0},
+ }
+ },
+ groups = {snappy=3, flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/plantlife_modpack/dryplants/reedmace.lua b/plantlife_modpack/dryplants/reedmace.lua new file mode 100644 index 0000000..9547c7a --- /dev/null +++ b/plantlife_modpack/dryplants/reedmace.lua @@ -0,0 +1,411 @@ +----------------------------------------------------------------------------------------------- +-- Grasses - Reedmace 0.1.1 +----------------------------------------------------------------------------------------------- +-- by Mossmanikin +-- textures & ideas partly by Neuromancer + +-- License (everything): WTFPL +-- Contains code from: biome_lib +-- Looked at code from: default, trees +----------------------------------------------------------------------------------------------- + +-- NOTES (from wikipedia, some of this might get implemented) +-- rhizomes are edible +-- outer portion of young plants can be peeled and the heart can be eaten raw or boiled and eaten like asparagus +-- leaf bases can be eaten raw or cooked +-- sheath can be removed from the developing green flower spike, which can then be boiled and eaten like corn on the cob +-- pollen can be collected and used as a flour supplement or thickener +-- Typha stems and leaves can be used to make paper +-- The seed hairs were used by some Native American groups as tinder for starting fires + +----------------------------------------------------------------------------------------------- +-- REEDMACE SHAPES +----------------------------------------------------------------------------------------------- + +abstract_dryplants.grow_reedmace = function(pos) + local size = math.random(1,3) + local spikes = math.random(1,3) + local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z} + local pos_02 = {x = pos.x, y = pos.y + 2, z = pos.z} + local pos_03 = {x = pos.x, y = pos.y + 3, z = pos.z} + if minetest.get_node(pos_01).name == "air" -- bug fix + or minetest.get_node(pos_01).name == "dryplants:reedmace_sapling" then + if minetest.get_node(pos_02).name ~= "air" then + minetest.set_node(pos_01, {name="dryplants:reedmace_top"}) + elseif minetest.get_node(pos_03).name ~= "air" then + minetest.set_node(pos_01, {name="dryplants:reedmace_height_2"}) + elseif size == 1 then + minetest.set_node(pos_01, {name="dryplants:reedmace_top"}) + elseif size == 2 then + minetest.set_node(pos_01, {name="dryplants:reedmace_height_2"}) + elseif size == 3 then + if spikes == 1 then + minetest.set_node(pos_01, {name="dryplants:reedmace_height_3_spikes"}) + else + minetest.set_node(pos_01, {name="dryplants:reedmace_height_3"}) + end + end + end +end + +abstract_dryplants.grow_reedmace_water = function(pos) + local size = math.random(1,3) + local spikes = math.random(1,3) + local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z} + local pos_02 = {x = pos.x, y = pos.y + 2, z = pos.z} + local pos_03 = {x = pos.x, y = pos.y + 3, z = pos.z} + local pos_04 = {x = pos.x, y = pos.y + 4, z = pos.z} + minetest.add_entity(pos_01, "dryplants:reedmace_water_entity") + if minetest.get_node(pos_02).name == "air" then -- bug fix + if minetest.get_node(pos_03).name ~= "air" then + minetest.set_node(pos_02, {name="dryplants:reedmace_top"}) + elseif minetest.get_node(pos_04).name ~= "air" then + minetest.set_node(pos_02, {name="dryplants:reedmace_height_2"}) + elseif size == 1 then + minetest.set_node(pos_02, {name="dryplants:reedmace_top"}) + elseif size == 2 then + minetest.set_node(pos_02, {name="dryplants:reedmace_height_2"}) + elseif size == 3 then + if spikes == 1 then + minetest.set_node(pos_02, {name="dryplants:reedmace_height_3_spikes"}) + else + minetest.set_node(pos_02, {name="dryplants:reedmace_height_3"}) + end + end + end +end + +----------------------------------------------------------------------------------------------- +-- REEDMACE SPIKES +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_spikes", { + description = "Reedmace", + drawtype = "plantlike", + paramtype = "light", + tiles = {"dryplants_reedmace_spikes.png"}, + inventory_image = "dryplants_reedmace_spikes.png", + walkable = false, + groups = { + snappy=3, + flammable=2, + not_in_creative_inventory=1 + }, + drop = 'dryplants:reedmace_sapling', + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE height: 1 +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_top", { + description = "Reedmace, height: 1", + drawtype = "plantlike", + paramtype = "light", + tiles = {"dryplants_reedmace_top.png"}, + inventory_image = "dryplants_reedmace_top.png", + walkable = false, + groups = { + snappy=3, + flammable=2, + not_in_creative_inventory=1 + }, + drop = 'dryplants:reedmace_sapling', + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE height: 2 +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_height_2", { + description = "Reedmace, height: 2", + drawtype = "plantlike", + visual_scale = 2, + paramtype = "light", + tiles = {"dryplants_reedmace_height_2.png"}, + inventory_image = "dryplants_reedmace_top.png", + walkable = false, + groups = { + snappy=3, + flammable=2--, + --not_in_creative_inventory=1 + }, + drop = 'dryplants:reedmace_sapling', + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE height: 3 +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_height_3", { + description = "Reedmace, height: 3", + drawtype = "plantlike", + visual_scale = 2, + paramtype = "light", + tiles = {"dryplants_reedmace_height_3.png"}, + inventory_image = "dryplants_reedmace_top.png", + walkable = false, + groups = { + snappy=3, + flammable=2--, + --not_in_creative_inventory=1 + }, + drop = 'dryplants:reedmace_sapling', + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE height: 3 & Spikes +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_height_3_spikes", { + description = "Reedmace, height: 3 & Spikes", + drawtype = "plantlike", + visual_scale = 2, + paramtype = "light", + tiles = {"dryplants_reedmace_height_3_spikes.png"}, + inventory_image = "dryplants_reedmace_top.png", + walkable = false, + groups = { + snappy=3, + flammable=2--, + --not_in_creative_inventory=1 + }, + drop = 'dryplants:reedmace_sapling', + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE STEMS +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace", { + description = "Reedmace", + drawtype = "plantlike", + paramtype = "light", + tiles = {"dryplants_reedmace.png"}, + inventory_image = "dryplants_reedmace.png", + walkable = false, + groups = { + snappy=3, + flammable=2, + not_in_creative_inventory=1 + }, + drop = 'dryplants:reedmace_sapling', + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + after_destruct = function(pos,oldnode) + local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}) + if node.name == "dryplants:reedmace_top" + or node.name == "dryplants:reedmace_spikes" then + minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z}) + minetest.add_item(pos,"dryplants:reedmace_sapling") + end + end, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE BOTTOM +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_bottom", { + description = "Reedmace", + drawtype = "plantlike", + paramtype = "light", + tiles = {"dryplants_reedmace_bottom.png"}, + inventory_image = "dryplants_reedmace_bottom.png", + walkable = false, + groups = { + snappy=3, + flammable=2, + not_in_creative_inventory=1 + }, + drop = 'dryplants:reedmace_sapling', + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + after_destruct = function(pos,oldnode) + local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}) + if node.name == "dryplants:reedmace" + or node.name == "dryplants:reedmace_top" + or node.name == "dryplants:reedmace_spikes" then + minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z}) + minetest.add_item(pos,"dryplants:reedmace_sapling") + end + end, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE "SAPLING" (the drop from the above) +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_sapling", { + description = "Reedmace", + drawtype = "plantlike", + paramtype = "light", + tiles = {"dryplants_reedmace_sapling.png"}, + inventory_image = "dryplants_reedmace_sapling.png", + walkable = false, + groups = { + snappy=3, + flammable=2, + attached_node=1 + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, +}) +-- abm +minetest.register_abm({ + nodenames = "dryplants:reedmace_sapling", + interval = REEDMACE_GROWING_TIME, + chance = 100/REEDMACE_GROWING_CHANCE, + action = function(pos, node, _, _) + if string.find(minetest.get_node({x = pos.x + 1, y = pos.y, z = pos.z }).name, "default:water") + or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z + 1}).name, "default:water") + or string.find(minetest.get_node({x = pos.x - 1, y = pos.y, z = pos.z }).name, "default:water") + or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z - 1}).name, "default:water") then + if minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name == "air" then + abstract_dryplants.grow_reedmace_water({x = pos.x, y = pos.y - 1, z = pos.z}) + end + minetest.set_node({x=pos.x, y=pos.y, z=pos.z}, {name="default:water_source"}) + else + abstract_dryplants.grow_reedmace({x = pos.x, y = pos.y - 1, z = pos.z}) + end + end +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE WATER (for entity) +----------------------------------------------------------------------------------------------- +minetest.register_node("dryplants:reedmace_water", { + description = "Reedmace", + drawtype = "plantlike", + paramtype = "light", + tiles = {"dryplants_reedmace_water.png"}, + inventory_image = "dryplants_reedmace_water.png", + groups = {not_in_creative_inventory=1}, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, +}) +----------------------------------------------------------------------------------------------- +-- REEDMACE WATER ENTITY +----------------------------------------------------------------------------------------------- +minetest.register_entity("dryplants:reedmace_water_entity",{ + visual = "mesh", + mesh = "plantlike.obj", + visual_size = {x=10, y=10}, + textures = {"dryplants_reedmace_water.png"}, + collisionbox = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}, + on_punch = function(self, puncher) + if puncher:is_player() and puncher:get_inventory() then + if not minetest.setting_getbool("creative_mode") then + puncher:get_inventory():add_item("main", "dryplants:reedmace_sapling") + end + self.object:remove() + end + end, +}) +----------------------------------------------------------------------------------------------- +-- SPAWN REEDMACE +----------------------------------------------------------------------------------------------- +--[[biome_lib:spawn_on_surfaces({ + spawn_delay = 1200, + spawn_plants = {"dryplants:reedmace_sapling"}, + spawn_chance = 400, + spawn_surfaces = { + "default:dirt_with_grass", + "default:desert_sand", + "default:sand", + "dryplants:grass_short", + "stoneage:grass_with_silex" + }, + seed_diff = 329, + near_nodes = {"default:water_source"}, + near_nodes_size = 2, + near_nodes_vertical = 1, + near_nodes_count = 1, +})]] +----------------------------------------------------------------------------------------------- +-- 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" + }, + 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 +) +-- 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" + }, + 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 +) +-- for oases & tropical beaches & tropical swamps +biome_lib:register_generate_plant({ + surface = { + "default:sand", + "sumpf:sumpf" + }, + 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 +) diff --git a/plantlife_modpack/dryplants/settings.txt b/plantlife_modpack/dryplants/settings.txt new file mode 100644 index 0000000..cc12a9c --- /dev/null +++ b/plantlife_modpack/dryplants/settings.txt @@ -0,0 +1,52 @@ +-- Here you can enable/disable the different plants
+REEDMACE_GENERATES = true
+SMALL_JUNCUS_GENERATES = true
+EXTRA_TALL_GRASS_GENERATES = true
+
+
+
+-- Amount of Reedmace near water or swamp
+REEDMACE_NEAR_WATER_PER_MAPBLOCK = 35 -- plants per 80x80x80 nodes (absolute maximum number)
+REEDMACE_NEAR_WATER_RARITY = 40 -- percent
+
+-- Amount of Reedmace in water
+REEDMACE_IN_WATER_PER_MAPBLOCK = 35 -- plants per 80x80x80 nodes (absolute maximum number)
+REEDMACE_IN_WATER_RARITY = 65 -- percent
+
+-- Amount of Reedmace for oases, tropical beaches and tropical swamps
+REEDMACE_FOR_OASES_PER_MAPBLOCK = 35 -- plants per 80x80x80 nodes (absolute maximum number)
+REEDMACE_FOR_OASES_RARITY = 90 -- percent
+
+-- growing of reedmace sapling
+REEDMACE_GROWING_TIME = 600 -- seconds
+REEDMACE_GROWING_CHANCE = 5 -- percent
+
+
+
+-- Amount of small Juncus near water or swamp
+JUNCUS_NEAR_WATER_PER_MAPBLOCK = 70 -- plants per 80x80x80 nodes (absolute maximum number)
+JUNCUS_NEAR_WATER_RARITY = 75 -- percent
+
+-- Amount of small Juncus at dunes/beach
+JUNCUS_AT_BEACH_PER_MAPBLOCK = 70 -- plants per 80x80x80 nodes (absolute maximum number)
+JUNCUS_AT_BEACH_RARITY = 75 -- percent
+
+
+
+-- Tall Grass on dirt with grass
+TALL_GRASS_PER_MAPBLOCK = 4800 -- plants per 80x80x80 nodes (absolute maximum number)
+TALL_GRASS_RARITY = 75 -- percent
+
+
+
+-- short grass becomes dirt with grass again
+GRASS_REGROWING_TIME = 1200 -- seconds
+GRASS_REGROWING_CHANCE = 5 -- percent
+
+HAY_DRYING_TIME = 3600 -- seconds
+
+REED_WILL_DRY = false -- wet reed nodes will become dry reed nodes
+REED_DRYING_TIME = 3600 -- seconds
+
+AUTO_ROOF_CORNER = true
+
diff --git a/plantlife_modpack/dryplants/textures/default_grass_1.png b/plantlife_modpack/dryplants/textures/default_grass_1.png Binary files differnew file mode 100644 index 0000000..8820e7e --- /dev/null +++ b/plantlife_modpack/dryplants/textures/default_grass_1.png diff --git a/plantlife_modpack/dryplants/textures/default_grass_2.png b/plantlife_modpack/dryplants/textures/default_grass_2.png Binary files differnew file mode 100644 index 0000000..9929548 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/default_grass_2.png diff --git a/plantlife_modpack/dryplants/textures/default_grass_3.png b/plantlife_modpack/dryplants/textures/default_grass_3.png Binary files differnew file mode 100644 index 0000000..4d62f69 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/default_grass_3.png diff --git a/plantlife_modpack/dryplants/textures/default_grass_4.png b/plantlife_modpack/dryplants/textures/default_grass_4.png Binary files differnew file mode 100644 index 0000000..8ad76c5 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/default_grass_4.png diff --git a/plantlife_modpack/dryplants/textures/default_grass_5.png b/plantlife_modpack/dryplants/textures/default_grass_5.png Binary files differnew file mode 100644 index 0000000..799b0fd --- /dev/null +++ b/plantlife_modpack/dryplants/textures/default_grass_5.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_grass.png b/plantlife_modpack/dryplants/textures/dryplants_grass.png Binary files differnew file mode 100644 index 0000000..cbd276e --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_grass.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_grass_short.png b/plantlife_modpack/dryplants/textures/dryplants_grass_short.png Binary files differnew file mode 100644 index 0000000..30553aa --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_grass_short.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_grass_short_side.png b/plantlife_modpack/dryplants/textures/dryplants_grass_short_side.png Binary files differnew file mode 100644 index 0000000..bc27507 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_grass_short_side.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_hay.png b/plantlife_modpack/dryplants/textures/dryplants_hay.png Binary files differnew file mode 100644 index 0000000..600c508 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_hay.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_juncus_02.png b/plantlife_modpack/dryplants/textures/dryplants_juncus_02.png Binary files differnew file mode 100644 index 0000000..2e4f840 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_juncus_02.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_juncus_03.png b/plantlife_modpack/dryplants/textures/dryplants_juncus_03.png Binary files differnew file mode 100644 index 0000000..ff3d9c5 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_juncus_03.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_juncus_inv.png b/plantlife_modpack/dryplants/textures/dryplants_juncus_inv.png Binary files differnew file mode 100644 index 0000000..d5b9dca --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_juncus_inv.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reed.png b/plantlife_modpack/dryplants/textures/dryplants_reed.png Binary files differnew file mode 100644 index 0000000..b350a78 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reed.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reed_wet.png b/plantlife_modpack/dryplants/textures/dryplants_reed_wet.png Binary files differnew file mode 100644 index 0000000..cd4488a --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reed_wet.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace.png Binary files differnew file mode 100644 index 0000000..d14686f --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_bottom.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_bottom.png Binary files differnew file mode 100644 index 0000000..d83c36d --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_bottom.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_2.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_2.png Binary files differnew file mode 100644 index 0000000..4ac816a --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_2.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_3.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_3.png Binary files differnew file mode 100644 index 0000000..5cbd8d8 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_3.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_3_spikes.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_3_spikes.png Binary files differnew file mode 100644 index 0000000..16a29b3 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_height_3_spikes.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_sapling.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_sapling.png Binary files differnew file mode 100644 index 0000000..04b8c1f --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_sapling.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_spikes.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_spikes.png Binary files differnew file mode 100644 index 0000000..4a23745 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_spikes.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_top.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_top.png Binary files differnew file mode 100644 index 0000000..8532ece --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_top.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_reedmace_water.png b/plantlife_modpack/dryplants/textures/dryplants_reedmace_water.png Binary files differnew file mode 100644 index 0000000..3ebf93c --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_reedmace_water.png diff --git a/plantlife_modpack/dryplants/textures/dryplants_sickle.png b/plantlife_modpack/dryplants/textures/dryplants_sickle.png Binary files differnew file mode 100644 index 0000000..e496062 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/dryplants_sickle.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/big_pic_8.png b/plantlife_modpack/dryplants/textures/not_in_use/big_pic_8.png Binary files differnew file mode 100644 index 0000000..aac9520 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/big_pic_8.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/big_pic_9.png b/plantlife_modpack/dryplants/textures/not_in_use/big_pic_9.png Binary files differnew file mode 100644 index 0000000..1ebe95c --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/big_pic_9.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_cattailsG_m2.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_cattailsG_m2.png Binary files differnew file mode 100644 index 0000000..0a2cae1 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_cattailsG_m2.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_left.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_left.png Binary files differnew file mode 100644 index 0000000..b771a55 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_left.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_right.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_right.png Binary files differnew file mode 100644 index 0000000..a9f4b7e --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_right.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_whole2.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_whole2.png Binary files differnew file mode 100644 index 0000000..67c3cb8 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_02_whole2.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_left.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_left.png Binary files differnew file mode 100644 index 0000000..dc8a33e --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_left.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_right.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_right.png Binary files differnew file mode 100644 index 0000000..23b5cf3 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_right.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_whole2.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_whole2.png Binary files differnew file mode 100644 index 0000000..d494ae4 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_juncus_03_whole2.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_01.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_01.png Binary files differnew file mode 100644 index 0000000..aaab5fe --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_01.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_02.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_02.png Binary files differnew file mode 100644 index 0000000..5c8751a --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_02.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_03.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_03.png Binary files differnew file mode 100644 index 0000000..342b8b8 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_03.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_04.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_04.png Binary files differnew file mode 100644 index 0000000..a1d708d --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_04.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_bottom_left.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_bottom_left.png Binary files differnew file mode 100644 index 0000000..643bbea --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_bottom_left.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_bottom_right.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_bottom_right.png Binary files differnew file mode 100644 index 0000000..d415003 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_bottom_right.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_left.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_left.png Binary files differnew file mode 100644 index 0000000..1a3bd92 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_left.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_right.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_right.png Binary files differnew file mode 100644 index 0000000..b178d4a --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_right.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_top_left.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_top_left.png Binary files differnew file mode 100644 index 0000000..18ae716 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_top_left.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_top_right.png b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_top_right.png Binary files differnew file mode 100644 index 0000000..e511b24 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/dryplants_reedmace_top_right.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/reedmace2.png b/plantlife_modpack/dryplants/textures/not_in_use/reedmace2.png Binary files differnew file mode 100644 index 0000000..ca505bd --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/reedmace2.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/reedmace3.png b/plantlife_modpack/dryplants/textures/not_in_use/reedmace3.png Binary files differnew file mode 100644 index 0000000..d2ec729 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/reedmace3.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/reedmace4.png b/plantlife_modpack/dryplants/textures/not_in_use/reedmace4.png Binary files differnew file mode 100644 index 0000000..9ba759b --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/reedmace4.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/reedtest.png b/plantlife_modpack/dryplants/textures/not_in_use/reedtest.png Binary files differnew file mode 100644 index 0000000..33822ef --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/reedtest.png diff --git a/plantlife_modpack/dryplants/textures/not_in_use/texturing.png b/plantlife_modpack/dryplants/textures/not_in_use/texturing.png Binary files differnew file mode 100644 index 0000000..6a18fda --- /dev/null +++ b/plantlife_modpack/dryplants/textures/not_in_use/texturing.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_grass_short_old3.png b/plantlife_modpack/dryplants/textures/old/dryplants_grass_short_old3.png Binary files differnew file mode 100644 index 0000000..f6f6c5b --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_grass_short_old3.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_grass_short_old4.png b/plantlife_modpack/dryplants/textures/old/dryplants_grass_short_old4.png Binary files differnew file mode 100644 index 0000000..6e7611c --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_grass_short_old4.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_juncus_02_left_old.png b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_02_left_old.png Binary files differnew file mode 100644 index 0000000..ce49ec2 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_02_left_old.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_juncus_02_right_old.png b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_02_right_old.png Binary files differnew file mode 100644 index 0000000..e512a77 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_02_right_old.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_juncus_03_left_old.png b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_03_left_old.png Binary files differnew file mode 100644 index 0000000..7644a0d --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_03_left_old.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_juncus_03_right_old.png b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_03_right_old.png Binary files differnew file mode 100644 index 0000000..801cf23 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_juncus_03_right_old.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_left_old2.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_left_old2.png Binary files differnew file mode 100644 index 0000000..7d25e49 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_left_old2.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_old4.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_old4.png Binary files differnew file mode 100644 index 0000000..a02b19b --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_old4.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_right_old2.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_right_old2.png Binary files differnew file mode 100644 index 0000000..0b13beb --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_bottom_right_old2.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_left_old2.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_left_old2.png Binary files differnew file mode 100644 index 0000000..784d45d --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_left_old2.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_old8.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_old8.png Binary files differnew file mode 100644 index 0000000..1498b5f --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_old8.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_right_old2.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_right_old2.png Binary files differnew file mode 100644 index 0000000..db758c4 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_right_old2.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_spikes_old3.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_spikes_old3.png Binary files differnew file mode 100644 index 0000000..207a747 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_spikes_old3.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_left_old2.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_left_old2.png Binary files differnew file mode 100644 index 0000000..6d9afce --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_left_old2.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_old3.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_old3.png Binary files differnew file mode 100644 index 0000000..6eedad4 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_old3.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_right_old2.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_right_old2.png Binary files differnew file mode 100644 index 0000000..333f587 --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_top_right_old2.png diff --git a/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_water_old2.png b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_water_old2.png Binary files differnew file mode 100644 index 0000000..6b10bff --- /dev/null +++ b/plantlife_modpack/dryplants/textures/old/dryplants_reedmace_water_old2.png diff --git a/plantlife_modpack/ferns/crafting.lua b/plantlife_modpack/ferns/crafting.lua new file mode 100644 index 0000000..8d8b3ed --- /dev/null +++ b/plantlife_modpack/ferns/crafting.lua @@ -0,0 +1,104 @@ +-----------------------------------------------------------------------------------------------
+-- Ferns - Crafting 0.0.5
+-----------------------------------------------------------------------------------------------
+-- (by Mossmanikin)
+-- License (everything): WTFPL
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({
+ type = "shapeless",
+ output = "ferns:fiddlehead 3",
+ recipe = {"ferns:fern_01"},
+ replacements = {
+ {"ferns:fern_01", "ferns:ferntuber"}
+ },
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "ferns:fiddlehead 3",
+ recipe = {"ferns:tree_fern_leaves"},
+ replacements = {
+ {"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
+ },
+})
+-----------------------------------------------------------------------------------------------
+-- FIDDLEHEAD
+-----------------------------------------------------------------------------------------------
+minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
+
+minetest.register_craftitem("ferns:fiddlehead", {
+ description = "Fiddlehead",
+ inventory_image = "ferns_fiddlehead.png",
+ on_use = minetest.item_eat(-1), -- slightly poisonous when raw
+})
+minetest.register_craft({
+ type = "cooking",
+ output = "ferns:fiddlehead_roasted",
+ recipe = "ferns:fiddlehead",
+ cooktime = 1,
+})
+minetest.register_craftitem("ferns:fiddlehead_roasted", {
+ description = "Roasted Fiddlehead",
+ inventory_image = "ferns_fiddlehead_roasted.png",
+ on_use = minetest.item_eat(1), -- edible when cooked
+})
+-----------------------------------------------------------------------------------------------
+-- FERN TUBER
+-----------------------------------------------------------------------------------------------
+minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
+
+minetest.register_craftitem("ferns:ferntuber", {
+ description = "Fern Tuber",
+ inventory_image = "ferns_ferntuber.png",
+})
+minetest.register_craft({
+ type = "cooking",
+ output = "ferns:ferntuber_roasted",
+ recipe = "ferns:ferntuber",
+ cooktime = 3,
+})
+
+minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
+
+minetest.register_craftitem("ferns:ferntuber_roasted", {
+ description = "Roasted Fern Tuber",
+ inventory_image = "ferns_ferntuber_roasted.png",
+ on_use = minetest.item_eat(3),
+})
+-----------------------------------------------------------------------------------------------
+-- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({
+ type = "shapeless",
+ output = "dye:green",
+ recipe = {"group:horsetail"},
+})
+-----------------------------------------------------------------------------------------------
+-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
+-----------------------------------------------------------------------------------------------
+--[[minetest.register_craft({
+ type = "shapeless",
+ output = "default:pick_wood",
+ recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:shovel_wood",
+ recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:axe_wood",
+ recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:sword_wood",
+ recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "farming:hoe_wood",
+ recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
+})]]
+
diff --git a/plantlife_modpack/ferns/depends.txt b/plantlife_modpack/ferns/depends.txt new file mode 100644 index 0000000..9d994c0 --- /dev/null +++ b/plantlife_modpack/ferns/depends.txt @@ -0,0 +1,2 @@ +default
+biome_lib
\ No newline at end of file diff --git a/plantlife_modpack/ferns/fern.lua b/plantlife_modpack/ferns/fern.lua new file mode 100644 index 0000000..51cac8f --- /dev/null +++ b/plantlife_modpack/ferns/fern.lua @@ -0,0 +1,196 @@ +-----------------------------------------------------------------------------------------------
+-- Ferns - Fern 0.1.0
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
+-- Looked at code from: default, flowers, painting, trees
+-- Dependencies: biome_lib
+-- Supports: dryplants, stoneage, sumpf
+-----------------------------------------------------------------------------------------------
+-- some inspiration from here
+-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
+-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
+-----------------------------------------------------------------------------------------------
+
+assert(abstract_ferns.config.enable_lady_fern == true)
+
+-- Maintain backward compatibilty
+minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
+minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
+minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
+minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
+
+local nodenames = {}
+
+local function create_nodes()
+ local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
+ local vscales = { 1, 2, 2.2 }
+ local descs = { "Lady-fern (Athyrium)", nil, nil }
+
+ for i = 1, 3 do
+ local node_on_place = nil
+ if i == 1 then
+ node_on_place = function(itemstack, placer, pointed_thing)
+ -- place a random fern
+ local stack = ItemStack("ferns:fern_0"..math.random(1,4))
+ local ret = minetest.item_place(stack, placer, pointed_thing)
+ return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
+ end
+ end
+ nodenames[i] = "ferns:fern_"..string.format("%02d", i)
+ minetest.register_node(nodenames[i], {
+ description = descs[i] or ("Lady-fern (Athyrium) " .. string.format("%02d", i)),
+ inventory_image = "ferns_fern.png",
+ drawtype = "plantlike",
+ visual_scale = vscales[i],
+ paramtype = "light",
+ tiles = { images[i] },
+ walkable = false,
+ buildable_to = true,
+ groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+ drop = "ferns:fern_01",
+ on_place = node_on_place
+ })
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+-- Init
+-----------------------------------------------------------------------------------------------
+
+create_nodes()
+
+-----------------------------------------------------------------------------------------------
+-- Spawning
+-----------------------------------------------------------------------------------------------
+
+if abstract_ferns.config.lady_ferns_near_tree == true then
+ biome_lib:register_generate_plant({ -- near trees (woodlands)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "default:desert_sand",
+ "default:sand",
+ "default:jungletree",
+ "stoneage:grass_with_silex",
+ "sumpf:sumpf"
+ },
+ max_count = 30,
+ rarity = 62,--63,
+ min_elevation = 1, -- above sea level
+ near_nodes = {"group:tree"},
+ near_nodes_size = 3,--4,
+ near_nodes_vertical = 2,--3,
+ near_nodes_count = 1,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+end
+
+if abstract_ferns.config.lady_ferns_near_rock == true then
+ biome_lib:register_generate_plant({ -- near stone (mountains)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "group:falling_node",
+ --"default:jungletree",
+ "stoneage:grass_with_silex",
+ "sumpf:sumpf"
+ },
+ max_count = 35,
+ rarity = 40,
+ min_elevation = 1, -- above sea level
+ near_nodes = {"group:stone"},
+ near_nodes_size = 1,
+ near_nodes_count = 16,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+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)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "default:stone_with_coal",
+ "default:stone_with_iron",
+ "moreores:mineral_tin",
+ "moreores:mineral_silver",
+ "sumpf:sumpf"
+ },
+ max_count = 1200,--1600, -- maybe too much? :D
+ rarity = 25,--15,
+ min_elevation = 1, -- above sea level
+ near_nodes = {
+ "default:stone_with_iron",
+ --"default:stone_with_copper",
+ --"default:stone_with_mese",
+ --"default:stone_with_gold",
+ --"default:stone_with_diamond",
+ "moreores:mineral_tin",
+ "moreores:mineral_silver"
+ --"moreores:mineral_mithril"
+ },
+ near_nodes_size = 2,
+ near_nodes_vertical = 4,--5,--6,
+ near_nodes_count = 2,--3,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+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({
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "default:stone_with_coal",
+ "default:stone_with_iron",
+ "moreores:mineral_tin",
+ "moreores:mineral_silver",
+ "sumpf:sumpf"
+ },
+ max_count = 70,
+ rarity = 25,--15,
+ min_elevation = 1, -- above sea level
+ near_nodes = {
+ "default:stone"
+ },
+ near_nodes_size = 2,
+ near_nodes_vertical = 2,--6,
+ near_nodes_count = 3,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+end
diff --git a/plantlife_modpack/ferns/gianttreefern.lua b/plantlife_modpack/ferns/gianttreefern.lua new file mode 100644 index 0000000..bc6516b --- /dev/null +++ b/plantlife_modpack/ferns/gianttreefern.lua @@ -0,0 +1,336 @@ +----------------------------------------------------------------------------------------------- +-- Ferns - Giant Tree Fern 0.1.1 +----------------------------------------------------------------------------------------------- +-- by Mossmanikin +-- License (everything): WTFPL +-- Contains code from: biome_lib +-- Looked at code from: 4seasons, default +-- Supports: vines +----------------------------------------------------------------------------------------------- + +assert(abstract_ferns.config.enable_giant_treefern == true) + +-- lot of code, lot to load + +abstract_ferns.grow_giant_tree_fern = function(pos) + local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.get_node(pos_01).name ~= "air" + and minetest.get_node(pos_01).name ~= "ferns:sapling_giant_tree_fern" + and minetest.get_node(pos_01).name ~= "default:junglegrass" then + return + end + + local size = math.random(12,16) -- min of range must be >= 4 + + local leafchecks = { + { + direction = 3, + positions = { + {x = pos.x + 1, y = pos.y + size - 1, z = pos.z }, + {x = pos.x + 2, y = pos.y + size , z = pos.z }, + {x = pos.x + 3, y = pos.y + size - 1, z = pos.z }, + {x = pos.x + 4, y = pos.y + size - 2, z = pos.z } + } + }, + { + direction = 1, + positions = { + {x = pos.x - 1, y = pos.y + size - 1, z = pos.z }, + {x = pos.x - 2, y = pos.y + size, z = pos.z }, + {x = pos.x - 3, y = pos.y + size - 1, z = pos.z }, + {x = pos.x - 4, y = pos.y + size - 2, z = pos.z } + } + }, + { + direction = 2, + positions = { + {x = pos.x , y = pos.y + size - 1, z = pos.z + 1}, + {x = pos.x , y = pos.y + size , z = pos.z + 2}, + {x = pos.x , y = pos.y + size - 1, z = pos.z + 3}, + {x = pos.x , y = pos.y + size - 2, z = pos.z + 4} + } + }, + { + direction = 0, + positions = { + {x = pos.x , y = pos.y + size - 1, z = pos.z - 1}, + {x = pos.x , y = pos.y + size , z = pos.z - 2}, + {x = pos.x , y = pos.y + size - 1, z = pos.z - 3}, + {x = pos.x , y = pos.y + size - 2, z = pos.z - 4} + } + } + } + + for i = 1, size-3 do + minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, {name="ferns:fern_trunk_big"}) + end + minetest.set_node({x = pos.x, y = pos.y + size-2, z = pos.z}, {name="ferns:fern_trunk_big_top"}) + minetest.set_node({x = pos.x, y = pos.y + size-1, z = pos.z}, {name="ferns:tree_fern_leaves_giant"}) + + -- all the checking for air below is to prevent some ugly bugs (incomplete trunks of neighbouring trees), it's a bit slower, but worth the result + + -- assert(#leafchecks == 4) + for i = 1, 4 do + local positions = leafchecks[i].positions + local rot = leafchecks[i].direction + local endpos = 4 -- If the loop below adds all intermediate leaves then the "terminating" leaf will be at positions[4] + -- assert(#positions == 4) + -- add leaves so long as the destination nodes are air + for j = 1, 3 do + if minetest.get_node(positions[j]).name == "air" then + minetest.set_node(positions[j], {name="ferns:tree_fern_leave_big"}) + else + endpos = j + break + end + end + -- add the terminating leaf if required and possible + if endpos == 4 and minetest.get_node(positions[endpos]).name == "air" then + minetest.set_node(positions[endpos], {name="ferns:tree_fern_leave_big_end", param2=rot}) + end + end +end + +----------------------------------------------------------------------------------------------- +-- GIANT TREE FERN LEAVES +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:tree_fern_leaves_giant", { + description = "Tree Fern Crown (Dicksonia)", + drawtype = "plantlike", + visual_scale = math.sqrt(8), + wield_scale = {x=0.175, y=0.175, z=0.175}, + paramtype = "light", + tiles = {"ferns_fern_tree_giant.png"}, + inventory_image = "ferns_fern_tree.png", + walkable = false, + groups = { + snappy=3, + flammable=2, + attached_node=1, + not_in_creative_inventory=1 + }, + drop = { + max_items = 2, + items = { + { + -- occasionally, drop a second sapling instead of leaves + -- (extra saplings can also be obtained by replanting and + -- reharvesting leaves) + items = {"ferns:sapling_giant_tree_fern"}, + rarity = 10, + }, + { + items = {"ferns:sapling_giant_tree_fern"}, + }, + { + items = {"ferns:tree_fern_leaves_giant"}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16}, + }, +}) +----------------------------------------------------------------------------------------------- +-- GIANT TREE FERN LEAVE PART +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:tree_fern_leave_big", { + description = "Giant Tree Fern Leaves", + drawtype = "raillike", + paramtype = "light", + tiles = { + "ferns_tree_fern_leave_big.png", + }, + walkable = false, + groups = { + snappy=3, + flammable=2, + attached_node=1, + not_in_creative_inventory=1 + }, + drop = "", + sounds = default.node_sound_leaves_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- GIANT TREE FERN LEAVE END +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:tree_fern_leave_big_end", { + description = "Giant Tree Fern Leave End", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { "ferns_tree_fern_leave_big_end.png" }, + walkable = false, + node_box = { + type = "fixed", +-- {left, bottom, front, right, top, back } + fixed = {-1/2, -1/2, 1/2, 1/2, 33/64, 1/2}, + }, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, 1/2, 1/2, 33/64, 1/2}, + }, + groups = { + snappy=3, + flammable=2, + attached_node=1, + not_in_creative_inventory=1 + }, + drop = "", + sounds = default.node_sound_leaves_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- GIANT TREE FERN TRUNK TOP +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:fern_trunk_big_top", { + description = "Giant Fern Trunk", + drawtype = "nodebox", + paramtype = "light", + tiles = { + "ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png", + "ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png", + "ferns_fern_trunk_big.png" + }, + node_box = { + type = "fixed", +-- {left, bottom, front, right, top, back } + fixed = { + {-1/2, 33/64, -1/2, 1/2, 33/64, 1/2}, + {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, + } + }, + selection_box = { + type = "fixed", + fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, + }, + groups = { + tree=1, + choppy=2, + oddly_breakable_by_hand=2, + flammable=3, + wood=1, + not_in_creative_inventory=1, + leafdecay=3 -- to support vines + }, + drop = "ferns:fern_trunk_big", + sounds = default.node_sound_wood_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- GIANT TREE FERN TRUNK +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:fern_trunk_big", { + description = "Giant Fern Trunk", + drawtype = "nodebox", + paramtype = "light", + tiles = { + "ferns_fern_trunk_big_top.png", + "ferns_fern_trunk_big_top.png", + "ferns_fern_trunk_big.png" + }, + node_box = { + type = "fixed", + fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, + }, + selection_box = { + type = "fixed", + fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, + }, + groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), + after_destruct = function(pos,oldnode) + local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}) + if node.name == "ferns:fern_trunk_big" or node.name == "ferns:fern_trunk_big_top" then + minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z}) + minetest.add_item(pos,"ferns:fern_trunk_big") + end + end, +}) + +----------------------------------------------------------------------------------------------- +-- GIANT TREE FERN SAPLING +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:sapling_giant_tree_fern", { + description = "Giant Tree Fern Sapling", + drawtype = "plantlike", + paramtype = "light", + 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}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16}, + }, +}) + +-- abm +minetest.register_abm({ + nodenames = "ferns:sapling_giant_tree_fern", + interval = 1000, + chance = 4, + action = function(pos, node, _, _) + abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z}) + end +}) + +----------------------------------------------------------------------------------------------- +-- GENERATE GIANT TREE FERN +----------------------------------------------------------------------------------------------- + +-- in jungles +if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then + biome_lib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + "default:sand", + "default:desert_sand"--, + --"dryplants:grass_short" + }, + max_count = 12,--27, + avoid_nodes = {"group:tree"}, + avoid_radius = 3,--4, + rarity = 85, + seed_diff = 329, + min_elevation = 1, + near_nodes = {"default:jungletree"}, + near_nodes_size = 6, + near_nodes_vertical = 2,--4, + near_nodes_count = 1, + plantlife_limit = -0.9, + }, + abstract_ferns.grow_giant_tree_fern + ) +end + +-- for oases & tropical beaches +if abstract_ferns.config.enable_giant_treeferns_in_oases == true then + biome_lib:register_generate_plant({ + surface = { + "default:sand"--, + --"default:desert_sand" + }, + max_count = 10,--27, + rarity = 90, + seed_diff = 329, + neighbors = {"default:desert_sand"}, + ncount = 1, + min_elevation = 1, + near_nodes = {"default:water_source"}, + near_nodes_size = 2, + near_nodes_vertical = 1, + near_nodes_count = 1, + plantlife_limit = -0.9, + humidity_max = -1.0, + humidity_min = 1.0, + temp_max = -1.0, + temp_min = 1.0, + }, + abstract_ferns.grow_giant_tree_fern + ) +end diff --git a/plantlife_modpack/ferns/horsetail.lua b/plantlife_modpack/ferns/horsetail.lua new file mode 100644 index 0000000..b87f1f9 --- /dev/null +++ b/plantlife_modpack/ferns/horsetail.lua @@ -0,0 +1,156 @@ +----------------------------------------------------------------------------------------------- +-- Archae Plantae - Horsetail 0.0.5 +----------------------------------------------------------------------------------------------- +-- by Mossmanikin +-- License (everything): WTFPL +-- Contains code from: biome_lib +-- Looked at code from: default, flowers, trees +-- Dependencies: biome_lib +-- Supports: dryplants, stoneage, sumpf +----------------------------------------------------------------------------------------------- + +assert(abstract_ferns.config.enable_horsetails == true) + +----------------------------------------------------------------------------------------------- +-- HORSETAIL (EQUISETUM) +----------------------------------------------------------------------------------------------- + +local node_names = {} + +local function create_nodes() + local selection_boxes = { + { -0.15, -1/2, -0.15, 0.15, -1/16, 0.15 }, + { -0.15, -1/2, -0.15, 0.15, 1/16, 0.15 }, + { -0.15, -1/2, -0.15, 0.15, 4/16, 0.15 }, + { -0.15, -1/2, -0.15, 0.15, 7/16, 0.15 }, + } + + for i = 1, 4 do + local node_name = "ferns:horsetail_" .. string.format("%02d", i) + local node_img = "ferns_horsetail_" .. string.format("%02d", i) .. ".png" + local node_desc + local node_on_use = nil + local node_drop = "ferns:horsetail_04" + + if i == 1 then + node_desc = "Young Horsetail (Equisetum)" + node_on_use = minetest.item_eat(1) -- young ones edible https://en.wikipedia.org/wiki/Equisetum + node_drop = node_name + elseif i == 4 then + node_desc = "Horsetail (Equisetum)" + else + node_desc = "Horsetail (Equisetum) ".. string.format("%02d", i) + end + + node_names[i] = node_name + + minetest.register_node(node_name, { + description = node_desc, + drawtype = "plantlike", + paramtype = "light", + tiles = { node_img }, + inventory_image = node_img, + walkable = false, + buildable_to = true, + groups = {snappy=3,flammable=2,attached_node=1,horsetail=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = selection_boxes[i], + }, + on_use = node_on_use, + drop = node_drop, + }) + end +end + +----------------------------------------------------------------------------------------------- +-- Init +----------------------------------------------------------------------------------------------- + +create_nodes() + +----------------------------------------------------------------------------------------------- +-- Spawning +----------------------------------------------------------------------------------------------- +if abstract_ferns.config.enable_horsetails_spawning == true then + biome_lib:spawn_on_surfaces({ + spawn_delay = 1200, + spawn_plants = node_names, + spawn_chance = 400, + spawn_surfaces = { + "default:dirt_with_grass", + "default:desert_sand", + "default:sand", + "dryplants:grass_short", + "stoneage:grass_with_silex", + "default:mossycobble", + "default:gravel" + }, + seed_diff = 329, + min_elevation = 1, -- above sea level + near_nodes = {"default:water_source","default:gravel"}, + near_nodes_size = 2, + near_nodes_vertical = 1, + near_nodes_count = 1, + --random_facedir = { 0, 179 }, + }) +end + +----------------------------------------------------------------------------------------------- +-- Generating +----------------------------------------------------------------------------------------------- + +if abstract_ferns.config.enable_horsetails_on_grass == true then + biome_lib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + "sumpf:sumpf" + }, + max_count = 35, + rarity = 40, + min_elevation = 1, -- above sea level + near_nodes = { + "group:water", -- likes water (of course) + "default:gravel", -- near those on gravel + "default:sand", -- some like sand + "default:clay", -- some like clay + "stoneage:grass_with_silex", + "default:mossycobble", + "default:cobble", + "sumpf:sumpf" + }, + near_nodes_size = 3, + near_nodes_vertical = 2,--3, + near_nodes_count = 1, + plantlife_limit = -0.9, + humidity_min = 0.4, + temp_max = -0.5, -- 55 °C + temp_min = 0.53, -- 0 °C, dies back in winter + --random_facedir = { 0, 179 }, + }, + node_names + ) +end + +if abstract_ferns.config.enable_horsetails_on_stones == true then + biome_lib:register_generate_plant({ + surface = { + "default:gravel", -- roots go deep + "default:mossycobble", + "stoneage:dirt_with_silex", + "stoneage:grass_with_silex", + "stoneage:sand_with_silex", -- roots go deep + }, + max_count = 35, + rarity = 20, + min_elevation = 1, -- above sea level + plantlife_limit = -0.9, + humidity_min = 0.4, + temp_max = -0.5, -- 55 °C + temp_min = 0.53, -- 0 °C, dies back in winter + --random_facedir = { 0, 179 }, + }, + node_names + ) +end diff --git a/plantlife_modpack/ferns/init.lua b/plantlife_modpack/ferns/init.lua new file mode 100644 index 0000000..b629d5d --- /dev/null +++ b/plantlife_modpack/ferns/init.lua @@ -0,0 +1,69 @@ +----------------------------------------------------------------------------------------------- +local title = "Ferns" -- former "Archae Plantae" +local version = "0.2.0" +local mname = "ferns" -- former "archaeplantae" +----------------------------------------------------------------------------------------------- +-- (by Mossmanikin) +-- License (everything): WTFPL +----------------------------------------------------------------------------------------------- + +abstract_ferns = {} + +dofile(minetest.get_modpath("ferns").."/settings.lua") + +if abstract_ferns.config.enable_lady_fern == true then + dofile(minetest.get_modpath("ferns").."/fern.lua") +end + +if abstract_ferns.config.enable_horsetails == true then + dofile(minetest.get_modpath("ferns").."/horsetail.lua") +end + +if abstract_ferns.config.enable_treefern == true then + dofile(minetest.get_modpath("ferns").."/treefern.lua") +end + +if abstract_ferns.config.enable_giant_treefern == true then + dofile(minetest.get_modpath("ferns").."/gianttreefern.lua") +end + +dofile(minetest.get_modpath("ferns").."/crafting.lua") + + +----------------------------------------------------------------------------- +-- TESTS +----------------------------------------------------------------------------- +local run_tests = true -- set to false to skip + +if run_tests then + + -- These are, essentially, unit tests to make sure that all required item + -- strings are registered. The init sequence is not time critical so leaving + -- them here won't affect performance. + + -- Check node names + if abstract_ferns.config.enable_horsetails then + print("[Mod] " ..title.. " Checking horsetail item strings") + assert(minetest.registered_items["ferns:horsetail_01"] ~= nil) + assert(minetest.registered_items["ferns:horsetail_02"] ~= nil) + assert(minetest.registered_items["ferns:horsetail_03"] ~= nil) + assert(minetest.registered_items["ferns:horsetail_04"] ~= nil) + end + if abstract_ferns.config.enable_lady_fern then + print("[Mod] ".. title .." Checking lady fern item strings") + assert(minetest.registered_items["ferns:fern_01"] ~= nil) + assert(minetest.registered_items["ferns:fern_02"] ~= nil) + assert(minetest.registered_items["ferns:fern_03"] ~= nil) + end + if abstract_ferns.config.enable_treefern then + print("[Mod] ".. title .." Checking tree fern item strings") + assert(minetest.registered_items["ferns:tree_fern_leaves"] ~= nil) + assert(minetest.registered_items["ferns:tree_fern_leaves_02"] ~= nil) + assert(minetest.registered_items["ferns:fern_trunk"] ~= nil) + assert(minetest.registered_items["ferns:sapling_tree_fern"] ~= nil) + end +end + +----------------------------------------------------------------------------------------------- +print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") +----------------------------------------------------------------------------------------------- diff --git a/plantlife_modpack/ferns/settings.lua b/plantlife_modpack/ferns/settings.lua new file mode 100644 index 0000000..8254fcf --- /dev/null +++ b/plantlife_modpack/ferns/settings.lua @@ -0,0 +1,43 @@ +-- In case you don't wanna have errors: + +-- Only change what's behind a "=" (or "--"). +-- Don't use caps (behind a "="). + +-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around). +-- Spelling is important. +-- If "true" or "false" is necessary as setting, everything(!) which is not spelled "true" will be read as if it were "false" (even "1", "True"...) + +-- If you wanna comment something (for example to remember the default value), you can do this by putting "--" in front of the comment. +-- You can put "--" at the end of a line with "=" in it, or at the beginning of an empty/new line (minetest will ignore what's behind it then). +-- But don't put "--" in front of a line with "=" in it (or else minetest will ignore the setting and you might get an error). + +-- If something is still unclear, don't hesitate to post your question @ https://forum.minetest.net/viewtopic.php?id=6921 + +abstract_ferns.config = {} + +-- Which plants should generate/spawn? +abstract_ferns.config.enable_lady_fern = true +abstract_ferns.config.enable_horsetails = true +abstract_ferns.config.enable_treefern = true +abstract_ferns.config.enable_giant_treefern = true + +-- Where should they generate/spawn? (if they generate/spawn) +-- +-- Lady-Fern +abstract_ferns.config.lady_ferns_near_tree = true +abstract_ferns.config.lady_ferns_near_rock = true +abstract_ferns.config.lady_ferns_near_ores = true -- if there's a bunch of ferns there's ores nearby, this one causes a huge fps drop +abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a replacement of Ferns_near_Ores: ferns tend to generate in groups, less fps drop, no hint for nearby ores +-- +-- Horsetails +abstract_ferns.config.enable_horsetails_spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel +abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod) +abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod) +-- +-- Tree_Fern +abstract_ferns.config.enable_treeferns_in_jungle = true +abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches +-- +-- Giant_Tree_Fern +abstract_ferns.config.enable_giant_treeferns_in_jungle = true +abstract_ferns.config.enable_giant_treeferns_in_oases = true -- for oases and tropical beaches diff --git a/plantlife_modpack/ferns/textures/ferns_5.png b/plantlife_modpack/ferns/textures/ferns_5.png Binary files differnew file mode 100644 index 0000000..7e40665 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_5.png diff --git a/plantlife_modpack/ferns/textures/ferns_6.png b/plantlife_modpack/ferns/textures/ferns_6.png Binary files differnew file mode 100644 index 0000000..107bbf6 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_6.png diff --git a/plantlife_modpack/ferns/textures/ferns_7.png b/plantlife_modpack/ferns/textures/ferns_7.png Binary files differnew file mode 100644 index 0000000..b1ac1f5 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_7.png diff --git a/plantlife_modpack/ferns/textures/ferns_8.png b/plantlife_modpack/ferns/textures/ferns_8.png Binary files differnew file mode 100644 index 0000000..db5510b --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_8.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern.png b/plantlife_modpack/ferns/textures/ferns_fern.png Binary files differnew file mode 100644 index 0000000..7884e5a --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_big.png b/plantlife_modpack/ferns/textures/ferns_fern_big.png Binary files differnew file mode 100644 index 0000000..42deb95 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_big.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_mid.png b/plantlife_modpack/ferns/textures/ferns_fern_mid.png Binary files differnew file mode 100644 index 0000000..3213308 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_mid.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree.png b/plantlife_modpack/ferns/textures/ferns_fern_tree.png Binary files differnew file mode 100644 index 0000000..8daeafd --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_tree.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_giant.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_giant.png Binary files differnew file mode 100644 index 0000000..2e3adb7 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_giant.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_inv.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_inv.png Binary files differnew file mode 100644 index 0000000..5417669 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_inv.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_tl.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_tl.png Binary files differnew file mode 100644 index 0000000..16b6e3a --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_tl.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_tr.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_tr.png Binary files differnew file mode 100644 index 0000000..768430f --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_tr.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk.png Binary files differnew file mode 100644 index 0000000..a8e1bf6 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk_big.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big.png Binary files differnew file mode 100644 index 0000000..24ede0a --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk_big_top.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big_top.png Binary files differnew file mode 100644 index 0000000..3e3c829 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big_top.png diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk_top.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk_top.png Binary files differnew file mode 100644 index 0000000..8b259cc --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk_top.png diff --git a/plantlife_modpack/ferns/textures/ferns_ferntuber.png b/plantlife_modpack/ferns/textures/ferns_ferntuber.png Binary files differnew file mode 100644 index 0000000..2d6785d --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_ferntuber.png diff --git a/plantlife_modpack/ferns/textures/ferns_ferntuber_roasted.png b/plantlife_modpack/ferns/textures/ferns_ferntuber_roasted.png Binary files differnew file mode 100644 index 0000000..f62a88d --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_ferntuber_roasted.png diff --git a/plantlife_modpack/ferns/textures/ferns_fiddlehead.png b/plantlife_modpack/ferns/textures/ferns_fiddlehead.png Binary files differnew file mode 100644 index 0000000..0925c78 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fiddlehead.png diff --git a/plantlife_modpack/ferns/textures/ferns_fiddlehead_roasted.png b/plantlife_modpack/ferns/textures/ferns_fiddlehead_roasted.png Binary files differnew file mode 100644 index 0000000..9f4943c --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_fiddlehead_roasted.png diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_01.png b/plantlife_modpack/ferns/textures/ferns_horsetail_01.png Binary files differnew file mode 100644 index 0000000..60d3ca6 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_horsetail_01.png diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_02.png b/plantlife_modpack/ferns/textures/ferns_horsetail_02.png Binary files differnew file mode 100644 index 0000000..3c7edf7 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_horsetail_02.png diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_03.png b/plantlife_modpack/ferns/textures/ferns_horsetail_03.png Binary files differnew file mode 100644 index 0000000..5d28a46 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_horsetail_03.png diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_04.png b/plantlife_modpack/ferns/textures/ferns_horsetail_04.png Binary files differnew file mode 100644 index 0000000..a8254ed --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_horsetail_04.png diff --git a/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern.png b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern.png Binary files differnew file mode 100644 index 0000000..b459d48 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern.png diff --git a/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern_giant.png b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern_giant.png Binary files differnew file mode 100644 index 0000000..e556016 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern_giant.png diff --git a/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big.png b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big.png Binary files differnew file mode 100644 index 0000000..09cc001 --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big.png diff --git a/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_cross.png b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_cross.png Binary files differnew file mode 100644 index 0000000..48f7e2c --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_cross.png diff --git a/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_end.png b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_end.png Binary files differnew file mode 100644 index 0000000..d0064fe --- /dev/null +++ b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_end.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/archaeplantae_horsetails.png b/plantlife_modpack/ferns/textures/not_in_use/archaeplantae_horsetails.png Binary files differnew file mode 100644 index 0000000..6ba89c1 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/archaeplantae_horsetails.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/big picture 3.png b/plantlife_modpack/ferns/textures/not_in_use/big picture 3.png Binary files differnew file mode 100644 index 0000000..de344e6 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/big picture 3.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_left.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_left.png Binary files differnew file mode 100644 index 0000000..0fdf515 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_left.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_right.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_right.png Binary files differnew file mode 100644 index 0000000..d30def0 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_right.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_left.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_left.png Binary files differnew file mode 100644 index 0000000..d146df3 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_left.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_right.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_right.png Binary files differnew file mode 100644 index 0000000..e10460a --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_right.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_bl.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_bl.png Binary files differnew file mode 100644 index 0000000..e2fdb67 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_bl.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_br.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_br.png Binary files differnew file mode 100644 index 0000000..eb547e8 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_br.png diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_trunk_big_crown.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_trunk_big_crown.png Binary files differnew file mode 100644 index 0000000..7a12671 --- /dev/null +++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_trunk_big_crown.png diff --git a/plantlife_modpack/ferns/textures/old/archaeplantae_fern_old4.png b/plantlife_modpack/ferns/textures/old/archaeplantae_fern_old4.png Binary files differnew file mode 100644 index 0000000..a3d403c --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/archaeplantae_fern_old4.png diff --git a/plantlife_modpack/ferns/textures/old/comb.png b/plantlife_modpack/ferns/textures/old/comb.png Binary files differnew file mode 100644 index 0000000..ea1e19f --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/comb.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_5_old.png b/plantlife_modpack/ferns/textures/old/ferns_5_old.png Binary files differnew file mode 100644 index 0000000..5676278 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_5_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_6_old.png b/plantlife_modpack/ferns/textures/old/ferns_6_old.png Binary files differnew file mode 100644 index 0000000..36d6040 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_6_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_7_old.png b/plantlife_modpack/ferns/textures/old/ferns_7_old.png Binary files differnew file mode 100644 index 0000000..8aabe61 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_7_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_big_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_big_old.png Binary files differnew file mode 100644 index 0000000..d17ed11 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_fern_big_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_mid_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_mid_old.png Binary files differnew file mode 100644 index 0000000..08513c2 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_fern_mid_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_tree_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_tree_old.png Binary files differnew file mode 100644 index 0000000..4599672 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_fern_tree_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_old2.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_old2.png Binary files differnew file mode 100644 index 0000000..a048ee0 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_old2.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old.png Binary files differnew file mode 100644 index 0000000..d83151f --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old2.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old2.png Binary files differnew file mode 100644 index 0000000..244ddfe --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old2.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_top_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_top_old.png Binary files differnew file mode 100644 index 0000000..872fdab --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_top_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_01_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_01_old2.png Binary files differnew file mode 100644 index 0000000..7d55718 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_01_old2.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_02_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_02_old2.png Binary files differnew file mode 100644 index 0000000..d0b5563 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_02_old2.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_03_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_03_old2.png Binary files differnew file mode 100644 index 0000000..42cf76e --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_03_old2.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_04_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_04_old2.png Binary files differnew file mode 100644 index 0000000..600ebe7 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_04_old2.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_cross_old.png b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_cross_old.png Binary files differnew file mode 100644 index 0000000..00ec9d8 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_cross_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_end_old.png b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_end_old.png Binary files differnew file mode 100644 index 0000000..ce1a87d --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_end_old.png diff --git a/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_old.png b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_old.png Binary files differnew file mode 100644 index 0000000..b568383 --- /dev/null +++ b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_old.png diff --git a/plantlife_modpack/ferns/treefern.lua b/plantlife_modpack/ferns/treefern.lua new file mode 100644 index 0000000..4ba502b --- /dev/null +++ b/plantlife_modpack/ferns/treefern.lua @@ -0,0 +1,228 @@ +----------------------------------------------------------------------------------------------- +-- Ferns - Tree Fern 0.1.1 +----------------------------------------------------------------------------------------------- +-- by Mossmanikin +-- License (everything): WTFPL +-- Contains code from: biome_lib +-- Looked at code from: default , trees +----------------------------------------------------------------------------------------------- + +assert(abstract_ferns.config.enable_treefern == true) + +abstract_ferns.grow_tree_fern = function(pos) + + local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.get_node(pos_01).name ~= "air" + and minetest.get_node(pos_01).name ~= "ferns:sapling_tree_fern" + and minetest.get_node(pos_01).name ~= "default:junglegrass" then + return + end + + local size = math.random(1, 4) + math.random(1, 4) + if (size > 5) then + size = 10 - size + end + size = size + 1 + local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[math.random(1, 2)] + + local i = 1 + while (i < size-1) do + if minetest.get_node({x = pos.x, y = pos.y + i + 1, z = pos.z}).name ~= "air" then + break + end + minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = "ferns:fern_trunk" }) + i = i + 1 + end + + minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = crown }) +end + +----------------------------------------------------------------------------------------------- +-- TREE FERN LEAVES +----------------------------------------------------------------------------------------------- + +-- TODO: Both of these nodes look the same? + +minetest.register_node("ferns:tree_fern_leaves", { + description = "Tree Fern Crown (Dicksonia)", + drawtype = "plantlike", + visual_scale = 2, + paramtype = "light", + paramtype2 = "facedir", + --tiles = {"[combine:32x32:0,0=top_left.png:0,16=bottom_left.png:16,0=top_right.png:16,16=bottom_right.png"}, + tiles = {"ferns_fern_tree.png"}, + inventory_image = "ferns_fern_tree_inv.png", + walkable = false, + groups = {snappy=3,flammable=2,attached_node=1}, + drop = { + max_items = 2, + items = { + { + -- occasionally, drop a second sapling instead of leaves + -- (extra saplings can also be obtained by replanting and + -- reharvesting leaves) + items = {"ferns:sapling_tree_fern"}, + rarity = 10, + }, + { + items = {"ferns:sapling_tree_fern"}, + }, + { + items = {"ferns:tree_fern_leaves"}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16}, + }, +}) +minetest.register_node("ferns:tree_fern_leaves_02", { + drawtype = "plantlike", + visual_scale = 2, + paramtype = "light", + tiles = {"ferns_fern_big.png"}, + walkable = false, + groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1}, + drop = { + max_items = 2, + items = { + { + -- occasionally, drop a second sapling instead of leaves + -- (extra saplings can also be obtained by replanting and + -- reharvesting leaves) + items = {"ferns:sapling_tree_fern"}, + rarity = 10, + }, + { + items = {"ferns:sapling_tree_fern"}, + }, + { + items = {"ferns:tree_fern_leaves"}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16}, + }, +}) +----------------------------------------------------------------------------------------------- +-- FERN TRUNK +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:fern_trunk", { + description = "Fern Trunk (Dicksonia)", + drawtype = "nodebox", + paramtype = "light", + tiles = { + "ferns_fern_trunk_top.png", + "ferns_fern_trunk_top.png", + "ferns_fern_trunk.png" + }, + node_box = { + type = "fixed", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}, + }, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), + after_destruct = function(pos,oldnode) + local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z}) + if node.name == "ferns:fern_trunk" then + minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z}) + minetest.add_item(pos,"ferns:fern_trunk") + end + end, +}) + +----------------------------------------------------------------------------------------------- +-- TREE FERN SAPLING +----------------------------------------------------------------------------------------------- +minetest.register_node("ferns:sapling_tree_fern", { + description = "Tree Fern Sapling (Dicksonia)", + drawtype = "plantlike", + paramtype = "light", + paramtype2 = "facedir", + 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}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16}, + }, +}) +-- abm +minetest.register_abm({ + nodenames = "ferns:sapling_tree_fern", + interval = 1000, + chance = 4, + action = function(pos, node, _, _) + abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z}) + end +}) + +----------------------------------------------------------------------------------------------- +-- GENERATE TREE FERN +----------------------------------------------------------------------------------------------- + +-- in jungles +if abstract_ferns.config.enable_treeferns_in_jungle == true then + biome_lib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + "default:sand", + "default:desert_sand", + }, + max_count = 35,--27, + avoid_nodes = {"default:tree"}, + avoid_radius = 4, + rarity = 50, + seed_diff = 329, + min_elevation = -10, + near_nodes = {"default:jungletree"}, + near_nodes_size = 6, + near_nodes_vertical = 2,--4, + near_nodes_count = 1, + plantlife_limit = -0.9, + humidity_max = -1.0, + humidity_min = 0.4, + temp_max = -0.5, + temp_min = 0.13, + }, + abstract_ferns.grow_tree_fern + ) +end + +-- for oases & tropical beaches +if abstract_ferns.config.enable_treeferns_in_oases == true then + biome_lib:register_generate_plant({ + surface = { + "default:sand"--, + --"default:desert_sand" + }, + max_count = 35, + rarity = 50, + seed_diff = 329, + neighbors = {"default:desert_sand"}, + ncount = 1, + min_elevation = 1, + near_nodes = {"default:water_source"}, + near_nodes_size = 2, + near_nodes_vertical = 1, + near_nodes_count = 1, + plantlife_limit = -0.9, + humidity_max = -1.0, + humidity_min = 1.0, + temp_max = -1.0, + temp_min = 1.0, + }, + abstract_ferns.grow_tree_fern +) +end diff --git a/plantlife_modpack/flowers_plus/depends.txt b/plantlife_modpack/flowers_plus/depends.txt new file mode 100644 index 0000000..37952da --- /dev/null +++ b/plantlife_modpack/flowers_plus/depends.txt @@ -0,0 +1,2 @@ +biome_lib +farming? diff --git a/plantlife_modpack/flowers_plus/flowers-changelog.txt b/plantlife_modpack/flowers_plus/flowers-changelog.txt new file mode 100644 index 0000000..fbe7518 --- /dev/null +++ b/plantlife_modpack/flowers_plus/flowers-changelog.txt @@ -0,0 +1,24 @@ +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. diff --git a/plantlife_modpack/flowers_plus/init.lua b/plantlife_modpack/flowers_plus/init.lua new file mode 100644 index 0000000..f8aa93d --- /dev/null +++ b/plantlife_modpack/flowers_plus/init.lua @@ -0,0 +1,479 @@ +local S = biome_lib.intllib + +-- 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, + + 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.set_node(place_pos, {name = nodename, param2 = math.random(0,3) }) + else + local fdir = minetest.dir_to_facedir(placer:get_look_dir()) + minetest.set_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.set_node(place_pos, {name = nodename, param2 = math.random(0,3) }) + else + local fdir = minetest.dir_to_facedir(placer:get_look_dir()) + minetest.set_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 = "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.set_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.set_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(S("[Flowers] Loaded.")) diff --git a/plantlife_modpack/flowers_plus/locale/de.txt b/plantlife_modpack/flowers_plus/locale/de.txt new file mode 100644 index 0000000..5195be7 --- /dev/null +++ b/plantlife_modpack/flowers_plus/locale/de.txt @@ -0,0 +1,13 @@ +# Translation by Xanthin + +Waterlily = Seerose +Seaweed = Seetang +Potted Rose = Eingetopfte Rose +Potted Tulip = Eingetopfte Tulpe +Potted Yellow Dandelion = Eingetopfter Loewenzahn +Potted White Dandelion = Eingetopfte Pusteblume +Potted Blue Geranium = Eingetopfte blaue Geranie +Potted Viola = Eingetopftes Veilchen +Flower Pot = Blumentopf + +[Flowers] Loaded. = [Flowers] Geladen. diff --git a/plantlife_modpack/flowers_plus/locale/fr.txt b/plantlife_modpack/flowers_plus/locale/fr.txt new file mode 100644 index 0000000..c4f4737 --- /dev/null +++ b/plantlife_modpack/flowers_plus/locale/fr.txt @@ -0,0 +1,13 @@ +# Template + +Waterlily = Nénuphar +Seaweed = Algues +Potted Rose = Rose en pot +Potted Tulip = Tulipe en pot +Potted Yellow Dandelion = Pissenlit jaune en pot +Potted White Dandelion = Pissenlit blanc en pot +Potted Blue Geranium = Géranium bleu en pot +Potted Viola = Violette en pot +Flower Pot = Fleurs en pot + +[Flowers] Loaded. = [Fleurs] Chargées. diff --git a/plantlife_modpack/flowers_plus/locale/template.txt b/plantlife_modpack/flowers_plus/locale/template.txt new file mode 100644 index 0000000..42ac830 --- /dev/null +++ b/plantlife_modpack/flowers_plus/locale/template.txt @@ -0,0 +1,13 @@ +# Template + +Waterlily = +Seaweed = +Potted Rose = +Potted Tulip = +Potted Yellow Dandelion = +Potted White Dandelion = +Potted Blue Geranium = +Potted Viola = +Flower Pot = + +[Flowers] Loaded. = diff --git a/plantlife_modpack/flowers_plus/models/flowers_sunflower.obj b/plantlife_modpack/flowers_plus/models/flowers_sunflower.obj new file mode 100644 index 0000000..35beb8d --- /dev/null +++ b/plantlife_modpack/flowers_plus/models/flowers_sunflower.obj @@ -0,0 +1,73 @@ +# Blender v2.70 (sub 0) OBJ File: 'sunflower.blend' +# www.blender.org +mtllib sunflower_sunflower.mtl +o Cube +v -0.015625 -0.500000 0.028125 +v -0.015625 -0.500000 -0.028125 +v 0.028125 -0.500000 -0.028125 +v 0.028125 -0.500000 0.028125 +v -0.015625 0.790890 0.028125 +v -0.015625 0.689140 -0.028125 +v 0.028125 0.689140 -0.028125 +v 0.028125 0.790890 0.028125 +v 0.250000 0.533494 -0.125000 +v -0.250000 0.533494 -0.125000 +v 0.250000 0.966506 0.125000 +v -0.250000 0.966506 0.125000 +v 0.267063 0.373606 -0.088749 +v 0.044375 0.303464 -0.141576 +v 0.239202 0.473737 0.108253 +v -0.008452 0.378817 0.108253 +v 0.017721 0.016639 -0.112053 +v -0.231280 0.110242 -0.115181 +v -0.030356 -0.036246 0.146223 +v -0.252831 0.028885 0.088910 +v 0.062500 0.641747 -0.057917 +v -0.106953 0.097386 -0.113617 +v -0.006318 -0.053008 0.024707 +v 0.118968 0.360674 0.006909 +v 0.116101 0.452031 0.108253 +v 0.017962 0.298392 -0.019504 +v 0.145794 0.358736 -0.115163 +v 0.240237 0.375544 0.033323 +v -0.224509 0.021356 -0.032606 +v -0.131273 0.023638 0.117567 +v -0.102951 0.016109 -0.003950 +vt 0.750000 0.875000 +vt 0.625000 0.875000 +vt 0.625000 0.750000 +vt 0.750000 0.750000 +vt 0.750000 1.000000 +vt 0.625000 1.000000 +vt 0.625000 0.500000 +vt 0.500000 0.500000 +vt 0.500000 1.000000 +vt 0.000100 0.500100 +vt 0.499900 0.500100 +vt 0.499900 0.999900 +vt 0.000100 0.999900 +vt 0.250000 0.250000 +vt 0.500000 0.250000 +vt 0.250000 0.500000 +vt 0.000000 0.250000 +vt 0.000000 0.000000 +vt 0.250000 0.000000 +vt 0.000000 0.500000 +vt 0.500000 0.000000 +usemtl Sunflower +s off +f 1/1 2/2 3/3 4/4 +f 5/5 8/6 7/2 6/1 +f 1/7 5/8 6/9 2/6 +f 2/7 6/6 7/9 3/8 +f 3/7 7/8 8/9 4/6 +f 5/7 1/8 4/9 8/6 +f 9/10 10/11 12/12 11/13 +f 24/14 26/15 16/8 25/16 +f 31/14 29/17 20/18 30/19 +f 17/8 22/16 31/14 23/15 +f 22/16 18/20 29/17 31/14 +f 27/19 14/21 26/15 24/14 +f 13/18 27/19 24/14 28/17 +f 23/15 31/14 30/19 19/21 +f 28/17 24/14 25/16 15/20 diff --git a/plantlife_modpack/flowers_plus/textures/flowers_seaweed.png b/plantlife_modpack/flowers_plus/textures/flowers_seaweed.png Binary files differnew file mode 100644 index 0000000..b5bd99c --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_seaweed.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_seaweedLight.png b/plantlife_modpack/flowers_plus/textures/flowers_seaweedLight.png Binary files differnew file mode 100644 index 0000000..7595ebc --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_seaweedLight.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_seaweed_2.png b/plantlife_modpack/flowers_plus/textures/flowers_seaweed_2.png Binary files differnew file mode 100644 index 0000000..0b24730 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_seaweed_2.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_seaweed_3.png b/plantlife_modpack/flowers_plus/textures/flowers_seaweed_3.png Binary files differnew file mode 100644 index 0000000..d9b7f43 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_seaweed_3.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_seaweed_4.png b/plantlife_modpack/flowers_plus/textures/flowers_seaweed_4.png Binary files differnew file mode 100644 index 0000000..887c183 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_seaweed_4.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_sunflower.png b/plantlife_modpack/flowers_plus/textures/flowers_sunflower.png Binary files differnew file mode 100644 index 0000000..fb95cb4 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_sunflower.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_sunflower_inv.png b/plantlife_modpack/flowers_plus/textures/flowers_sunflower_inv.png Binary files differnew file mode 100644 index 0000000..c36ed01 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_sunflower_inv.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily.png Binary files differnew file mode 100644 index 0000000..7b58bb2 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily_22.5.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_22.5.png Binary files differnew file mode 100644 index 0000000..73647ac --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_22.5.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily_45.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_45.png Binary files differnew file mode 100644 index 0000000..7ca683e --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_45.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily_67.5.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_67.5.png Binary files differnew file mode 100644 index 0000000..234da60 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_67.5.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_1.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_1.png Binary files differnew file mode 100644 index 0000000..a2d88cd --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_1.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_2.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_2.png Binary files differnew file mode 100644 index 0000000..7d2ba86 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_2.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_3.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_3.png Binary files differnew file mode 100644 index 0000000..bfcab90 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_3.png diff --git a/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_4.png b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_4.png Binary files differnew file mode 100644 index 0000000..8119ea7 --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/flowers_waterlily_small_4.png diff --git a/plantlife_modpack/flowers_plus/textures/tr.txt b/plantlife_modpack/flowers_plus/textures/tr.txt new file mode 100644 index 0000000..9e6372e --- /dev/null +++ b/plantlife_modpack/flowers_plus/textures/tr.txt @@ -0,0 +1,14 @@ +# Turkish translation +# mahmutelmas06@hotmail.com + +Waterlily = Nilüfer +Seaweed = Deniz yosunu +Potted Rose = Saksı gülü +Potted Tulip = Saksı lalesi +Potted Yellow Dandelion = Sarı hindiba +Potted White Dandelion = Beyaz hindiba +Potted Blue Geranium = Mavi hindiba +Potted Viola = Saksı MenekÅŸesi +Flower Pot = Saksı + +[Flowers] Loaded. = [Flowers] yüklendi. diff --git a/plantlife_modpack/junglegrass/init.lua b/plantlife_modpack/junglegrass/init.lua new file mode 100644 index 0000000..a394d93 --- /dev/null +++ b/plantlife_modpack/junglegrass/init.lua @@ -0,0 +1,3 @@ +minetest.register_alias("junglegrass:shortest", "air") +minetest.register_alias("junglegrass:short", "air") +minetest.register_alias("junglegrass:medium", "air") diff --git a/plantlife_modpack/modpack.txt b/plantlife_modpack/modpack.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/plantlife_modpack/modpack.txt diff --git a/plantlife_modpack/molehills/depends.txt b/plantlife_modpack/molehills/depends.txt new file mode 100644 index 0000000..4e35179 --- /dev/null +++ b/plantlife_modpack/molehills/depends.txt @@ -0,0 +1,2 @@ +default +biome_lib
\ No newline at end of file diff --git a/plantlife_modpack/molehills/init.lua b/plantlife_modpack/molehills/init.lua new file mode 100644 index 0000000..d0a1941 --- /dev/null +++ b/plantlife_modpack/molehills/init.lua @@ -0,0 +1,78 @@ +----------------------------------------------------------------------------------------------- +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") + +----------------------------------------------------------------------------------------------- +-- NoDe +----------------------------------------------------------------------------------------------- + +local mh_cbox = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, -0.125, 0.5} +} + +minetest.register_node("molehills:molehill",{ + drawtype = "mesh", + mesh = "molehill_molehill.obj", + description = "Mole Hill", + inventory_image = "molehills_side.png", + tiles = { "molehills_dirt.png" }, + paramtype = "light", + selection_box = mh_cbox, + collision_box = mh_cbox, + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- CRaFTiNG +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- molehills --> dirt + output = "default:dirt", + recipe = { + {"molehills:molehill","molehills:molehill"}, + {"molehills:molehill","molehills:molehill"}, + } +}) + +----------------------------------------------------------------------------------------------- +-- 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" + 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" + and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z-1}).name ~= "air" then + minetest.set_node(right_here, {name="molehills:molehill"}) + 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 +) + +----------------------------------------------------------------------------------------------- +print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") +----------------------------------------------------------------------------------------------- diff --git a/plantlife_modpack/molehills/models/molehill_molehill.obj b/plantlife_modpack/molehills/models/molehill_molehill.obj new file mode 100644 index 0000000..5b9c084 --- /dev/null +++ b/plantlife_modpack/molehills/models/molehill_molehill.obj @@ -0,0 +1,197 @@ +# Blender v2.73 (sub 0) OBJ File: 'anthill.blend' +# www.blender.org +o Cylinder_Cylinder.001 +v 0.099056 -0.499969 -0.498228 +v 0.038417 -0.200463 -0.141682 +v 0.255808 -0.499933 -0.402046 +v 0.095605 -0.174690 -0.147239 +v 0.423075 -0.499913 -0.296918 +v 0.102439 -0.169033 -0.075679 +v 0.444026 -0.499843 -0.095234 +v 0.125298 -0.217477 -0.063343 +v 0.468682 -0.499958 0.074790 +v 0.157655 -0.214352 0.001348 +v 0.396548 -0.500000 0.246048 +v 0.133778 -0.189245 0.108513 +v 0.280708 -0.500000 0.383197 +v 0.070517 -0.218946 0.104754 +v 0.089852 -0.499943 0.434316 +v 0.048523 -0.205247 0.128681 +v -0.093309 -0.499902 0.467111 +v -0.039037 -0.211895 0.149030 +v -0.272965 -0.499875 0.396496 +v -0.108297 -0.175918 0.104100 +v -0.388317 -0.499877 0.239075 +v -0.139068 -0.179051 0.073370 +v -0.437531 -0.499999 0.063918 +v -0.141812 -0.255882 0.005117 +v -0.458429 -0.499805 -0.104397 +v -0.189265 -0.217436 -0.065303 +v -0.385597 -0.499914 -0.288584 +v -0.112692 -0.207830 -0.096879 +v -0.248347 -0.499927 -0.384586 +v -0.083136 -0.202256 -0.170048 +v -0.095346 -0.499958 -0.514449 +v -0.023049 -0.216681 -0.204058 +v 0.071880 -0.343843 -0.343933 +v 0.189128 -0.354687 -0.277980 +v 0.311273 -0.378789 -0.248498 +v 0.296760 -0.346318 -0.056661 +v 0.332231 -0.342427 0.044933 +v 0.259921 -0.360316 0.147910 +v 0.213270 -0.362883 0.253745 +v 0.059007 -0.360067 0.351374 +v -0.068448 -0.357957 0.335642 +v -0.164888 -0.343166 0.232553 +v -0.269761 -0.352370 0.140734 +v -0.367168 -0.370891 0.062326 +v -0.294491 -0.324099 -0.079712 +v -0.276314 -0.352585 -0.236032 +v -0.206169 -0.372829 -0.314307 +v -0.065547 -0.371444 -0.355380 +v 0.000709 -0.156135 -0.047193 +vt 0.572002 0.826281 +vt 0.535907 0.620231 +vt 0.597591 0.625892 +vt 0.604963 0.552988 +vt 0.830215 0.729053 +vt 0.629619 0.540419 +vt 0.814561 0.533613 +vt 0.664520 0.474514 +vt 0.638766 0.365335 +vt 0.774826 0.325198 +vt 0.570532 0.369165 +vt 0.724507 0.217375 +vt 0.546808 0.344788 +vt 0.452364 0.324057 +vt 0.420641 0.133939 +vt 0.377660 0.369831 +vt 0.316619 0.238965 +vt 0.344469 0.401138 +vt 0.203502 0.332509 +vt 0.341509 0.470674 +vt 0.290325 0.542416 +vt 0.176827 0.557096 +vt 0.372919 0.574586 +vt 0.196433 0.716353 +vt 0.404798 0.649130 +vt 0.469609 0.683778 +vt 0.272092 0.796098 +vt 0.770390 0.885486 +vt 0.973405 0.572910 +vt 0.591386 0.033412 +vt 0.226599 0.867698 +vt 0.423770 0.837943 +vt 0.601314 0.983475 +vt 0.078559 0.769893 +vt 0.000000 0.582245 +vt 0.098436 0.412390 +vt 0.075624 0.232320 +vt 0.200045 0.071942 +vt 0.558116 0.117912 +vt 0.922195 0.225217 +vt 0.852821 0.430110 +vt 0.698467 0.759089 +vt 0.495235 0.523967 +vt 0.391629 1.000000 +vt 0.022541 0.410768 +vt 0.797247 0.085491 +vt 0.393825 0.000000 +vt 0.950807 0.778383 +vt 1.000000 0.399692 +g Cylinder_Cylinder.001_None +s 1 +f 33/1 2/2 4/3 +f 4/3 6/4 35/5 +f 35/5 6/4 8/6 +f 36/7 8/6 10/8 +f 10/8 12/9 38/10 +f 12/9 14/11 39/12 +f 39/12 14/11 16/13 +f 16/13 18/14 41/15 +f 18/14 20/16 42/17 +f 20/16 22/18 43/19 +f 43/19 22/18 24/20 +f 24/20 26/21 45/22 +f 26/21 28/23 46/24 +f 46/24 28/23 30/25 +f 32/26 2/2 33/1 +f 47/27 30/25 32/26 +f 3/28 7/29 15/30 +f 29/31 47/27 48/32 +f 48/32 33/1 1/33 +f 27/34 46/24 47/27 +f 25/35 45/22 46/24 +f 44/36 45/22 25/35 +f 21/37 43/19 44/36 +f 42/17 43/19 21/37 +f 41/15 42/17 19/38 +f 15/30 40/39 41/15 +f 39/12 40/39 15/30 +f 11/40 38/10 39/12 +f 37/41 38/10 11/40 +f 7/29 36/7 37/41 +f 35/5 36/7 7/29 +f 3/28 34/42 35/5 +f 33/1 34/42 3/28 +f 4/3 2/2 49/43 +f 2/2 32/26 49/43 +f 32/26 30/25 49/43 +f 30/25 28/23 49/43 +f 28/23 26/21 49/43 +f 26/21 24/20 49/43 +f 24/20 22/18 49/43 +f 22/18 20/16 49/43 +f 20/16 18/14 49/43 +f 18/14 16/13 49/43 +f 16/13 14/11 49/43 +f 14/11 12/9 49/43 +f 12/9 10/8 49/43 +f 10/8 8/6 49/43 +f 8/6 6/4 49/43 +f 6/4 4/3 49/43 +f 34/42 33/1 4/3 +f 34/42 4/3 35/5 +f 36/7 35/5 8/6 +f 37/41 36/7 10/8 +f 37/41 10/8 38/10 +f 38/10 12/9 39/12 +f 40/39 39/12 16/13 +f 40/39 16/13 41/15 +f 41/15 18/14 42/17 +f 42/17 20/16 43/19 +f 44/36 43/19 24/20 +f 44/36 24/20 45/22 +f 45/22 26/21 46/24 +f 47/27 46/24 30/25 +f 48/32 32/26 33/1 +f 48/32 47/27 32/26 +f 29/31 31/44 1/33 +f 23/45 27/34 29/31 +f 27/34 23/45 25/35 +f 15/30 19/38 21/37 +f 11/40 13/46 15/30 +f 15/30 17/47 19/38 +f 3/28 23/45 29/31 +f 29/31 1/33 3/28 +f 3/28 5/48 7/29 +f 7/29 9/49 11/40 +f 23/45 15/30 21/37 +f 15/30 23/45 3/28 +f 15/30 7/29 11/40 +f 31/44 29/31 48/32 +f 31/44 48/32 1/33 +f 29/31 27/34 47/27 +f 27/34 25/35 46/24 +f 23/45 44/36 25/35 +f 23/45 21/37 44/36 +f 19/38 42/17 21/37 +f 17/47 41/15 19/38 +f 17/47 15/30 41/15 +f 13/46 39/12 15/30 +f 13/46 11/40 39/12 +f 9/49 37/41 11/40 +f 9/49 7/29 37/41 +f 5/48 35/5 7/29 +f 5/48 3/28 35/5 +f 1/33 33/1 3/28 diff --git a/plantlife_modpack/molehills/molehills_settings.txt b/plantlife_modpack/molehills/molehills_settings.txt new file mode 100644 index 0000000..2079574 --- /dev/null +++ b/plantlife_modpack/molehills/molehills_settings.txt @@ -0,0 +1,6 @@ +-- Settings for generation of stuff (at map-generation time) + +Molehills_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes + +Molehills_Rarity = 87 -- larger values make molehills more rare (100 means chance of 0 %) + diff --git a/plantlife_modpack/molehills/textures/molehills_dirt.png b/plantlife_modpack/molehills/textures/molehills_dirt.png Binary files differnew file mode 100644 index 0000000..79ffa85 --- /dev/null +++ b/plantlife_modpack/molehills/textures/molehills_dirt.png diff --git a/plantlife_modpack/molehills/textures/molehills_side.png b/plantlife_modpack/molehills/textures/molehills_side.png Binary files differnew file mode 100644 index 0000000..554bbec --- /dev/null +++ b/plantlife_modpack/molehills/textures/molehills_side.png diff --git a/plantlife_modpack/molehills/textures/old & unused/molehill_side.png b/plantlife_modpack/molehills/textures/old & unused/molehill_side.png Binary files differnew file mode 100644 index 0000000..5f0f976 --- /dev/null +++ b/plantlife_modpack/molehills/textures/old & unused/molehill_side.png diff --git a/plantlife_modpack/molehills/textures/old & unused/molehill_top.png b/plantlife_modpack/molehills/textures/old & unused/molehill_top.png Binary files differnew file mode 100644 index 0000000..55cc541 --- /dev/null +++ b/plantlife_modpack/molehills/textures/old & unused/molehill_top.png diff --git a/plantlife_modpack/nature_classic/blossom.lua b/plantlife_modpack/nature_classic/blossom.lua new file mode 100644 index 0000000..62947b5 --- /dev/null +++ b/plantlife_modpack/nature_classic/blossom.lua @@ -0,0 +1,75 @@ +-- Blossoms and such + +local function spawn_apple_under(pos) + local below = { + x = pos.x, + y = pos.y - 1, + z = pos.z, + } + if minetest.get_node(below).name == "air" then + minetest.set_node(below, { name = "default:apple" }) + end +end + +minetest.register_node(":"..nature.blossom_node, { + description = "Apple blossoms", + drawtype = "allfaces_optional", + tiles = nature.blossom_textures, + paramtype = "light", + groups = { snappy = 3, leafdecay = 3, flammable = 2, leafdecay = 3 }, + sounds = default.node_sound_leaves_defaults(), + waving = 1 +}) + +minetest.register_craft({ + type = "fuel", + recipe = nature.blossom_node, + burntime = 2, +}) + +-- these ABMs can get heavy, so just enqueue the nodes + +-- Adding Blossoms +-- Limit mass changes after block has not been loaded for some time: +-- Run ABM with higher frequency, but don't enqueue all blocks +minetest.register_abm({ + nodenames = { nature.blossom_leaves }, + interval = nature.blossom_delay / nature.leaves_blossom_chance, + chance = nature.leaves_blossom_chance, + + action = function(pos, node, active_object_count, active_object_count_wider) + if math.random(nature.leaves_blossom_chance) == 1 then + nature.enqueue_node(pos, node, nature.blossom_node) + end + end +}) + +-- Removing blossoms +-- Limit mass changes after block has not been loaded for some time: +-- Run ABM with higher frequency, but don't enqueue all blocks +minetest.register_abm({ + nodenames = { nature.blossom_node }, + interval = nature.blossom_delay / nature.blossom_leaves_chance, + chance = nature.blossom_leaves_chance, + + action = function(pos, node, active_object_count, active_object_count_wider) + if math.random(nature.blossom_leaves_chance) == 1 then + nature.enqueue_node(pos, node, nature.blossom_leaves) + end + end +}) + +-- Spawning apples +-- Limit mass changes after block has not been loaded for some time: +-- spawn apples with 25% chance, but with 4 times higher frequency +minetest.register_abm({ + nodenames = { nature.blossom_node }, + interval = nature.apple_delay / 4, + chance = nature.apple_chance, + + action = function(pos, node, active_object_count, active_object_count_wider) + if math.random(4) == 1 and nature.dtime < 0.2 and not minetest.find_node_near(pos, nature.apple_spread, { "default:apple" }) then + spawn_apple_under(pos) + end + end +}) diff --git a/plantlife_modpack/nature_classic/config.lua b/plantlife_modpack/nature_classic/config.lua new file mode 100644 index 0000000..8f67b1c --- /dev/null +++ b/plantlife_modpack/nature_classic/config.lua @@ -0,0 +1,6 @@ +-- Set on which distance from water can the tree still grow. +-- Grows anywhere if set to -1. +nature.distance_from_water = 20 + +-- Minimum light level needed to grow. Default is 8, which means daylight. +nature.minimum_growth_light = 8 diff --git a/plantlife_modpack/nature_classic/depends.txt b/plantlife_modpack/nature_classic/depends.txt new file mode 100644 index 0000000..1246684 --- /dev/null +++ b/plantlife_modpack/nature_classic/depends.txt @@ -0,0 +1,2 @@ +default +moretrees? diff --git a/plantlife_modpack/nature_classic/global_function.lua b/plantlife_modpack/nature_classic/global_function.lua new file mode 100644 index 0000000..3a5b9e3 --- /dev/null +++ b/plantlife_modpack/nature_classic/global_function.lua @@ -0,0 +1,82 @@ +-- helper functions + +local function process_blossom_queue_item() + local pos = nature.blossomqueue[1][1] + local node = nature.blossomqueue[1][2] + local replace = nature.blossomqueue[1][3] + if (nature.blossomqueue[1][3] == nature.blossom_node and not nature:is_near_water(pos)) then + table.remove(nature.blossomqueue, 1) -- don't grow if it's not near water, pop from queue. + return + end + nature:grow_node(pos, replace) -- now actually grow it. + table.remove(nature.blossomqueue, 1) +end + +minetest.register_globalstep(function(dtime) + nature.dtime = dtime + if #nature.blossomqueue > 0 and dtime < 0.2 then + local i = 1 + if dtime < 0.1 then + i = i + 4 + end + if dtime < 0.05 then + i = i + 10 + end + while #nature.blossomqueue > 0 and i > 0 do + process_blossom_queue_item() + i = i - 1 + end + end +end) + +function nature.enqueue_node(pos, node, replace) + local idx = #nature.blossomqueue + if idx < nature.blossomqueue_max then + local enqueue_prob = 0 + if idx < nature.blossomqueue_max * 0.8 then + enqueue_prob = 1 + else + -- Reduce queue growth as it gets closer to its max. + enqueue_prob = 1 - (idx - nature.blossomqueue_max * 0.8) / (nature.blossomqueue_max * 0.2) + end + if enqueue_prob == 1 or math.random(100) <= 100 * enqueue_prob then + nature.blossomqueue[idx+1] = {} + nature.blossomqueue[idx+1][1] = pos + nature.blossomqueue[idx+1][2] = node + nature.blossomqueue[idx+1][3] = replace + end + end +end + +local function set_young_node(pos) + local meta = minetest.get_meta(pos) + + meta:set_int(nature.meta_blossom_time, minetest.get_gametime()) +end + +local function is_not_young(pos) + local meta = minetest.get_meta(pos) + + local blossom_time = meta:get_int(nature.meta_blossom_time) + return not (blossom_time and minetest.get_gametime() - blossom_time < nature.blossom_duration) +end + +function nature:grow_node(pos, nodename) + if pos ~= nil then + local light_enough = (minetest.get_node_light(pos, nil) or 0) + >= nature.minimum_growth_light + + if is_not_young(pos) and light_enough then + minetest.set_node(pos, { name = nodename }) + set_young_node(pos) + + minetest.log("info", nodename .. " has grown at " .. pos.x .. "," + .. pos.y .. "," .. pos.z) + end + end +end + +function nature:is_near_water(pos) + return nature.distance_from_water == -1 or minetest.find_node_near(pos, nature.distance_from_water, + { "default:water_source" }) ~= nil +end diff --git a/plantlife_modpack/nature_classic/init.lua b/plantlife_modpack/nature_classic/init.lua new file mode 100644 index 0000000..47fd9bf --- /dev/null +++ b/plantlife_modpack/nature_classic/init.lua @@ -0,0 +1,41 @@ +-- Nature Classic mod +-- Originally by neko259 + +-- Nature is slowly capturing the world! + +local current_mod_name = minetest.get_current_modname() + +nature = {} +nature.blossomqueue = {} +nature.blossomqueue_max = 1000 + +nature.blossom_node = "nature:blossom" +nature.blossom_leaves = "default:leaves" +nature.blossom_textures = { "default_leaves.png^nature_blossom.png" } + +if minetest.get_modpath("moretrees") then + nature.blossom_node = "moretrees:apple_blossoms" + nature.blossom_leaves = "moretrees:apple_tree_leaves" + nature.blossom_textures = { "moretrees_apple_tree_leaves.png^nature_blossom.png" } + minetest.register_alias("nature:blossom", "default:leaves") +end + +nature.leaves_blossom_chance = 15 +nature.blossom_leaves_chance = 5 +nature.blossom_delay = 3600 +nature.apple_delay = 3600 +nature.apple_chance = 10 +nature.apple_spread = 2 + +nature.meta_blossom_time = "blossom_time" +nature.blossom_duration = nature.blossom_delay + +function dumppos(pos) + return "("..pos.x..","..pos.y..","..pos.z..")" +end + +dofile(minetest.get_modpath(current_mod_name) .. "/config.lua") +dofile(minetest.get_modpath(current_mod_name) .. "/global_function.lua") +dofile(minetest.get_modpath(current_mod_name) .. "/blossom.lua") + +minetest.log("info", "[Nature Classic] loaded!") diff --git a/plantlife_modpack/nature_classic/textures/nature_blossom.png b/plantlife_modpack/nature_classic/textures/nature_blossom.png Binary files differnew file mode 100644 index 0000000..9d90336 --- /dev/null +++ b/plantlife_modpack/nature_classic/textures/nature_blossom.png diff --git a/plantlife_modpack/poisonivy/depends.txt b/plantlife_modpack/poisonivy/depends.txt new file mode 100644 index 0000000..249cc74 --- /dev/null +++ b/plantlife_modpack/poisonivy/depends.txt @@ -0,0 +1,2 @@ +biome_lib + diff --git a/plantlife_modpack/poisonivy/init.lua b/plantlife_modpack/poisonivy/init.lua new file mode 100644 index 0000000..466b930 --- /dev/null +++ b/plantlife_modpack/poisonivy/init.lua @@ -0,0 +1,103 @@ +-- This file supplies poison ivy for the plantlife modpack +-- Last revision: 2013-01-24 + +local S = biome_lib.intllib + +local SPAWN_DELAY = 1000 +local SPAWN_CHANCE = 200 +local GROW_DELAY = 500 +local GROW_CHANCE = 30 +local poisonivy_seed_diff = 339 +local walls_list = { + "default:dirt", + "default:dirt_with_grass", + "default:stone", + "default:cobble", + "default:mossycobble", + "default:brick", + "default:tree", + "default:jungletree", + "default:stone_with_coal", + "default:stone_with_iron" +}, +minetest.register_node('poisonivy:seedling', { + description = S("Poison ivy (seedling)"), + drawtype = 'plantlike', + waving = 1, + tiles = { 'poisonivy_seedling.png' }, + inventory_image = 'poisonivy_seedling.png', + wield_image = 'poisonivy_seedling.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3, poisonivy=1, flora_block=1 }, + sounds = default.node_sound_leaves_defaults(), + buildable_to = true, +}) + +minetest.register_node('poisonivy:sproutling', { + description = S("Poison ivy (sproutling)"), + drawtype = 'plantlike', + waving = 1, + tiles = { 'poisonivy_sproutling.png' }, + inventory_image = 'poisonivy_sproutling.png', + wield_image = 'poisonivy_sproutling.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3, poisonivy=1, flora_block=1 }, + sounds = default.node_sound_leaves_defaults(), + buildable_to = true, +}) + +minetest.register_node('poisonivy:climbing', { + description = S("Poison ivy (climbing plant)"), + drawtype = 'signlike', + tiles = { 'poisonivy_climbing.png' }, + inventory_image = 'poisonivy_climbing.png', + wield_image = 'poisonivy_climbing.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = 'wallmounted', + walkable = false, + groups = { snappy = 3, poisonivy=1, flora_block=1 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_side = = <default> + }, + buildable_to = true, +}) + +biome_lib:spawn_on_surfaces({ + spawn_delay = SPAWN_DELAY, + spawn_plants = {"poisonivy:seedling"}, + avoid_radius = 10, + spawn_chance = SPAWN_CHANCE/10, + spawn_surfaces = {"default:dirt_with_grass"}, + avoid_nodes = {"group:poisonivy", "group:flower", "group:flora"}, + seed_diff = poisonivy_seed_diff, + light_min = 7, + alt_wallnode = "poisonivy:climbing", + verticals_list = walls_list +}) + +biome_lib:grow_plants({ + grow_delay = SPAWN_DELAY, + grow_chance = GROW_CHANCE, + grow_plant = "poisonivy:seedling", + grow_result = "poisonivy:sproutling", + grow_nodes = {"default:dirt_with_grass"} +}) + +biome_lib:grow_plants({ + grow_delay = GROW_DELAY, + grow_chance = GROW_CHANCE*2, + grow_plant = "poisonivy:climbing", + need_wall = true, + grow_vertically = true, + verticals_list = walls_list, + ground_nodes = {"default:dirt_with_grass"} +}) + +print(S("[Poison Ivy] Loaded.")) diff --git a/plantlife_modpack/poisonivy/locale/de.txt b/plantlife_modpack/poisonivy/locale/de.txt new file mode 100644 index 0000000..5c099ce --- /dev/null +++ b/plantlife_modpack/poisonivy/locale/de.txt @@ -0,0 +1,7 @@ +# Translation by Xanthin + +Poison ivy (seedling) = Giftefeu (Saemling) +Poison ivy (sproutling) = Giftefeu (Sproessling) +Poison ivy (climbing plant) = Giftefeu (Kletterpflanze) + +[Poison Ivy] Loaded. = [Poison Ivy] Geladen. diff --git a/plantlife_modpack/poisonivy/locale/fr.txt b/plantlife_modpack/poisonivy/locale/fr.txt new file mode 100644 index 0000000..f033dc3 --- /dev/null +++ b/plantlife_modpack/poisonivy/locale/fr.txt @@ -0,0 +1,7 @@ +# Template + +Poison ivy (seedling) = Sumac vénéneux (semis) +Poison ivy (sproutling) = Sumac vénéneux (pousse) +Poison ivy (climbing plant) = Sumac vénéneux (grimpant) + +[Poison Ivy] Loaded. = [Sumac vénéneux] Chargé. diff --git a/plantlife_modpack/poisonivy/locale/template.txt b/plantlife_modpack/poisonivy/locale/template.txt new file mode 100644 index 0000000..35fb12d --- /dev/null +++ b/plantlife_modpack/poisonivy/locale/template.txt @@ -0,0 +1,7 @@ +# Template + +Poison ivy (seedling) = +Poison ivy (sproutling) = +Poison ivy (climbing plant) = + +[Poison Ivy] Loaded. = diff --git a/plantlife_modpack/poisonivy/locale/tr.txt b/plantlife_modpack/poisonivy/locale/tr.txt new file mode 100644 index 0000000..a7a5b69 --- /dev/null +++ b/plantlife_modpack/poisonivy/locale/tr.txt @@ -0,0 +1,7 @@ +# Turkish translation by mahmutelmas06 + +Poison ivy (seedling) = Sarmaşık (Fidan) +Poison ivy (sproutling) = Sarmaşık (Filiz) +Poison ivy (climbing plant) = Sarmaşık (Dolanan) + +[Poison Ivy] Loaded. = Sarmaşık yüklendi diff --git a/plantlife_modpack/poisonivy/textures/poisonivy_climbing.png b/plantlife_modpack/poisonivy/textures/poisonivy_climbing.png Binary files differnew file mode 100644 index 0000000..f53f7a3 --- /dev/null +++ b/plantlife_modpack/poisonivy/textures/poisonivy_climbing.png diff --git a/plantlife_modpack/poisonivy/textures/poisonivy_seedling.png b/plantlife_modpack/poisonivy/textures/poisonivy_seedling.png Binary files differnew file mode 100644 index 0000000..281fa75 --- /dev/null +++ b/plantlife_modpack/poisonivy/textures/poisonivy_seedling.png diff --git a/plantlife_modpack/poisonivy/textures/poisonivy_sproutling.png b/plantlife_modpack/poisonivy/textures/poisonivy_sproutling.png Binary files differnew file mode 100644 index 0000000..92d2742 --- /dev/null +++ b/plantlife_modpack/poisonivy/textures/poisonivy_sproutling.png diff --git a/plantlife_modpack/trunks/crafting.lua b/plantlife_modpack/trunks/crafting.lua new file mode 100644 index 0000000..02f3991 --- /dev/null +++ b/plantlife_modpack/trunks/crafting.lua @@ -0,0 +1,133 @@ +-- Code by Mossmanikin +----------------------------------------------------------------------------------------------- +-- TWiGS +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- *leaves --> twigs + output = "trunks:twig_1 2", + recipe = {{"group:leafdecay"}} +}) +if minetest.get_modpath("moretrees") ~= nil then +minetest.register_craft({ -- moretrees_leaves --> twigs + output = "trunks:twig_1 2", + recipe = {{"group:moretrees_leaves"}} +}) +minetest.register_craft({ -- except moretrees:palm_leaves + output = "moretrees:palm_leaves", + recipe = {{"moretrees:palm_leaves"}} +}) +end +if minetest.get_modpath("bushes") ~= nil then +minetest.register_craft({ -- BushLeaves --> twigs + output = "trunks:twig_1 2", + recipe = {{"bushes:BushLeaves1"}} +}) +minetest.register_craft({ + output = "trunks:twig_1 2", + recipe = {{"bushes:BushLeaves2"}} +}) +minetest.register_craft({ -- bushbranches --> twigs + output = "trunks:twig_1 4", + recipe = {{"bushes:bushbranches1"}} +}) +minetest.register_craft({ + output = "trunks:twig_1 4", + recipe = {{"bushes:bushbranches2"}} +}) +minetest.register_craft({ + output = "trunks:twig_1 4", + recipe = {{"bushes:bushbranches2a"}} +}) +minetest.register_craft({ + output = "trunks:twig_1 4", + recipe = {{"bushes:bushbranches3"}} +}) +end +minetest.register_craft({ -- twigs block --> twigs + output = "trunks:twig_1 8", + recipe = {{"trunks:twigs"}} +}) +minetest.register_craft({ -- twigs_slab --> twigs + output = "trunks:twig_1 4", + recipe = {{"trunks:twigs_slab"}} +}) +minetest.register_craft({ -- twigs_roof --> twigs + output = "trunks:twig_1 4", + recipe = {{"trunks:twigs_roof"}} +}) +minetest.register_craft({ -- twigs_roof_corner --> twigs + output = "trunks:twig_1 3", + recipe = {{"trunks:twigs_roof_corner"}} +}) +minetest.register_craft({ -- twigs_roof_corner_2 --> twigs + output = "trunks:twig_1 3", + recipe = {{"trunks:twigs_roof_corner_2"}} +}) +----------------------------------------------------------------------------------------------- +-- STiCK +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- twig --> stick + output = "default:stick", + recipe = {{"trunks:twig_1"}} +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS BLoCK +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- twigs --> twigs block + output = "trunks:twigs", + recipe = { + {"trunks:twig_1","trunks:twig_1","trunks:twig_1"}, + {"trunks:twig_1", "" ,"trunks:twig_1"}, + {"trunks:twig_1","trunks:twig_1","trunks:twig_1"}, + } +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS SLaBS +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- twigs blocks --> twigs_slabs + output = "trunks:twigs_slab 6", + recipe = { + {"trunks:twigs","trunks:twigs","trunks:twigs"}, + } +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS RooFS +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- twigs blocks --> twigs_roofs + output = "trunks:twigs_roof 4", + recipe = { + {"trunks:twigs",""}, + {"","trunks:twigs"}, + } +}) +minetest.register_craft({ + output = "trunks:twigs_roof 4", + recipe = { + {"","trunks:twigs"}, + {"trunks:twigs",""}, + } +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS RooF CoRNeRS +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- twigs blocks --> twigs_roof_corners + output = "trunks:twigs_roof_corner 8", + recipe = { + { "" ,"trunks:twigs", "" }, + {"trunks:twigs", "" ,"trunks:twigs"}, + } +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS RooF CoRNeRS 2 +----------------------------------------------------------------------------------------------- +minetest.register_craft({ -- twigs blocks --> twigs_roof_corner_2's + output = "trunks:twigs_roof_corner_2 8", + recipe = { + {"trunks:twigs", "" ,"trunks:twigs"}, + { "" ,"trunks:twigs", "" }, + } +})
\ No newline at end of file diff --git a/plantlife_modpack/trunks/depends.txt b/plantlife_modpack/trunks/depends.txt new file mode 100644 index 0000000..99cfba1 --- /dev/null +++ b/plantlife_modpack/trunks/depends.txt @@ -0,0 +1,6 @@ +default +biome_lib +bushes? +ferns? +moretrees? +trees?
\ No newline at end of file diff --git a/plantlife_modpack/trunks/generating.lua b/plantlife_modpack/trunks/generating.lua new file mode 100644 index 0000000..e544a21 --- /dev/null +++ b/plantlife_modpack/trunks/generating.lua @@ -0,0 +1,554 @@ +-- Code by Mossmanikin, Neuromancer, and others + +local function clone_node(name) + local node2 = {} + local node = minetest.registered_nodes[name] + for k,v in pairs(node) do + node2[k]=v + end + return node2 +end + +----------------------------------------------------------------------------------------------- +-- TWiGS +----------------------------------------------------------------------------------------------- + +abstract_trunks.place_twig = function(pos) + local twig_size = math.random(1,27) + + local right_here = {x=pos.x , y=pos.y+1, z=pos.z } + local north = {x=pos.x , y=pos.y+1, z=pos.z+1} + local north_east = {x=pos.x+1, y=pos.y+1, z=pos.z+1} + local east = {x=pos.x+1, y=pos.y+1, z=pos.z } + local south_east = {x=pos.x+1, y=pos.y+1, z=pos.z-1} + local south = {x=pos.x , y=pos.y+1, z=pos.z-1} + local south_west = {x=pos.x-1, y=pos.y+1, z=pos.z-1} + local west = {x=pos.x-1, y=pos.y+1, z=pos.z } + local north_west = {x=pos.x-1, y=pos.y+1, z=pos.z+1} + + local node_here = minetest.get_node(right_here) + local node_north = minetest.get_node(north) + local node_n_e = minetest.get_node(north_east) + local node_east = minetest.get_node(east) + local node_s_e = minetest.get_node(south_east) + local node_south = minetest.get_node(south) + local node_s_w = minetest.get_node(south_west) + local node_west = minetest.get_node(west) + local node_n_w = minetest.get_node(north_west) +-- small twigs + if twig_size <= 16 then + minetest.set_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)}) + end +-- big twigs + if Big_Twigs == true then +-- big twig 1 + if twig_size == 17 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_5"}) + end + if minetest.registered_nodes[node_n_e.name].buildable_to then + minetest.set_node(north_east, {name="trunks:twig_7"}) + end + if minetest.registered_nodes[node_east.name].buildable_to then + minetest.set_node(east, {name="trunks:twig_8"}) + end + end + elseif twig_size == 18 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_5", param2=1}) + end + if minetest.registered_nodes[node_s_e.name].buildable_to then + minetest.set_node(south_east, {name="trunks:twig_7", param2=1}) + end + if minetest.registered_nodes[node_south.name].buildable_to then + minetest.set_node(south, {name="trunks:twig_8", param2=1}) + end + end + elseif twig_size == 19 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_5", param2=2}) + end + if minetest.registered_nodes[node_s_w.name].buildable_to then + minetest.set_node(south_west, {name="trunks:twig_7", param2=2}) + end + if minetest.registered_nodes[node_west.name].buildable_to then + minetest.set_node(west, {name="trunks:twig_8", param2=2}) + end + end + elseif twig_size == 20 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_5", param2=3}) + end + if minetest.registered_nodes[node_n_w.name].buildable_to then + minetest.set_node(north_west, {name="trunks:twig_7", param2=3}) + end + if minetest.registered_nodes[node_north.name].buildable_to then + minetest.set_node(north, {name="trunks:twig_8", param2=3}) + end + end +-- big twig 2 + elseif twig_size == 21 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_9"}) + end + if minetest.registered_nodes[node_north.name].buildable_to then + minetest.set_node(north, {name="trunks:twig_10"}) + end + if minetest.registered_nodes[node_n_e.name].buildable_to then + minetest.set_node(north_east, {name="trunks:twig_11"}) + end + end + elseif twig_size == 22 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_9", param2=1}) + end + if minetest.registered_nodes[node_east.name].buildable_to then + minetest.set_node(east, {name="trunks:twig_10", param2=1}) + end + if minetest.registered_nodes[node_s_e.name].buildable_to then + minetest.set_node(south_east, {name="trunks:twig_11", param2=1}) + end + end + elseif twig_size == 23 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_9", param2=2}) + end + if minetest.registered_nodes[node_south.name].buildable_to then + minetest.set_node(south, {name="trunks:twig_10", param2=2}) + end + if minetest.registered_nodes[node_s_w.name].buildable_to then + minetest.set_node(south_west, {name="trunks:twig_11", param2=2}) + end + end + elseif twig_size == 24 then + if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to + or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to) then + + if minetest.registered_nodes[node_here.name].buildable_to then + minetest.set_node(right_here, {name="trunks:twig_9", param2=3}) + end + if minetest.registered_nodes[node_west.name].buildable_to then + minetest.set_node(west, {name="trunks:twig_10", param2=3}) + end + if minetest.registered_nodes[node_n_w.name].buildable_to then + minetest.set_node(north_west, {name="trunks:twig_11", param2=3}) + end + end + elseif twig_size <= 25 then + minetest.set_node(right_here, {name="trunks:twig_"..math.random(12,13), param2=math.random(0,3)}) + end + end +end + +if Twigs_on_ground == true then +biome_lib:register_generate_plant({ + surface = {"default:dirt_with_grass"}, + max_count = Twigs_on_ground_Max_Count, + rarity = Twigs_on_ground_Rarity, + min_elevation = 1, + max_elevation = 40, + near_nodes = {"group:tree","ferns:fern_03","ferns:fern_02","ferns:fern_01"}, + near_nodes_size = 3, + near_nodes_vertical = 1, + near_nodes_count = 1, + plantlife_limit = -0.9, + }, + abstract_trunks.place_twig +) +end + +if Twigs_on_water == true then +biome_lib:register_generate_plant({ + surface = {"default:water_source"}, + max_count = Twigs_on_water_Max_Count, + rarity = Twigs_on_water_Rarity, + min_elevation = 1, + max_elevation = 40, + near_nodes = {"group:tree"}, + near_nodes_size = 3, + near_nodes_vertical = 1, + near_nodes_count = 1, + plantlife_limit = -0.9, + }, + abstract_trunks.place_twig +) +end + +----------------------------------------------------------------------------------------------- +-- TRuNKS +----------------------------------------------------------------------------------------------- +local TRuNKS = { +-- MoD TRuNK NR + {"default", "tree", 1}, + {"default", "jungletree", 2}, + {"default", "pine_tree", 12}, + + {"trees", "tree_conifer", 3}, + {"trees", "tree_mangrove", 4}, + {"trees", "tree_palm", 5}, + + {"moretrees", "apple_tree_trunk", 6}, + {"moretrees", "beech_trunk", 7}, + {"moretrees", "birch_trunk", 8}, + {"moretrees", "fir_trunk", 9}, + {"moretrees", "oak_trunk", 10}, + {"moretrees", "palm_trunk", 11}, + {"moretrees", "rubber_tree_trunk", 13}, + {"moretrees", "rubber_tree_trunk_empty", 14}, + {"moretrees", "sequoia_trunk", 15}, + {"moretrees", "spruce_trunk", 16}, + {"moretrees", "willow_trunk", 17}, +} + +if Horizontal_Trunks == true then -- see settings.txt +for i in pairs(TRuNKS) do + local MoD = TRuNKS[i][1] + local TRuNK = TRuNKS[i][2] + local NR = TRuNKS[i][3] + local trunkname = MoD..":"..TRuNK + if minetest.get_modpath(MoD) ~= nil + and NR < 6 -- moretrees trunks allready have facedir + and minetest.registered_nodes[trunkname] then -- the node being called exists. + temptrunk = clone_node(trunkname) + temptrunk.paramtype2 = "facedir" + minetest.register_node(":"..trunkname, temptrunk) + end +end +end + +abstract_trunks.place_trunk = function(pos) + + local right_here = {x=pos.x, y=pos.y+1, z=pos.z} + local north = {x=pos.x, y=pos.y+1, z=pos.z+1} + local north2 = {x=pos.x, y=pos.y+1, z=pos.z+2} + local south = {x=pos.x, y=pos.y+1, z=pos.z-1} + local south2 = {x=pos.x, y=pos.y+1, z=pos.z-2} + local west = {x=pos.x-1, y=pos.y+1, z=pos.z} + local west2 = {x=pos.x-2, y=pos.y+1, z=pos.z} + local east = {x=pos.x+1, y=pos.y+1, z=pos.z} + local east2 = {x=pos.x+2, y=pos.y+1, z=pos.z} + + local node_here = minetest.get_node(right_here) + local node_north = minetest.get_node(north) + local node_north2 = minetest.get_node(north2) + local node_south = minetest.get_node(south) + local node_south2 = minetest.get_node(south2) + local node_west = minetest.get_node(west) + local node_west2 = minetest.get_node(west2) + local node_east = minetest.get_node(east) + local node_east2 = minetest.get_node(east2) + if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true, + for i in pairs(TRuNKS) do + local MoD = TRuNKS[i][1] + local TRuNK = TRuNKS[i][2] + local NR = TRuNKS[i][3] + local chance = math.random(1, 17) + local length = math.random(3,5) + if chance == NR then + local trunk_type = math.random(1,3) + if trunk_type == 1 then + if minetest.get_modpath(MoD) ~= nil then + minetest.set_node(right_here, {name=MoD..":"..TRuNK}) + else + minetest.set_node(right_here, {name="default:tree"}) + end + elseif trunk_type == 2 and Horizontal_Trunks == true then + if minetest.get_modpath(MoD) ~= nil then + if minetest.registered_nodes[node_north.name].buildable_to then + minetest.set_node(north, {name=MoD..":"..TRuNK, param2=4}) + end + + if length >= 4 and minetest.registered_nodes[node_north2.name].buildable_to then + minetest.set_node(north2, {name=MoD..":"..TRuNK, param2=4}) + end + + minetest.set_node(right_here, {name=MoD..":"..TRuNK, param2=4}) + if minetest.registered_nodes[node_south.name].buildable_to then + minetest.set_node(south, {name=MoD..":"..TRuNK, param2=4}) + end + if length == 5 and minetest.registered_nodes[node_south2.name].buildable_to then + minetest.set_node(south2, {name=MoD..":"..TRuNK, param2=4}) + end + else + if minetest.registered_nodes[node_north.name].buildable_to then + minetest.set_node(north, {name="default:tree", param2=4}) + end + if length >= 4 and minetest.registered_nodes[node_north2.name].buildable_to then + minetest.set_node(north2, {name="default:tree", param2=4}) + end + minetest.set_node(right_here, {name="default:tree", param2=4}) + if minetest.registered_nodes[node_south.name].buildable_to then + minetest.set_node(south, {name="default:tree", param2=4}) + end + if length == 5 and minetest.registered_nodes[node_south2.name].buildable_to then + minetest.set_node(south2, {name="default:tree", param2=4}) + end + end + elseif trunk_type == 3 and Horizontal_Trunks == true then + if minetest.get_modpath(MoD) ~= nil then + if minetest.registered_nodes[node_west.name].buildable_to then + minetest.set_node(west, {name=MoD..":"..TRuNK, param2=12}) + end + if length >= 4 and minetest.registered_nodes[node_west2.name].buildable_to then + minetest.set_node(west2, {name=MoD..":"..TRuNK, param2=12}) + end + minetest.set_node(right_here, {name=MoD..":"..TRuNK, param2=12}) + if minetest.registered_nodes[node_east.name].buildable_to then + minetest.set_node(east, {name=MoD..":"..TRuNK, param2=12}) + end + if length == 5 and minetest.registered_nodes[node_east2.name].buildable_to then + minetest.set_node(east2, {name=MoD..":"..TRuNK, param2=12}) + end + else + if minetest.registered_nodes[node_west.name].buildable_to then + minetest.set_node(west, {name="default:tree", param2=12}) + end + if length >= 4 and minetest.registered_nodes[node_west2.name].buildable_to then + minetest.set_node(west2, {name="default:tree", param2=12}) + end + minetest.set_node(right_here, {name="default:tree", param2=12}) + if minetest.registered_nodes[node_east.name].buildable_to then + minetest.set_node(east, {name="default:tree", param2=12}) + end + if length == 5 and minetest.registered_nodes[node_east2.name].buildable_to then + minetest.set_node(east2, {name="default:tree", param2=12}) + end + end + end + end + end + end +end + +biome_lib:register_generate_plant({ + surface = {"default:dirt_with_grass"}, + max_count = Trunks_Max_Count, -- 320, + rarity = Trunks_Rarity, -- 99, + min_elevation = 1, + max_elevation = 40, + avoid_nodes = {"group:tree"}, + avoid_radius = 1, + near_nodes = {"group:tree","ferns:fern_03","ferns:fern_02","ferns:fern_01"}, + near_nodes_size = 3, + near_nodes_vertical = 1, + near_nodes_count = 1, + plantlife_limit = -0.9, + }, + abstract_trunks.place_trunk +) + +----------------------------------------------------------------------------------------------- +-- MoSS & FuNGuS -- on ground +----------------------------------------------------------------------------------------------- +if Moss_on_ground == true then +abstract_trunks.grow_moss_on_ground = function(pos) + local on_ground = {x=pos.x, y=pos.y+1, z=pos.z} + local moss_type = math.random(1,21) + + if moss_type == 1 then + minetest.set_node(on_ground, {name="trunks:moss_fungus", param2=math.random(0,3)}) + else + minetest.set_node(on_ground, {name="trunks:moss", param2=math.random(0,3)}) + end + +end + +biome_lib:register_generate_plant({ + surface = {"default:dirt_with_grass"}, + max_count = Moss_on_ground_Max_Count, + rarity = Moss_on_ground_Rarity, + min_elevation = 1, + max_elevation = 40, + near_nodes = { + "group:tree", + "ferns:fern_03", + "ferns:fern_02", + "ferns:fern_01" + }, + near_nodes_size = 2, + near_nodes_vertical = 1, + near_nodes_count = 1, + plantlife_limit = -0.9, + }, + abstract_trunks.grow_moss_on_ground +) +end + +----------------------------------------------------------------------------------------------- +-- MoSS & FuNGuS -- on trunks +----------------------------------------------------------------------------------------------- +if Moss_on_trunk == true then +abstract_trunks.grow_moss_on_trunk = function(pos) + local on_ground = {x=pos.x, y=pos.y+1, z=pos.z} + local at_side_n = {x=pos.x, y=pos.y, z=pos.z+1} + local at_side_e = {x=pos.x+1, y=pos.y, z=pos.z} + local at_side_s = {x=pos.x, y=pos.y, z=pos.z-1} + local at_side_w = {x=pos.x-1, y=pos.y, z=pos.z} + local undrneath = {x=pos.x, y=pos.y-1, z=pos.z} + + local node_here = minetest.get_node(on_ground) + local node_north = minetest.get_node(at_side_n) + local node_east = minetest.get_node(at_side_e) + local node_south = minetest.get_node(at_side_s) + local node_west = minetest.get_node(at_side_w) + local node_under = minetest.get_node(undrneath) + + --if minetest.get_item_group(node_under.name, "tree") < 1 then + local moss_type = math.random(1,41) + if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true, + if moss_type == 1 then + minetest.set_node(on_ground, {name="trunks:moss_fungus", param2=math.random(0,3) --[[1]]}) + elseif moss_type < 22 then + minetest.set_node(on_ground, {name="trunks:moss", param2=math.random(0,3) --[[1]]}) + end + end + local moss_type = math.random(1,31) -- cliche of more moss at north + if minetest.registered_nodes[node_north.name].buildable_to then -- instead of check_air = true, + if moss_type == 1 then + minetest.set_node(at_side_n, {name="trunks:moss_fungus", param2=math.random(4,7)}) -- 5,4,6,7 + elseif moss_type < 22 then + minetest.set_node(at_side_n, {name="trunks:moss", param2=math.random(4,7)}) + end + end + local moss_type = math.random(1,41) + if minetest.registered_nodes[node_east.name].buildable_to then -- instead of check_air = true, + if moss_type == 1 then + minetest.set_node(at_side_e, {name="trunks:moss_fungus", param2=math.random(12,15)}) + elseif moss_type < 22 then + minetest.set_node(at_side_e, {name="trunks:moss", param2=math.random(12,15)}) + end + end + local moss_type = math.random(1,41) + if minetest.registered_nodes[node_south.name].buildable_to then -- instead of check_air = true, + if moss_type == 1 then + minetest.set_node(at_side_s, {name="trunks:moss_fungus", param2=math.random(8,11)}) + elseif moss_type < 22 then + minetest.set_node(at_side_s, {name="trunks:moss", param2=math.random(8,11)}) + end + end + local moss_type = math.random(1,41) + if minetest.registered_nodes[node_west.name].buildable_to then -- instead of check_air = true, + if moss_type == 1 then + minetest.set_node(at_side_w, {name="trunks:moss_fungus", param2=math.random(16,19)}) + elseif moss_type < 22 then + minetest.set_node(at_side_w, {name="trunks:moss", param2=math.random(16,19)}) + end + end + --end +end + +biome_lib:register_generate_plant({ + surface = { + "default:tree", + "default:jungletree", + "default:pine_tree", + "trees:tree_conifer", + "trees:tree_mangrove", + --"trees:tree_palm", + "moretrees:apple_tree_trunk", + "moretrees:beech_trunk", + "moretrees:birch_trunk", + "moretrees:fir_trunk", + "moretrees:oak_trunk", + --"moretrees:palm_trunk", + "moretrees:rubber_tree_trunk", + "moretrees:rubber_tree_trunk_empty", + "moretrees:sequoia_trunk", + "moretrees:spruce_trunk", + "moretrees:willow_trunk", + "default:mossycobble" + }, + max_count = Moss_on_trunk_Max_Count, + rarity = Moss_on_trunk_Rarity, + min_elevation = 1, + max_elevation = 40, + plantlife_limit = -0.9, + check_air = false, + }, + "abstract_trunks.grow_moss_on_trunk" +) +end + +----------------------------------------------------------------------------------------------- +-- RooTS +----------------------------------------------------------------------------------------------- +if Roots == true then -- see settings.txt + +abstract_trunks.grow_roots = function(pos) + local twig_size = math.random(1,27) + + local right_here = {x=pos.x , y=pos.y , z=pos.z } + local below = {x=pos.x , y=pos.y-1, z=pos.z } + local north = {x=pos.x , y=pos.y , z=pos.z+1} + local east = {x=pos.x+1, y=pos.y , z=pos.z } + local south = {x=pos.x , y=pos.y , z=pos.z-1} + local west = {x=pos.x-1, y=pos.y , z=pos.z } + + local node_here = minetest.get_node(right_here) + local node_below = minetest.get_node(below) + local node_north = minetest.get_node(north) + local node_east = minetest.get_node(east) + local node_south = minetest.get_node(south) + local node_west = minetest.get_node(west) + + for i in pairs(TRuNKS) do + local MoD = TRuNKS[i][1] + local TRuNK = TRuNKS[i][2] + if minetest.get_modpath(MoD) ~= nil + and node_here.name == MoD..":"..TRuNK + and string.find(node_below.name, "dirt") + and node_here.param2 == 0 then + if minetest.registered_nodes[node_north.name].buildable_to then + minetest.set_node(north, {name="trunks:"..TRuNK.."root", param2=2}) + end + if minetest.registered_nodes[node_east.name].buildable_to then + minetest.set_node(east, {name="trunks:"..TRuNK.."root", param2=3}) + end + if minetest.registered_nodes[node_south.name].buildable_to then + minetest.set_node(south, {name="trunks:"..TRuNK.."root", param2=0}) + end + if minetest.registered_nodes[node_west.name].buildable_to then + minetest.set_node(west, {name="trunks:"..TRuNK.."root", param2=1}) + end + end + end +end + +biome_lib:register_generate_plant({ + surface = {"group:tree"}, + max_count = 1000, + rarity = 1, + min_elevation = 1, + max_elevation = 40, + near_nodes = {"default:dirt_with_grass"}, + near_nodes_size = 1, + near_nodes_vertical = 1, + near_nodes_count = 1, + plantlife_limit = -1, + check_air = false, + }, + "abstract_trunks.grow_roots" +) + +end diff --git a/plantlife_modpack/trunks/init.lua b/plantlife_modpack/trunks/init.lua new file mode 100644 index 0000000..ee9427d --- /dev/null +++ b/plantlife_modpack/trunks/init.lua @@ -0,0 +1,17 @@ +----------------------------------------------------------------------------------------------- +local title = "Trunks" +local version = "0.1.4" +local mname = "trunks" +----------------------------------------------------------------------------------------------- +-- Code by Mossmanikin & Neuromancer + +abstract_trunks = {} + +dofile(minetest.get_modpath("trunks").."/trunks_settings.txt") +dofile(minetest.get_modpath("trunks").."/generating.lua") +dofile(minetest.get_modpath("trunks").."/nodes.lua") +dofile(minetest.get_modpath("trunks").."/crafting.lua") + +----------------------------------------------------------------------------------------------- +print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") +-----------------------------------------------------------------------------------------------
\ No newline at end of file diff --git a/plantlife_modpack/trunks/nodes.lua b/plantlife_modpack/trunks/nodes.lua new file mode 100644 index 0000000..f490871 --- /dev/null +++ b/plantlife_modpack/trunks/nodes.lua @@ -0,0 +1,368 @@ +-- Code by Mossmanikin & Neuromancer +----------------------------------------------------------------------------------------------- +-- TWiGS +----------------------------------------------------------------------------------------------- +-- For compatibility with older stuff +minetest.register_alias("trunks:twig", "trunks:twig_1") + +local flat_stick = {-1/2, -1/2, -1/2, 1/2, -7/16, 1/2} +local NoDe = { {1}, {2}, {3}, {4}, {5}, --[[{6},]] {7}, {8}, {9}, {10}, {11}, {12}, {13} } + + +for i in pairs(NoDe) do + local NR = NoDe[i][1] + local iNV = NR - 1 + minetest.register_node("trunks:twig_"..NR, { + description = "Twig", + inventory_image = "trunks_twig_"..NR..".png", + wield_image = "trunks_twig_"..NR..".png", + drawtype = "nodebox", + tiles = { + "trunks_twig_"..NR..".png", + "trunks_twig_"..NR..".png^[transformFY", -- mirror + "trunks_twig_6.png" -- empty + }, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + sunlight_propagates = true, + buildable_to = true, + node_box = {type = "fixed", fixed = flat_stick}, + groups = { + choppy=2, + oddly_breakable_by_hand=2, + flammable=3, + attached_node=1, + not_in_creative_inventory=iNV + }, + drop = "trunks:twig_1", + sounds = default.node_sound_leaves_defaults(), + liquids_pointable = true, + on_place = function(itemstack, placer, pointed_thing) + local pt = pointed_thing + local direction = minetest.dir_to_facedir(placer:get_look_dir()) + if minetest.get_node(pt.above).name=="air" then + minetest.set_node(pt.above, {name="trunks:twig_"..math.random(1,4), param2=direction}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + return itemstack + end + end, + }) +end + +----------------------------------------------------------------------------------------------- +-- MoSS +----------------------------------------------------------------------------------------------- +local flat_moss = {-1/2, -1/2, -1/2, 1/2, -15/32--[[<-flickers if smaller]], 1/2} + +minetest.register_node("trunks:moss", { + description = "Moss", + drawtype = "nodebox",--"signlike", + tiles = {"trunks_moss.png"}, + inventory_image = "trunks_moss.png", + wield_image = "trunks_moss.png", + paramtype = "light", + paramtype2 = "facedir",--"wallmounted", + sunlight_propagates = true, + walkable = false, + node_box = {type = "fixed", fixed = flat_moss}, + selection_box = {type = "fixed", fixed = flat_stick},--{type = "wallmounted"}, + groups = {snappy = 3, flammable = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- MoSS & FuNGuS +----------------------------------------------------------------------------------------------- +minetest.register_node("trunks:moss_fungus", { + description = "Moss with Fungus", + drawtype = "nodebox",--"signlike", + tiles = {"trunks_moss_fungus.png"}, + inventory_image = "trunks_moss_fungus.png", + wield_image = "trunks_moss_fungus.png", + paramtype = "light", + paramtype2 = "facedir",--"wallmounted", + sunlight_propagates = true, + walkable = false, + node_box = {type = "fixed", fixed = flat_moss}, + selection_box = {type = "fixed", fixed = flat_stick},--{type = "wallmounted"}, + groups = {snappy = 3, flammable = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS BLoCK +----------------------------------------------------------------------------------------------- +minetest.register_alias("woodstuff:twigs", "trunks:twigs") + +minetest.register_node("trunks:twigs", { + description = "Twigs Block", + paramtype2 = "facedir", + tiles = {"trunks_twigs.png"}, + groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS SLaB +----------------------------------------------------------------------------------------------- +minetest.register_alias("woodstuff:twigs_slab", "trunks:twigs_slab") + +minetest.register_node("trunks:twigs_slab", { + description = "Twigs Slab", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = {"trunks_twigs.png"}, + node_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2}, + }, + groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS RooF +----------------------------------------------------------------------------------------------- +minetest.register_alias("woodstuff:twigs_roof", "trunks:twigs_roof") + +minetest.register_node("trunks:twigs_roof", { + description = "Twigs Roof", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = {"trunks_twigs.png"}, + node_box = { + type = "fixed", +-- { left, bottom, front, right, top, back } + fixed = { + {-1/2, 0, 0, 1/2, 1/2, 1/2}, + {-1/2, -1/2, -1/2, 1/2, 0, 0}, + } + }, + groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS RooF CoRNeR +----------------------------------------------------------------------------------------------- +minetest.register_alias("woodstuff:twigs_roof_corner", "trunks:twigs_roof_corner") + +minetest.register_node("trunks:twigs_roof_corner", { + description = "Twigs Roof Corner 1", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "trunks_twigs_corner.png", + "trunks_twigs_corner.png", + "trunks_twigs.png" + }, + node_box = { + type = "fixed", +-- { left, bottom, front, right, top, back } + fixed = { + {-1/2, 0, 0, 0, 1/2, 1/2}, + {0, -1/2, 0, 1/2, 0, 1/2}, + {-1/2, -1/2, -1/2, 0, 0, 0}, + } + }, + groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), +}) + +----------------------------------------------------------------------------------------------- +-- TWiGS RooF CoRNeR 2 +----------------------------------------------------------------------------------------------- +minetest.register_alias("woodstuff:twigs_roof_corner_2", "trunks:twigs_roof_corner_2") + +minetest.register_node("trunks:twigs_roof_corner_2", { + description = "Twigs Roof Corner 2", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "trunks_twigs_corner.png", + "trunks_twigs_corner.png", + "trunks_twigs.png" + }, + node_box = { + type = "fixed", +-- { left, bottom, front, right, top, back } + fixed = { + {-1/2, -1/2, 0, 0, 0, 1/2}, + {0, 0, 0, 1/2, 1/2, 1/2}, + {-1/2, 0, -1/2, 0, 1/2, 0}, + } + }, + groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), +}) + +if Auto_Roof_Corner == true then + + local roof = "trunks:twigs_roof" + local corner = "trunks:twigs_roof_corner" + local corner_2 = "trunks:twigs_roof_corner_2" + + minetest.register_abm({ + nodenames = {roof}, + interval = 1, + chance = 1, + action = function(pos) + + local node_east = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }) + local node_west = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }) + local node_north = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) + local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}) + -- corner 1 + if ((node_west.name == roof and node_west.param2 == 0) + or (node_west.name == corner and node_west.param2 == 1)) + and ((node_north.name == roof and node_north.param2 == 3) + or (node_north.name == corner and node_north.param2 == 3)) + then + minetest.set_node(pos, {name=corner, param2=0}) + end + + if ((node_north.name == roof and node_north.param2 == 1) + or (node_north.name == corner and node_north.param2 == 2)) + and ((node_east.name == roof and node_east.param2 == 0) + or (node_east.name == corner and node_east.param2 == 0)) + then + minetest.set_node(pos, {name=corner, param2=1}) + end + + if ((node_east.name == roof and node_east.param2 == 2) + or (node_east.name == corner and node_east.param2 == 3)) + and ((node_south.name == roof and node_south.param2 == 1) + or (node_south.name == corner and node_south.param2 == 1)) + then + minetest.set_node(pos, {name=corner, param2=2}) + end + + if ((node_south.name == roof and node_south.param2 == 3) + or (node_south.name == corner and node_south.param2 == 0)) + and ((node_west.name == roof and node_west.param2 == 2) + or (node_west.name == corner and node_west.param2 == 2)) + then + minetest.set_node(pos, {name=corner, param2=3}) + end + -- corner 2 + if ((node_west.name == roof and node_west.param2 == 2) + or (node_west.name == corner_2 and node_west.param2 == 1)) + and ((node_north.name == roof and node_north.param2 == 1) + or (node_north.name == corner_2 and node_north.param2 == 3)) + then + minetest.set_node(pos, {name=corner_2, param2=0}) + end + + if ((node_north.name == roof and node_north.param2 == 3) + or (node_north.name == corner_2 and node_north.param2 == 2)) + and ((node_east.name == roof and node_east.param2 == 2) + or (node_east.name == corner_2 and node_east.param2 == 0)) + then + minetest.set_node(pos, {name=corner_2, param2=1}) + end + + if ((node_east.name == roof and node_east.param2 == 0) + or (node_east.name == corner_2 and node_east.param2 == 3)) + and ((node_south.name == roof and node_south.param2 == 3) + or (node_south.name == corner_2 and node_south.param2 == 1)) + then + minetest.set_node(pos, {name=corner_2, param2=2}) + end + + if ((node_south.name == roof and node_south.param2 == 1) + or (node_south.name == corner_2 and node_south.param2 == 0)) + and ((node_west.name == roof and node_west.param2 == 0) + or (node_west.name == corner_2 and node_west.param2 == 2)) + then + minetest.set_node(pos, {name=corner_2, param2=3}) + end + + end, + }) +end + +-- MM: The following stuff is just for testing purposes for now; no generating of roots. +-- I'm not satisfied with this; they should be either bigger or a different drawtype. +----------------------------------------------------------------------------------------------- +-- RooTS +----------------------------------------------------------------------------------------------- +if Roots == true then -- see settings.txt + +local roots_cube = {-2/16, -1/2, -3/16, 2/16, 1/16, 1/2} + +local roots_sheet = {0, -1/2, -1/2, 0, 1/16, 1/2} + +local TRuNKS = { +-- MoD TRuNK + {"default", "tree" }, + {"default", "jungletree" }, + {"default", "pine_tree" }, + + {"trees", "tree_conifer" }, + {"trees", "tree_mangrove" }, + {"trees", "tree_palm" }, + + {"moretrees", "apple_tree_trunk" }, + {"moretrees", "beech_trunk" }, + {"moretrees", "birch_trunk" }, + {"moretrees", "fir_trunk" }, + {"moretrees", "oak_trunk" }, + {"moretrees", "palm_trunk" }, + {"moretrees", "rubber_tree_trunk" }, + {"moretrees", "rubber_tree_trunk_empty" }, + {"moretrees", "sequoia_trunk" }, + {"moretrees", "spruce_trunk" }, + {"moretrees", "willow_trunk" }, +} + +for i in pairs(TRuNKS) do + local MoD = TRuNKS[i][1] + local TRuNK = TRuNKS[i][2] + if minetest.get_modpath(MoD) ~= nil then + + local node = minetest.registered_nodes[MoD..":"..TRuNK] + if node then + local des = node.description + + minetest.register_node("trunks:"..TRuNK.."root", { + description = des.." Root", + paramtype = "light", + paramtype2 = "facedir", + tiles = { +--[[top]] MoD.."_"..TRuNK..".png", +--[[bottom]] MoD.."_"..TRuNK..".png", +--[[right]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[makealpha:0,0,0", +--[[left]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[transformFX^[makealpha:0,0,0", +--[[back]] MoD.."_"..TRuNK..".png", +--[[front]] MoD.."_"..TRuNK..".png" + }, + drawtype = "nodebox", + selection_box = {type = "fixed", fixed = roots_cube}, + node_box = {type = "fixed", fixed = roots_sheet}, + groups = { + tree=1, + snappy=1, + choppy=2, + oddly_breakable_by_hand=1, + flammable=2--, + --not_in_creative_inventory=1 -- atm in inv for testing + }, + --drop = "trunks:twig_1", -- not sure about this yet + sounds = default.node_sound_wood_defaults(), + }) + + else + print(string.format("[Trunks] warning: tree type '%s:%s' not found", MoD, TRuNK)) + end + end +end +end + +minetest.register_alias("trunks:pine_trunkroot", "trunks:pine_treeroot") diff --git a/plantlife_modpack/trunks/textures/credit_textures.txt b/plantlife_modpack/trunks/textures/credit_textures.txt new file mode 100644 index 0000000..b3893d5 --- /dev/null +++ b/plantlife_modpack/trunks/textures/credit_textures.txt @@ -0,0 +1,34 @@ +------------------------------------------------------------- +Credit for textures of "trunks" +------------------------------------------------------------- +(If more than one author is listed the names are in alphabetical order) +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +FOLDER TEXTURE AUTHORS +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +../trunks/textures trunks_moss.png Neuromancer + trunks_moss_fungus.png Neuromancer + trunks_twig_1.png Mossmanikin + trunks_twig_2.png Mossmanikin, Neuromancer + trunks_twig_3.png Mossmanikin, Neuromancer + trunks_twig_4.png Mossmanikin, Neuromancer + trunks_twig_5.png Mossmanikin, Neuromancer + (trunks_twig_6.png) (Mossmanikin) + trunks_twig_7.png Mossmanikin, Neuromancer + trunks_twig_8.png Mossmanikin, Neuromancer + trunks_twig_9.png Mossmanikin, Neuromancer + trunks_twig_10.png Mossmanikin, Neuromancer + trunks_twig_11.png Mossmanikin, Neuromancer + trunks_twigs.png Mossmanikin + trunks_twigs_corner.png Mossmanikin + trunks_twigs_top.png Mossmanikin +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +../trunks/textures/old & unused comboSticks.png Mossmanikin, Neuromancer + comboSticks_2.png Mossmanikin, Neuromancer + trunks_twig_1e.png Mossmanikin, Neuromancer + trunks_twig_1n.png Mossmanikin, Neuromancer + trunks_twig_2n.png Mossmanikin, Neuromancer + trunks_twig_3n.png Mossmanikin, Neuromancer + trunks_twig_4n.png Mossmanikin, Neuromancer + trunks_twig_5-8.png Mossmanikin, Neuromancer + trunks_twig_9-12.png Mossmanikin, Neuromancer +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/plantlife_modpack/trunks/textures/old & unused/comboSticks.png b/plantlife_modpack/trunks/textures/old & unused/comboSticks.png Binary files differnew file mode 100644 index 0000000..e3b7770 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/comboSticks.png diff --git a/plantlife_modpack/trunks/textures/old & unused/comboSticks_2.png b/plantlife_modpack/trunks/textures/old & unused/comboSticks_2.png Binary files differnew file mode 100644 index 0000000..2053592 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/comboSticks_2.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_root_mask_old.png b/plantlife_modpack/trunks/textures/old & unused/trunks_root_mask_old.png Binary files differnew file mode 100644 index 0000000..51071c3 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_root_mask_old.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_twig_1e.png b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_1e.png Binary files differnew file mode 100644 index 0000000..518955c --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_1e.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_twig_1n.png b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_1n.png Binary files differnew file mode 100644 index 0000000..157c957 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_1n.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_twig_2n.png b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_2n.png Binary files differnew file mode 100644 index 0000000..9945f22 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_2n.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_twig_3n.png b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_3n.png Binary files differnew file mode 100644 index 0000000..6aacf9d --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_3n.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_twig_4n.png b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_4n.png Binary files differnew file mode 100644 index 0000000..c5286b6 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_4n.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_twig_5-8.png b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_5-8.png Binary files differnew file mode 100644 index 0000000..9dda478 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_5-8.png diff --git a/plantlife_modpack/trunks/textures/old & unused/trunks_twig_9-12.png b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_9-12.png Binary files differnew file mode 100644 index 0000000..42a5d45 --- /dev/null +++ b/plantlife_modpack/trunks/textures/old & unused/trunks_twig_9-12.png diff --git a/plantlife_modpack/trunks/textures/trunks_moss.png b/plantlife_modpack/trunks/textures/trunks_moss.png Binary files differnew file mode 100644 index 0000000..5ffe58f --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_moss.png diff --git a/plantlife_modpack/trunks/textures/trunks_moss_fungus.png b/plantlife_modpack/trunks/textures/trunks_moss_fungus.png Binary files differnew file mode 100644 index 0000000..fcd4ae2 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_moss_fungus.png diff --git a/plantlife_modpack/trunks/textures/trunks_root_mask.png b/plantlife_modpack/trunks/textures/trunks_root_mask.png Binary files differnew file mode 100644 index 0000000..5bfdac6 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_root_mask.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_1.png b/plantlife_modpack/trunks/textures/trunks_twig_1.png Binary files differnew file mode 100644 index 0000000..066bbfa --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_1.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_10.png b/plantlife_modpack/trunks/textures/trunks_twig_10.png Binary files differnew file mode 100644 index 0000000..062d8f6 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_10.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_11.png b/plantlife_modpack/trunks/textures/trunks_twig_11.png Binary files differnew file mode 100644 index 0000000..d9f41f8 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_11.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_12.png b/plantlife_modpack/trunks/textures/trunks_twig_12.png Binary files differnew file mode 100644 index 0000000..b8cf458 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_12.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_13.png b/plantlife_modpack/trunks/textures/trunks_twig_13.png Binary files differnew file mode 100644 index 0000000..64b08eb --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_13.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_2.png b/plantlife_modpack/trunks/textures/trunks_twig_2.png Binary files differnew file mode 100644 index 0000000..826253c --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_2.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_3.png b/plantlife_modpack/trunks/textures/trunks_twig_3.png Binary files differnew file mode 100644 index 0000000..4038e03 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_3.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_4.png b/plantlife_modpack/trunks/textures/trunks_twig_4.png Binary files differnew file mode 100644 index 0000000..971d649 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_4.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_5.png b/plantlife_modpack/trunks/textures/trunks_twig_5.png Binary files differnew file mode 100644 index 0000000..5f74334 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_5.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_6.png b/plantlife_modpack/trunks/textures/trunks_twig_6.png Binary files differnew file mode 100644 index 0000000..2f6464b --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_6.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_7.png b/plantlife_modpack/trunks/textures/trunks_twig_7.png Binary files differnew file mode 100644 index 0000000..8b5e4e1 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_7.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_8.png b/plantlife_modpack/trunks/textures/trunks_twig_8.png Binary files differnew file mode 100644 index 0000000..a9441e9 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_8.png diff --git a/plantlife_modpack/trunks/textures/trunks_twig_9.png b/plantlife_modpack/trunks/textures/trunks_twig_9.png Binary files differnew file mode 100644 index 0000000..3e7a3f3 --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twig_9.png diff --git a/plantlife_modpack/trunks/textures/trunks_twigs.png b/plantlife_modpack/trunks/textures/trunks_twigs.png Binary files differnew file mode 100644 index 0000000..20ae6ca --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twigs.png diff --git a/plantlife_modpack/trunks/textures/trunks_twigs_corner.png b/plantlife_modpack/trunks/textures/trunks_twigs_corner.png Binary files differnew file mode 100644 index 0000000..60871bf --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twigs_corner.png diff --git a/plantlife_modpack/trunks/textures/trunks_twigs_top.png b/plantlife_modpack/trunks/textures/trunks_twigs_top.png Binary files differnew file mode 100644 index 0000000..baf797c --- /dev/null +++ b/plantlife_modpack/trunks/textures/trunks_twigs_top.png diff --git a/plantlife_modpack/trunks/trunks_settings.txt b/plantlife_modpack/trunks/trunks_settings.txt new file mode 100644 index 0000000..7fe8822 --- /dev/null +++ b/plantlife_modpack/trunks/trunks_settings.txt @@ -0,0 +1,70 @@ +-- Settings for generation of stuff (at map-generation time) + + + + + +Horizontal_Trunks = true + + + +Trunks_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes + + +Trunks_Rarity = 99 -- larger values make trunks more rare (100 means chance of 0 %) + + + + + +Big_Twigs = true -- twigs larger than one node +Twigs_on_ground = true + + + +Twigs_on_ground_Max_Count = 640 -- absolute maximum number in an area of 80x80x80 nodes + +Twigs_on_ground_Rarity = 66 -- larger values make twigs more rare (100 means chance of 0 %) + + + + + +Twigs_on_water = true + + + +Twigs_on_water_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes + + +Twigs_on_water_Rarity = 33 -- larger values make twigs more rare (100 means chance of 0 %) + + + + + +Moss_on_ground = true + + + +Moss_on_ground_Max_Count = 400 -- absolute maximum number in an area of 80x80x80 nodes + +Moss_on_ground_Rarity = 79 -- larger values makes moss more rare (100 means chance of 0 %) + + + + + +Moss_on_trunk = true + + + +Moss_on_trunk_Max_Count = 640 -- absolute maximum number in an area of 80x80x80 nodes + +Moss_on_trunk_Rarity = 24 -- larger values makes moss more rare (100 means chance of 0 %) + + +Auto_Roof_Corner = true -- behavior is similar (not the same!) to the one of minecraft stairs + + +Roots = true
\ No newline at end of file diff --git a/plantlife_modpack/vines/LICENSE.md b/plantlife_modpack/vines/LICENSE.md new file mode 100644 index 0000000..fb67788 --- /dev/null +++ b/plantlife_modpack/vines/LICENSE.md @@ -0,0 +1,4 @@ +License +======= +- Code WTFPL +- Texture CC diff --git a/plantlife_modpack/vines/README.md b/plantlife_modpack/vines/README.md new file mode 100644 index 0000000..386dcae --- /dev/null +++ b/plantlife_modpack/vines/README.md @@ -0,0 +1,56 @@ +# Vines + +## Features +- Rope block for spawning rope that slowly drops into the deep. +- Vines are climbable and slowly grow downward. +- Shears that allow the collecting of vines. +- Spawns vines on jungletree leaves. +- Roots on the bottom of dirt and dirt with grass nodes. +- Spawns vines on trees located in swampy area. +- Jungle vines that spawn on the side of jungletrees + +## API +The API is very minimal. It allows the registering of vines and the spawning of +existing vines on nodes of your own. + +If you want vines to spawn on a certain node then you can choose which vine by +adding to the node groups the unique group of that vine. This is determined by +the name of the vine ( see vines.lua ) appended with '_vines'. +An example would be. + +"willow_vines" or "jungle_vines" + +There are two types of vines. One that spawns at the bottom of nodes and uses the +plantlike drawtype, and vines that spawn on the side that use signlike +drawtype. The type is determined by the spawn_on_side property in the biome +table. + +### Example +*taken from mod* + +```lua + + vines.register_vine( name, definitions, biome ) + + --e.g. + + vines.register_vine( 'vine', { + description = "Vines", + average_length = 9 + }, biome ) + +``` + +### definitions +|key| type| description| +|---| ---| ---| +|description| string|The vine's tooltip description| +|average_length|int| The average length of vines| + +For biome definitions please see the [biome_lib API documentation](https://github.com/VanessaE/biome_lib/blob/master/API.txt) + +## Notice +Vines use after_destruct on registered leave nodes to remove vines from which +the leaves are removed. This is done by using the override function. +Malfunctions may occur if other mods override the after_destruct of these nodes +also. diff --git a/plantlife_modpack/vines/aliases.lua b/plantlife_modpack/vines/aliases.lua new file mode 100644 index 0000000..fce7218 --- /dev/null +++ b/plantlife_modpack/vines/aliases.lua @@ -0,0 +1,11 @@ +-- used to remove the old vine nodes. This gives room for the new nodes +minetest.register_alias( 'vines:root', 'air' ) +minetest.register_alias( 'vines:root_rotten', 'air' ) +minetest.register_alias( 'vines:vine', 'air' ) +minetest.register_alias( 'vines:vine_rotten', 'air' ) +minetest.register_alias( 'vines:side', 'air' ) +minetest.register_alias( 'vines:side_rotten', 'air' ) +minetest.register_alias( 'vines:jungle', 'air' ) +minetest.register_alias( 'vines:jungle_rotten', 'air' ) +minetest.register_alias( 'vines:willow', 'air' ) +minetest.register_alias( 'vines:willow_rotten', 'air' ) diff --git a/plantlife_modpack/vines/crafts.lua b/plantlife_modpack/vines/crafts.lua new file mode 100644 index 0000000..19e658b --- /dev/null +++ b/plantlife_modpack/vines/crafts.lua @@ -0,0 +1,14 @@ +minetest.register_craft({ + output = 'vines:rope_block', + recipe = vines.recipes['rope_block'] +}) + +minetest.register_craft({ + output = 'vines:shears', + recipe = vines.recipes['shears'] +}) + +minetest.register_craftitem("vines:vines", { + description = "Vines", + inventory_image = "vines_item.png", +}) diff --git a/plantlife_modpack/vines/depends.txt b/plantlife_modpack/vines/depends.txt new file mode 100644 index 0000000..573e6e1 --- /dev/null +++ b/plantlife_modpack/vines/depends.txt @@ -0,0 +1,3 @@ +default +biome_lib +moretrees? diff --git a/plantlife_modpack/vines/functions.lua b/plantlife_modpack/vines/functions.lua new file mode 100644 index 0000000..db120a6 --- /dev/null +++ b/plantlife_modpack/vines/functions.lua @@ -0,0 +1,132 @@ +vines.register_vine = function( name, defs, biome ) + local biome = biome + local groups = { vines=1, snappy=3, flammable=2 } + + local vine_name_end = 'vines:'..name..'_end' + local vine_name_middle = 'vines:'..name..'_middle' + + local vine_image_end = "vines_"..name.."_end.png" + local vine_image_middle = "vines_"..name.."_middle.png" + + local drop_node = vine_name_end + + biome.spawn_plants = { vine_name_end } + + local vine_group = 'group:'..name..'_vines' + biome.spawn_surfaces[ #biome.spawn_surfaces + 1 ] = vine_group + + local selection_box = { type = "wallmounted", } + local drawtype = 'signlike' + if ( not biome.spawn_on_side ) then + --different properties for bottom and side vines. + selection_box = { type = "fixed", fixed = { -0.4, -1/2, -0.4, 0.4, 1/2, 0.4 }, } + drawtype = 'plantlike' + end + + minetest.register_node( vine_name_end, { + description = defs.description, + walkable = false, + climbable = true, + wield_image = vine_image_end, + drop = "", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "wallmounted", + buildable_to = true, + tiles = { vine_image_end }, + drawtype = drawtype, + inventory_image = vine_image_end, + groups = groups, + sounds = default.node_sound_leaves_defaults(), + selection_box = selection_box, + on_construct = function( pos ) + local timer = minetest.get_node_timer( pos ) + timer:start( math.random(5, 10) ) + end, + on_timer = function( pos ) + local node = minetest.get_node( pos ) + local bottom = {x=pos.x, y=pos.y-1, z=pos.z} + local bottom_node = minetest.get_node( bottom ) + if bottom_node.name == "air" then + if not ( math.random( defs.average_length ) == 1 ) then + minetest.set_node( pos, { name = vine_name_middle, param2 = node.param2 } ) + minetest.set_node( bottom, { name = node.name, param2 = node.param2 } ) + local timer = minetest.get_node_timer( bottom_node ) + timer:start( math.random(5, 10) ) + end + end + end, + after_dig_node = function(pos, node, oldmetadata, user) + vines.dig_vine( pos, drop_node, user ) + end + }) + + + minetest.register_node( vine_name_middle, { + description = "Matured "..defs.description, + walkable = false, + climbable = true, + drop = "", + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "wallmounted", + buildable_to = true, + tiles = { vine_image_middle }, + wield_image = vine_image_middle, + drawtype = drawtype, + inventory_image = vine_image_middle, + groups = groups, + sounds = default.node_sound_leaves_defaults(), + selection_box = selection_box, + on_destruct = function( pos ) + local node = minetest.get_node( pos ) + local bottom = {x=pos.x, y=pos.y-1, z=pos.z} + local bottom_node = minetest.get_node( bottom ) + if minetest.get_item_group( bottom_node.name, "vines") then + minetest.remove_node( bottom ) + end + end, + after_dig_node = function( pos, node, oldmetadata, user ) + vines.dig_vine( pos, drop_node, user ) + end + }) + + biome_lib:spawn_on_surfaces( biome ) + + local override_nodes = function( nodes, defs ) + local function override( index, registered ) + local node = nodes[ index ] + if index > #nodes then return registered end + if minetest.registered_nodes[node] then + minetest.override_item( node, defs ) + registered[#registered+1] = node + end + override( index+1, registered ) + end + override( 1, {} ) + end + + override_nodes( biome.spawn_surfaces,{ + after_destruct = function( pos ) + local pos_min = { x = pos.x -1, y = pos.y - 1, z = pos.z - 1 } + local pos_max = { x = pos.x +1, y = pos.y + 1, z = pos.z + 1 } + local positions = minetest.find_nodes_in_area( pos_min, pos_max, "group:vines" ) + for index, position in pairs(positions) do + minetest.remove_node( position ) + end + end + }) + +end + +vines.dig_vine = function( pos, node_name, user ) + --only dig give the vine if shears are used + if not user then return false end + local wielded = user:get_wielded_item() + if 'vines:shears' == wielded:get_name() then + local inv = user:get_inventory() + if inv then + inv:add_item("main", ItemStack( node_name )) + end + end +end diff --git a/plantlife_modpack/vines/init.lua b/plantlife_modpack/vines/init.lua new file mode 100644 index 0000000..72eda93 --- /dev/null +++ b/plantlife_modpack/vines/init.lua @@ -0,0 +1,14 @@ +vines = { + name = 'vines', + recipes = {} +} + +dofile( minetest.get_modpath( vines.name ) .. "/functions.lua" ) +dofile( minetest.get_modpath( vines.name ) .. "/aliases.lua" ) +dofile( minetest.get_modpath( vines.name ) .. "/recipes.lua" ) +dofile( minetest.get_modpath( vines.name ) .. "/crafts.lua" ) +dofile( minetest.get_modpath( vines.name ) .. "/nodes.lua" ) +dofile( minetest.get_modpath( vines.name ) .. "/shear.lua" ) +dofile( minetest.get_modpath( vines.name ) .. "/vines.lua" ) + +print("[Vines] Loaded!") diff --git a/plantlife_modpack/vines/nodes.lua b/plantlife_modpack/vines/nodes.lua new file mode 100644 index 0000000..9d7df00 --- /dev/null +++ b/plantlife_modpack/vines/nodes.lua @@ -0,0 +1,83 @@ +minetest.register_node("vines:rope_block", { + description = "Rope", + sunlight_propagates = true, + paramtype = "light", + tiles = { + "default_wood.png^vines_rope.png", + "default_wood.png^vines_rope.png", + "default_wood.png", + "default_wood.png", + "default_wood.png^vines_rope.png", + "default_wood.png^vines_rope.png", + }, + groups = { flammable=2, choppy=2, oddly_breakable_by_hand=1 }, + after_place_node = function(pos) + local p = {x=pos.x, y=pos.y-1, z=pos.z} + local n = minetest.get_node(p) + if n.name == "air" then + minetest.add_node(p, {name="vines:rope_end"}) + end + end, + after_dig_node = function(pos, node, digger) + local p = {x=pos.x, y=pos.y-1, z=pos.z} + local n = minetest.get_node(p) + while ( n.name == 'vines:rope' or n.name == 'vines:rope_end' ) do + minetest.remove_node(p) + p = {x=p.x, y=p.y-1, z=p.z} + n = minetest.get_node(p) + end + end +}) + +minetest.register_node("vines:rope", { + description = "Rope", + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + drop = "", + tiles = { "vines_rope.png" }, + drawtype = "plantlike", + groups = {flammable=2, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, +}) + +minetest.register_node("vines:rope_end", { + description = "Rope", + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + drop = "", + tiles = { "vines_rope_end.png" }, + drawtype = "plantlike", + groups = {flammable=2, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + after_place_node = function(pos) + yesh = {x = pos.x, y= pos.y-1, z=pos.z} + minetest.add_node(yesh, {name="vines:rope"}) + end, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + on_construct = function( pos ) + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end, + on_timer = function( pos, elapsed ) + local p = {x=pos.x, y=pos.y-1, z=pos.z} + local n = minetest.get_node(p) + if n.name == "air" then + minetest.set_node(pos, {name="vines:rope"}) + minetest.add_node(p, {name="vines:rope_end"}) + else + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end + end +}) diff --git a/plantlife_modpack/vines/recipes.lua b/plantlife_modpack/vines/recipes.lua new file mode 100644 index 0000000..d2b928a --- /dev/null +++ b/plantlife_modpack/vines/recipes.lua @@ -0,0 +1,12 @@ +vines.recipes['rope_block'] = { + {'', 'default:wood', ''}, + {'', 'group:vines', ''}, + {'', 'group:vines', ''} +} + +vines.recipes['shears'] = { + {'', 'default:steel_ingot', ''}, + {'default:stick', 'default:wood', 'default:steel_ingot'}, + {'', '', 'default:stick'} +} + diff --git a/plantlife_modpack/vines/shear.lua b/plantlife_modpack/vines/shear.lua new file mode 100644 index 0000000..e6d915a --- /dev/null +++ b/plantlife_modpack/vines/shear.lua @@ -0,0 +1,15 @@ +minetest.register_tool("vines:shears", { + description = "Shears", + inventory_image = "vines_shears.png", + wield_image = "vines_shears.png", + stack_max = 1, + max_drop_level=3, + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=0, + groupcaps={ + snappy={times={[3]=0.2}, maxwear=0.05, maxlevel=3}, + wool={times={[3]=0.2}, maxwear=0.05, maxlevel=3} + } + }, +}) diff --git a/plantlife_modpack/vines/textures/vines_item.png b/plantlife_modpack/vines/textures/vines_item.png Binary files differnew file mode 100644 index 0000000..c66242e --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_item.png diff --git a/plantlife_modpack/vines/textures/vines_jungle_end.png b/plantlife_modpack/vines/textures/vines_jungle_end.png Binary files differnew file mode 100644 index 0000000..6c8d339 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_jungle_end.png diff --git a/plantlife_modpack/vines/textures/vines_jungle_middle.png b/plantlife_modpack/vines/textures/vines_jungle_middle.png Binary files differnew file mode 100644 index 0000000..bf838a5 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_jungle_middle.png diff --git a/plantlife_modpack/vines/textures/vines_root_end.png b/plantlife_modpack/vines/textures/vines_root_end.png Binary files differnew file mode 100644 index 0000000..4fc3f87 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_root_end.png diff --git a/plantlife_modpack/vines/textures/vines_root_middle.png b/plantlife_modpack/vines/textures/vines_root_middle.png Binary files differnew file mode 100644 index 0000000..49f88c0 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_root_middle.png diff --git a/plantlife_modpack/vines/textures/vines_rope.png b/plantlife_modpack/vines/textures/vines_rope.png Binary files differnew file mode 100644 index 0000000..0045c4c --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_rope.png diff --git a/plantlife_modpack/vines/textures/vines_rope_end.png b/plantlife_modpack/vines/textures/vines_rope_end.png Binary files differnew file mode 100644 index 0000000..faf2c71 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_rope_end.png diff --git a/plantlife_modpack/vines/textures/vines_shears.png b/plantlife_modpack/vines/textures/vines_shears.png Binary files differnew file mode 100644 index 0000000..c4c39f9 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_shears.png diff --git a/plantlife_modpack/vines/textures/vines_side_end.png b/plantlife_modpack/vines/textures/vines_side_end.png Binary files differnew file mode 100644 index 0000000..5b3b28f --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_side_end.png diff --git a/plantlife_modpack/vines/textures/vines_side_middle.png b/plantlife_modpack/vines/textures/vines_side_middle.png Binary files differnew file mode 100644 index 0000000..2576e93 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_side_middle.png diff --git a/plantlife_modpack/vines/textures/vines_vine_end.png b/plantlife_modpack/vines/textures/vines_vine_end.png Binary files differnew file mode 100644 index 0000000..062857b --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_vine_end.png diff --git a/plantlife_modpack/vines/textures/vines_vine_middle.png b/plantlife_modpack/vines/textures/vines_vine_middle.png Binary files differnew file mode 100644 index 0000000..8afffe8 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_vine_middle.png diff --git a/plantlife_modpack/vines/textures/vines_willow_end.png b/plantlife_modpack/vines/textures/vines_willow_end.png Binary files differnew file mode 100644 index 0000000..b5b8e59 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_willow_end.png diff --git a/plantlife_modpack/vines/textures/vines_willow_middle.png b/plantlife_modpack/vines/textures/vines_willow_middle.png Binary files differnew file mode 100644 index 0000000..ca0b831 --- /dev/null +++ b/plantlife_modpack/vines/textures/vines_willow_middle.png diff --git a/plantlife_modpack/vines/vines.lua b/plantlife_modpack/vines/vines.lua new file mode 100644 index 0000000..82c5b2a --- /dev/null +++ b/plantlife_modpack/vines/vines.lua @@ -0,0 +1,104 @@ +vines.register_vine( 'root', { + description = "Roots", + average_length = 9, +},{ + choose_random_wall = true, + avoid_nodes = {"vines:root_middle"}, + avoid_radius = 5, + spawn_delay = 500, + spawn_chance = 10, + spawn_surfaces = { + "default:dirt_with_grass", + "default:dirt" + }, + spawn_on_bottom = true, + plantlife_limit = -0.6, + humidity_min = 0.4, +}) + +vines.register_vine( 'vine', { + description = "Vines", + average_length = 5, +},{ + choose_random_wall = true, + avoid_nodes = {"group:vines"}, + avoid_radius = 5, + spawn_delay = 500, + spawn_chance = 100, + spawn_surfaces = { + "default:jungleleaves", + "moretrees:jungletree_leaves_red", + "moretrees:jungletree_leaves_yellow", + "moretrees:jungletree_leaves_green" + }, + spawn_on_bottom = true, + plantlife_limit = -0.9, + humidity_min = 0.7, +}) + +vines.register_vine( 'side', { + description = "Vines", + average_length = 6, +},{ + choose_random_wall = true, + avoid_nodes = {"group:vines", "default:apple"}, + choose_random_wall = true, + avoid_radius = 3, + spawn_delay = 500, + spawn_chance = 100, + spawn_surfaces = { + "default:jungleleaves", + "moretrees:jungletree_leaves_red", + "moretrees:jungletree_leaves_yellow", + "moretrees:jungletree_leaves_green" + }, + spawn_on_side = true, + plantlife_limit = -0.9, + humidity_min = 0.4, +}) + +vines.register_vine( "jungle", { + description = "Jungle Vines", + average_length = 7, +},{ + choose_random_wall = true, + neighbors = { + "default:jungleleaves", + "moretrees:jungletree_leaves_red", + "moretrees:jungletree_leaves_yellow", + "moretrees:jungletree_leaves_green" + }, + avoid_nodes = { + "vines:jungle_middle", + "vines:jungle_end", + }, + avoid_radius = 5, + spawn_delay = 500, + spawn_chance = 100, + spawn_surfaces = { + "default:jungletree", + "moretrees:jungletree_trunk" + }, + spawn_on_side = true, + plantlife_limit = -0.9, + humidity_min = 0.2, +}) + +vines.register_vine( 'willow', { + description = "Willow Vines", + average_length = 9, +},{ + choose_random_wall = true, + avoid_nodes = { "vines:willow_middle" }, + avoid_radius = 5, + near_nodes = { 'default:water_source' }, + near_nodes_size = 1, + near_nodes_count = 1, + near_nodes_vertical = 7, + plantlife_limit = -0.8, + spawn_chance = 10, + spawn_delay = 500, + spawn_on_side = true, + spawn_surfaces = {"moretrees:willow_leaves"}, + humidity_min = 0.5 +}) diff --git a/plantlife_modpack/woodsoils/depends.txt b/plantlife_modpack/woodsoils/depends.txt new file mode 100644 index 0000000..c95a2bf --- /dev/null +++ b/plantlife_modpack/woodsoils/depends.txt @@ -0,0 +1,7 @@ +default +biome_lib +bushes? +ferns? +moretrees? +trees? +trunks?
\ No newline at end of file diff --git a/plantlife_modpack/woodsoils/generating.lua b/plantlife_modpack/woodsoils/generating.lua new file mode 100644 index 0000000..1d03ed7 --- /dev/null +++ b/plantlife_modpack/woodsoils/generating.lua @@ -0,0 +1,151 @@ +-- generating of forest soils + +local RaDiuS = { +-- WE1 NS1 WE2 NS2 WE3 NS3 + {-1,-2, -2,-2, -2,-3}, + { 0,-2, -3,-1, -3,-2}, + { 1,-2, -3, 0, -4,-1}, + {-2,-1, -3, 1, -4, 0}, + {-1,-1, -2, 2, -4, 1}, + { 0,-1, -1, 3, -3, 2}, + { 1,-1, 0, 3, -2, 3}, + { 2,-1, 1, 3, -1, 4}, + {-2, 0, 2, 2, 0, 4}, + {-1, 0, 3, 1, 1, 4}, + { 0, 0, 3, 0, 2, 3}, + { 1, 0, 3,-1, 3, 2}, + { 2, 0, 2,-2, 4, 1}, + {-2, 1, 1,-3, 4, 0}, + {-1, 1, 0,-3, 4,-1}, + { 0, 1, -1,-3, 3,-2}, + { 1, 1, 0, 0, 2,-3}, + { 2, 1, 0, 0, 1,-4}, + {-1, 2, 0, 0, 0,-4}, + { 0, 2, 0, 0, -1,-4}, + { 1, 2, 0, 0, 0, 0}, +} +-- e = + , n = + +abstract_woodsoils.place_soil = function(pos) + + if minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name, "soil") > 0 + or minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-2,z=pos.z}).name, "soil") > 0 then + for i in pairs(RaDiuS) do + local WE1 = RaDiuS[i][1] + local NS1 = RaDiuS[i][2] + local WE2 = RaDiuS[i][3] + local NS2 = RaDiuS[i][4] + local WE3 = RaDiuS[i][5] + local NS3 = RaDiuS[i][6] + local radius_1a = {x=pos.x+WE1,y=pos.y-1,z=pos.z+NS1} + local radius_1b = {x=pos.x+WE1,y=pos.y-2,z=pos.z+NS1} + local radius_2a = {x=pos.x+WE2,y=pos.y-1,z=pos.z+NS2} + local radius_2b = {x=pos.x+WE2,y=pos.y-2,z=pos.z+NS2} + local radius_3a = {x=pos.x+WE3,y=pos.y-1,z=pos.z+NS3} + local radius_3b = {x=pos.x+WE3,y=pos.y-2,z=pos.z+NS3} + --local node_1a = minetest.get_node(radius_1a) + --local node_1b = minetest.get_node(radius_1b) + local node_2a = minetest.get_node(radius_2a) + local node_2b = minetest.get_node(radius_2b) + local node_3a = minetest.get_node(radius_3a) + local node_3b = minetest.get_node(radius_3b) + -- Dirt with Leaves 1 + if minetest.get_item_group(minetest.get_node(radius_1a).name, "soil") > 0 then + minetest.set_node(radius_1a, {name="woodsoils:dirt_with_leaves_1"}) + end + if minetest.get_item_group(minetest.get_node(radius_1b).name, "soil") > 0 then + minetest.set_node(radius_1b, {name="woodsoils:dirt_with_leaves_1"}) + end + -- Grass with Leaves 2 + if string.find(node_2a.name, "dirt_with_grass") then + minetest.set_node(radius_2a, {name="woodsoils:grass_with_leaves_2"}) + end + if string.find(node_2b.name, "dirt_with_grass") then + minetest.set_node(radius_2b, {name="woodsoils:grass_with_leaves_2"}) + end + -- Grass with Leaves 1 + if string.find(node_3a.name, "dirt_with_grass") then + minetest.set_node(radius_3a, {name="woodsoils:grass_with_leaves_1"}) + end + if string.find(node_3b.name, "dirt_with_grass") then + minetest.set_node(radius_3b, {name="woodsoils:grass_with_leaves_1"}) + end + end + end +end + +biome_lib:register_generate_plant({ + surface = { + "group:tree", + "ferns:fern_03", + "ferns:fern_02", + "ferns:fern_01" + }, + max_count = 1000, + rarity = 1, + min_elevation = 1, + max_elevation = 40, + near_nodes = {"group:tree","ferns:fern_03","ferns:fern_02","ferns:fern_01"}, + near_nodes_size = 5, + near_nodes_vertical = 1, + near_nodes_count = 4, + plantlife_limit = -1, + check_air = false, + }, + "abstract_woodsoils.place_soil" +) + +biome_lib:register_generate_plant({ + surface = { + "moretrees:apple_tree_sapling_ongen", + "moretrees:beech_sapling_ongen", + "moretrees:birch_sapling_ongen", + "moretrees:fir_sapling_ongen", + "moretrees:jungletree_sapling_ongen", + "moretrees:oak_sapling_ongen", + "moretrees:palm_sapling_ongen", + "moretrees:rubber_tree_sapling_ongen", + "moretrees:sequoia_sapling_ongen", + "moretrees:spruce_sapling_ongen", + "moretrees:willow_sapling_ongen" + }, + max_count = 1000, + rarity = 2, + min_elevation = 1, + max_elevation = 40, + plantlife_limit = -0.9, + check_air = false, + }, + "abstract_woodsoils.place_soil" +) + +minetest.register_abm({ + nodenames = {"default:papyrus"}, + neighbors = { + "woodsoils:dirt_with_leaves_1", + "woodsoils:dirt_with_leaves_2", + "woodsoils:grass_with_leaves_1", + "woodsoils:grass_with_leaves_2" + }, + interval = 50, + chance = 20, + action = function(pos, node) + pos.y = pos.y-1 + local name = minetest.get_node(pos).name + if string.find(name, "_with_leaves_") then + if minetest.find_node_near(pos, 3, {"group:water"}) == nil then + return + end + pos.y = pos.y+1 + local height = 0 + while minetest.get_node(pos).name == "default:papyrus" and height < 4 do + height = height+1 + pos.y = pos.y+1 + end + if height < 4 then + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name="default:papyrus"}) + end + end + end + end, +}) diff --git a/plantlife_modpack/woodsoils/init.lua b/plantlife_modpack/woodsoils/init.lua new file mode 100644 index 0000000..9037d45 --- /dev/null +++ b/plantlife_modpack/woodsoils/init.lua @@ -0,0 +1,29 @@ +----------------------------------------------------------------------------------------------- +local title = "Wood Soils" -- former "Forest Soils" +local version = "0.0.9" +local mname = "woodsoils" -- former "forestsoils" +----------------------------------------------------------------------------------------------- + +abstract_woodsoils = {} + +dofile(minetest.get_modpath("woodsoils").."/nodes.lua") +dofile(minetest.get_modpath("woodsoils").."/generating.lua") + +-- felt like playing a bit :D +--[[print(" _____ __") +print("_/ ____\\___________ ____ _______/ |_") +print("\\ __\\/ _ \\_ __ \\_/ __ \\ / ___/\\ __\\") +print(" | | ( <_> ) | \\/\\ ___/ \\___ \\ | |") +print(" |__| \\____/|__| \\___ >____ > |__|") +print(" \\/ \\/") + +print(" .__.__") +print(" __________ |__| | ______") +print(" / ___/ _ \\| | | / ___/") +print(" \\___ ( <_> ) | |__\\___ \\") +print("/____ >____/|__|____/____ >") +print(" \\/ \\/")]] + +----------------------------------------------------------------------------------------------- +print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") +-----------------------------------------------------------------------------------------------
\ No newline at end of file diff --git a/plantlife_modpack/woodsoils/nodes.lua b/plantlife_modpack/woodsoils/nodes.lua new file mode 100644 index 0000000..e80c522 --- /dev/null +++ b/plantlife_modpack/woodsoils/nodes.lua @@ -0,0 +1,79 @@ +-- nodes + +minetest.register_node("woodsoils:dirt_with_leaves_1", { + description = "Forest Soil 1", + tiles = { + "default_dirt.png^woodsoils_ground_cover.png", + "default_dirt.png", + "default_dirt.png^woodsoils_ground_cover_side.png"}, + is_ground_content = true, + groups = { + crumbly=3, + soil=1--, + --not_in_creative_inventory=1 + }, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("woodsoils:dirt_with_leaves_2", { + description = "Forest Soil 2", + tiles = { + "woodsoils_ground.png", + "default_dirt.png", + "default_dirt.png^woodsoils_ground_side.png"}, + is_ground_content = true, + groups = { + crumbly=3, + soil=1--, + --not_in_creative_inventory=1 + }, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("woodsoils:grass_with_leaves_1", { + description = "Forest Soil 3", + tiles = { + "default_grass.png^woodsoils_ground_cover2.png", + "default_dirt.png", + "default_dirt.png^default_grass_side.png^woodsoils_ground_cover_side2.png"}, + is_ground_content = true, + groups = { + crumbly=3, + soil=1--, + --not_in_creative_inventory=1 + }, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("woodsoils:grass_with_leaves_2", { + description = "Forest Soil 4", + tiles = { + "default_grass.png^woodsoils_ground_cover.png", + "default_dirt.png", + "default_dirt.png^default_grass_side.png^woodsoils_ground_cover_side.png"}, + is_ground_content = true, + groups = { + crumbly=3, + soil=1--, + --not_in_creative_inventory=1 + }, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +-- For compatibility with older stuff +minetest.register_alias("forestsoils:dirt_with_leaves_1", "woodsoils:dirt_with_leaves_1") +minetest.register_alias("forestsoils:dirt_with_leaves_2", "woodsoils:dirt_with_leaves_2") +minetest.register_alias("forestsoils:grass_with_leaves_1", "woodsoils:grass_with_leaves_1") +minetest.register_alias("forestsoils:grass_with_leaves_2", "woodsoils:grass_with_leaves_2") diff --git a/plantlife_modpack/woodsoils/textures/credit_textures.txt b/plantlife_modpack/woodsoils/textures/credit_textures.txt new file mode 100644 index 0000000..45d582d --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/credit_textures.txt @@ -0,0 +1,16 @@ +------------------------------------------------------------- +Credit for textures of "woodsoils" +------------------------------------------------------------- +(If more than one author is listed the names are in alphabetical order) +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +FOLDER TEXTURE AUTHORS +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +../woodsoils/textures woodsoils_ground.png Mossmanikin + woodsoils_ground_cover.png Mossmanikin + woodsoils_ground_cover_side.png Mossmanikin + woodsoils_ground_cover_side2.png Mossmanikin + woodsoils_ground_cover2.png Mossmanikin + woodsoils_ground_side.png Mossmanikin +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +../woodsoils/textures/not in use woodsoils.png Mossmanikin +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/plantlife_modpack/woodsoils/textures/not in use/woodsoils.png b/plantlife_modpack/woodsoils/textures/not in use/woodsoils.png Binary files differnew file mode 100644 index 0000000..67253bc --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/not in use/woodsoils.png diff --git a/plantlife_modpack/woodsoils/textures/woodsoils_ground.png b/plantlife_modpack/woodsoils/textures/woodsoils_ground.png Binary files differnew file mode 100644 index 0000000..907b345 --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/woodsoils_ground.png diff --git a/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover.png b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover.png Binary files differnew file mode 100644 index 0000000..103f103 --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover.png diff --git a/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover2.png b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover2.png Binary files differnew file mode 100644 index 0000000..ec18dd6 --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover2.png diff --git a/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover_side.png b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover_side.png Binary files differnew file mode 100644 index 0000000..d21f2b9 --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover_side.png diff --git a/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover_side2.png b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover_side2.png Binary files differnew file mode 100644 index 0000000..f4e4ce6 --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/woodsoils_ground_cover_side2.png diff --git a/plantlife_modpack/woodsoils/textures/woodsoils_ground_side.png b/plantlife_modpack/woodsoils/textures/woodsoils_ground_side.png Binary files differnew file mode 100644 index 0000000..08fb4be --- /dev/null +++ b/plantlife_modpack/woodsoils/textures/woodsoils_ground_side.png diff --git a/plantlife_modpack/youngtrees/depends.txt b/plantlife_modpack/youngtrees/depends.txt new file mode 100644 index 0000000..4e35179 --- /dev/null +++ b/plantlife_modpack/youngtrees/depends.txt @@ -0,0 +1,2 @@ +default +biome_lib
\ No newline at end of file diff --git a/plantlife_modpack/youngtrees/init.lua b/plantlife_modpack/youngtrees/init.lua new file mode 100644 index 0000000..183e86e --- /dev/null +++ b/plantlife_modpack/youngtrees/init.lua @@ -0,0 +1,146 @@ +abstract_youngtrees = {} + +minetest.register_node("youngtrees:bamboo", { + description = "Young Bamboo Tree", + drawtype="nodebox", + tiles = {"bamboo.png"}, + paramtype = "light", + walkable = false, + is_ground_content = true, + node_box = { + type = "fixed", + fixed = { + {-0.058251,-0.500000,-0.413681,0.066749,0.500000,-0.282500}, --NodeBox 1 + {-0.058251,-0.500000,-0.103123,0.066749,0.500000,0.038672}, --NodeBox 2 + {-0.058251,-0.500000,0.181227,0.066749,0.500000,0.342500}, --NodeBox 3 + } + }, + groups = {snappy=3,flammable=2}, + sounds = default.node_sound_leaves_defaults(), + drop = 'trunks:twig_1' +}) + +minetest.register_node("youngtrees:youngtree2_middle",{ + description = "Young Tree 2 (middle)", + drawtype="nodebox", + tiles = {"youngtree2branch.png"}, + inventory_image = "youngtree2branch.png", + wield_image = "youngtree2branch.png", + paramtype = "light", + walkable = false, + is_ground_content = true, + node_box = { + type = "fixed", + fixed = { + {0.125000,-0.500000,-0.500000,0.500000,-0.187500,-0.125000}, --NodeBox 1 + {-0.187500,-0.187500,-0.500000,0.500000,0.125000,0.250000}, --NodeBox 2 + {-0.500000,0.125000,-0.500000,0.500000,0.500000,0.500000}, --NodeBox 3 + } + }, + groups = {snappy=3,flammable=2}, + sounds = default.node_sound_leaves_defaults(), + drop = 'trunks:twig_1' +}) + +minetest.register_node("youngtrees:youngtree_top", { + description = "Young Tree (top)", + drawtype = "plantlike", + tiles = {"youngtree16xa.png"}, + inventory_image = "youngtree16xa.png", + wield_image = "youngtree16xa.png", + paramtype = "light", + walkable = false, + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + groups = {snappy=3,flammable=2}, + sounds = default.node_sound_leaves_defaults(), + drop = 'trunks:twig_1' +}) + + +minetest.register_node("youngtrees:youngtree_middle", { + description = "Young Tree (middle)", + drawtype = "plantlike", + tiles = {"youngtree16xb.png"}, + inventory_image = "youngtree16xb.png", + wield_image = "youngtree16xb.png", + paramtype = "light", + walkable = false, + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + groups = {snappy=3,flammable=2}, + sounds = default.node_sound_leaves_defaults(), + drop = 'trunks:twig_1' +}) + + + +minetest.register_node("youngtrees:youngtree_bottom", { + description = "Young Tree (bottom)", + drawtype = "plantlike", + tiles = {"youngtree16xc.png"}, + inventory_image = "youngtree16xc.png", + wield_image = "youngtree16xc.png", + paramtype = "light", + walkable = false, + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + groups = {snappy=3,flammable=2}, + sounds = default.node_sound_leaves_defaults(), + drop = 'trunks:twig_1' +}) + + + abstract_youngtrees.grow_youngtree = function(pos) + local height = math.random(1,3) + abstract_youngtrees.grow_youngtree_node(pos,height) +end + +abstract_youngtrees.grow_youngtree_node = 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} + + 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 == 1 then + minetest.set_node(right_here, {name="youngtrees:youngtree_top"}) + end + if height == 2 then + minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"}) + minetest.set_node(above_right_here, {name="youngtrees:youngtree_top"}) + end + if height == 3 then + local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z} + minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"}) + minetest.set_node(above_right_here, {name="youngtrees:youngtree_middle"}) + minetest.set_node(two_above_right_here, {name="youngtrees:youngtree_top"}) + end + end +end + + +biome_lib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + "stoneage:grass_with_silex", + "sumpf:peat", + "sumpf:sumpf" + }, + max_count = 55, --10,15 + rarity = 101 - 4, --3,4 + min_elevation = 1, -- above sea level + plantlife_limit = -0.9, + }, + abstract_youngtrees.grow_youngtree +) diff --git a/plantlife_modpack/youngtrees/textures/bamboo.png b/plantlife_modpack/youngtrees/textures/bamboo.png Binary files differnew file mode 100644 index 0000000..018d42e --- /dev/null +++ b/plantlife_modpack/youngtrees/textures/bamboo.png diff --git a/plantlife_modpack/youngtrees/textures/unused/sapling.png b/plantlife_modpack/youngtrees/textures/unused/sapling.png Binary files differnew file mode 100644 index 0000000..a3d5127 --- /dev/null +++ b/plantlife_modpack/youngtrees/textures/unused/sapling.png diff --git a/plantlife_modpack/youngtrees/textures/unused/sapling16x.png b/plantlife_modpack/youngtrees/textures/unused/sapling16x.png Binary files differnew file mode 100644 index 0000000..45b86ee --- /dev/null +++ b/plantlife_modpack/youngtrees/textures/unused/sapling16x.png diff --git a/plantlife_modpack/youngtrees/textures/youngtree16xa.png b/plantlife_modpack/youngtrees/textures/youngtree16xa.png Binary files differnew file mode 100644 index 0000000..9bba623 --- /dev/null +++ b/plantlife_modpack/youngtrees/textures/youngtree16xa.png diff --git a/plantlife_modpack/youngtrees/textures/youngtree16xb.png b/plantlife_modpack/youngtrees/textures/youngtree16xb.png Binary files differnew file mode 100644 index 0000000..d83b7a3 --- /dev/null +++ b/plantlife_modpack/youngtrees/textures/youngtree16xb.png diff --git a/plantlife_modpack/youngtrees/textures/youngtree16xc.png b/plantlife_modpack/youngtrees/textures/youngtree16xc.png Binary files differnew file mode 100644 index 0000000..cfe3cf1 --- /dev/null +++ b/plantlife_modpack/youngtrees/textures/youngtree16xc.png diff --git a/plantlife_modpack/youngtrees/textures/youngtree2branch.png b/plantlife_modpack/youngtrees/textures/youngtree2branch.png Binary files differnew file mode 100644 index 0000000..89b2f23 --- /dev/null +++ b/plantlife_modpack/youngtrees/textures/youngtree2branch.png |