1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Updated moretrees, plantlife, and MinetestForFunGame

- Solves #220
 - Merge mapgen into MinetestForFun Game
 - Merge acacia support in moretrees
 - Add 3dmushrooms mod (world.mt updated)
This commit is contained in:
LeMagnesium
2015-08-15 22:10:59 +02:00
parent 5fbf422aaf
commit 5b4172541b
110 changed files with 1733 additions and 1111 deletions

View File

@ -0,0 +1,2 @@
default
flowers

View File

@ -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")
minetest.log("action", "[3D Mushrooms] loaded.")

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,2 +1,4 @@
default
biome_lib
biome_lib
stonage?
sumpf?

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 609 B

View File

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 620 B

View File

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

View File

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 540 B

View File

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 285 B

View File

Before

Width:  |  Height:  |  Size: 657 B

After

Width:  |  Height:  |  Size: 657 B

View File

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

View File

Before

Width:  |  Height:  |  Size: 83 B

After

Width:  |  Height:  |  Size: 83 B

View File

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 525 B

View File

@ -27,8 +27,9 @@ bushes_classic.bushes_descriptions = {
bushes_classic.spawn_list = {}
dofile(minetest.get_modpath('bushes_classic') .. '/cooking.lua')
dofile(minetest.get_modpath('bushes_classic') .. '/nodes.lua')
local modpath = minetest.get_modpath('bushes_classic')
dofile(modpath..'/cooking.lua')
dofile(modpath..'/nodes.lua')
biome_lib:spawn_on_surfaces({
spawn_delay = 3600,

View File

@ -220,55 +220,6 @@ for i in ipairs(algae_list) do
})
end
-- register all potted plant nodes, crafts, and most backward-compat aliases
-- Description, base node name, item to craft flowerpot with
-- /MFF BEGIN (Mg|06/04/15 4:31PM)
--[[local flowers_list = {
{ "Rose", "rose", "flowers:rose" },
{ "Tulip", "tulip", "flowers:tulip" },
{ "Yellow Dandelion", "dandelion_yellow", "flowers:dandelion_yellow" },
{ "White Dandelion", "dandelion_white", "flowers:dandelion_white" },
{ "Blue Geranium", "geranium", "flowers:geranium" },
{ "Viola", "viola", "flowers:viola" },
{ "Cactus", "cactus", "default:cactus" },
{ "Bonsai", "bonsai", "default:sapling" }
}
for i in ipairs(flowers_list) do
local flowerdesc = flowers_list[i][1]
local flower = flowers_list[i][2]
local craftwith = flowers_list[i][3]
minetest.register_node(":flowers:potted_"..flower, {
description = S("Potted "..flowerdesc),
drawtype = "mesh",
mesh = "flowers_potted.obj",
tiles = { "flowers_potted_"..flower..".png", "flowers_potted.png" },
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = { snappy = 3, flammable=2 },
sounds = default.node_sound_glass_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.2, -0.5, -0.2, 0.2, 0.4, 0.2 },
},
})
minetest.register_craft( {
type = "shapeless",
output = "flowers:potted_"..flower,
recipe = {
craftwith,
"flowers:flower_pot"
}
})
minetest.register_alias("flowers:flower_"..flower.."_pot", "flowers:potted_"..flower)
end
]]-- /MFF END (Mg|06/04/15 4:32PM)
local box = {
type="fixed",
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },

View File

@ -13,55 +13,23 @@ 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 = "nodebox",
drawtype = "mesh",
mesh = "molehill_molehill.obj",
description = "Mole Hill",
inventory_image = "molehills_side.png",
tiles = {
"molehills_dirt.png",--"molehill_top.png",
"molehills_dirt.png",--"molehill_top.png",
"molehills_dirt.png"--"molehill_side.png"
},
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
-- { left, bottom, front, right, top, back}
{-2/16, -3/16, -1/16, 2/16, -2/16, 1/16},
{-1/16, -3/16, -2/16, 1/16, -2/16, 2/16},
-- { left, bottom, front, right, top, back}
{-4/16, -4/16, -2/16, 4/16, -3/16, 2/16},
{-2/16, -4/16, -4/16, 2/16, -3/16, 4/16},
{-3/16, -4/16, -3/16, 3/16, -3/16, 3/16},
-- { left, bottom, front, right, top, back}
{-5/16, -5/16, -2/16, 5/16, -4/16, 2/16},
{-2/16, -5/16, -5/16, 2/16, -4/16, 5/16},
{-4/16, -5/16, -4/16, 4/16, -4/16, 4/16},
-- { left, bottom, front, right, top, back}
{-6/16, -6/16, -2/16, 6/16, -5/16, 2/16},
{-2/16, -6/16, -6/16, 2/16, -5/16, 6/16},
{-5/16, -6/16, -4/16, 5/16, -5/16, 4/16},
{-4/16, -6/16, -5/16, 4/16, -5/16, 5/16},
-- { left, bottom, front, right, top, back}
{-7/16, -7/16, -3/16, 7/16, -6/16, 3/16},
{-3/16, -7/16, -7/16, 3/16, -6/16, 7/16},
{-6/16, -7/16, -4/16, 6/16, -6/16, 4/16},
{-4/16, -7/16, -6/16, 4/16, -6/16, 6/16},
{-5/16, -7/16, -5/16, 5/16, -6/16, 5/16},
-- { left, bottom, front, right, top, back}
--[[b]] {-1/2 , -1/2 , -3/16, 1/2 , -7/16, 3/16}, -- left to right
--[[o]] {-3/16, -1/2 , -1/2 , 3/16, -7/16, 1/2 }, -- front to back
--[[t]] {-7/16, -1/2 , -5/16, 7/16, -7/16, 5/16},
--[[t]] {-5/16, -1/2 , -7/16, 5/16, -7/16, 7/16},
--[[m]] {-6/16, -1/2 , -6/16, 6/16, -7/16, 6/16}, -- mid
},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 2/16, 1/2},
},
tiles = { "molehills_dirt.png" },
paramtype = "light",
selection_box = mh_cbox,
collision_box = mh_cbox,
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults(),
sounds = default.node_sound_dirt_defaults(),
})
-----------------------------------------------------------------------------------------------

View File

@ -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

View File

@ -1,41 +0,0 @@
-- Redefine grass and dirt nodes
minetest.override_item("default:dirt", {
drop = {
max_items = 2,
items = {
{
items = {"mushroom:spore1"},
rarity = 40,
},
{
items = {"mushroom:spore2"},
rarity = 40,
},
{
items = {"default:dirt"},
}
}
}
})
minetest.override_item("default:dirt_with_grass", {
drop = {
max_items = 2,
items = {
{
items = {"mushroom:spore1"},
rarity = 40,
},
{
items = {"mushroom:spore2"},
rarity = 40,
},
{
items = {"default:dirt"},
}
}
}
})

View File

@ -1,95 +0,0 @@
-- craft items
minetest.register_craftitem("mushroom:spore1",{
description = "Unidentified Mushroom Spore",
inventory_image = "mushroom_spore.png",
wield_image = "mushroom_spore.png",
stack_max = 100,
})
minetest.register_craftitem("mushroom:spore2",{
description = "Unidentified Mushroom Spore",
inventory_image = "mushroom_spore.png",
wield_image = "mushroom_spore.png",
stack_max = 100,
})
minetest.register_craftitem("mushroom:identifier",{
description = "Mushroom Spore Identifier/Spore Extractor",
inventory_image = "mushroom_identifier.png",
wield_image = "mushroom_identifier.png",
})
minetest.register_craftitem("mushroom:brown_essence",{
description = "Healthy Brown Mushroom Essence",
inventory_image = "mushroom_essence.png",
wield_image = "mushroom_essence.png",
on_use = minetest.item_eat(5), --notre modif de gain de faim
groups = {vessel=1}, -- Modif MFF (needed for vessels furniture)
})
minetest.register_craftitem("mushroom:poison",{
description = "Red Mushroom Poison",
inventory_image = "mushroom_poison.png",
wield_image = "mushroom_poison.png",
on_use = minetest.item_eat(-10),
groups = {vessel=1}, -- Modif MFF (needed for vessels furniture)
})
-- recipes
minetest.register_craft( {
output = "mushroom:identifier",
recipe = {
{ "", "default:torch", "" },
{ "default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot" },
}
})
minetest.register_craft( {
type = "shapeless",
output = "mushroom:brown_essence",
recipe = { "mushroom:brown" , "vessels:glass_bottle" },
})
minetest.register_craft( {
type = "shapeless",
output = "mushroom:poison",
recipe = { "mushroom:red" , "vessels:glass_bottle" },
})
minetest.register_craft( {
type = "shapeless",
output = "mushroom:spore_brown",
recipe = { "mushroom:identifier" , "mushroom:spore1" },
replacements = {
{ 'mushroom:identifier', 'mushroom:identifier' }
}
})
minetest.register_craft( {
type = "shapeless",
output = "mushroom:spore_red",
recipe = { "mushroom:identifier" , "mushroom:spore2" },
replacements = {
{ 'mushroom:identifier', 'mushroom:identifier' }
}
})
minetest.register_craft( {
type = "shapeless",
output = "mushroom:spore_red 2",
recipe = { "mushroom:identifier" , "mushroom:red" },
replacements = {
{ 'mushroom:identifier', 'mushroom:identifier' }
}
})
minetest.register_craft( {
type = "shapeless",
output = "mushroom:spore_brown 2",
recipe = { "mushroom:identifier" , "mushroom:brown" },
replacements = {
{ 'mushroom:identifier', 'mushroom:identifier' }
}
})

View File

@ -1,3 +0,0 @@
default
vessels?
woodsoils?

View File

@ -1,261 +0,0 @@
-- Mushroom mod by DanDuncombe and VanessaE
--
-- License: CC-By-SA for texures derived from Minetest defaults,
-- WTFPL for all code and everything else.
mushroom = {}
minetest.register_node("mushroom:brown",{
description = "Brown Mushroom",
drawtype = "mesh",
mesh = "plantlife_mushroom.obj",
tiles = {"mushroom_brown_3d.png"},
sunlight_propagates = true,
inventory_image = "mushroom_brown_inv.png",
groups = {oddly_breakable_by_hand=3,attached_node=1},
paramtype = "light",
walkable = false,
on_use = minetest.item_eat(5), -- Modif MFF
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
drop = "mushroom:brown",
})
minetest.register_node("mushroom:red",{
description = "Red Mushroom",
drawtype = "mesh",
mesh = "plantlife_mushroom.obj",
tiles = {"mushroom_red_3d.png"},
sunlight_propagates = true,
inventory_image = "mushroom_red_inv.png",
groups = {oddly_breakable_by_hand=3,attached_node=1},
paramtype = "light",
walkable = false,
on_use = minetest.item_eat(-5), -- Modif MFF
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
drop = "mushroom:red",
})
minetest.register_node("mushroom:spore_brown",{
description = "Brown Mushroom Spore",
drawtype = "raillike",
paramtype = "light",
tiles = {"mushroom_spore_brown.png"},
sunlight_propagates = true,
walkable = false,
groups = {oddly_breakable_by_hand=3,attached_node=1},
inventory_image = "mushroom_spore_brown.png",
wield_image = "mushroom_spore_brown.png",
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
},
})
minetest.register_node("mushroom:spore_red",{
description = "Red Mushroom Spore",
drawtype = "raillike",
paramtype = "light",
tiles = {"mushroom_spore_red.png"},
sunlight_propagates = true,
walkable = false,
groups = {oddly_breakable_by_hand=3,attached_node=1},
inventory_image = "mushroom_spore_red.png",
wield_image = "mushroom_spore_red.png",
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
},
})
--Natural Mushrooms
minetest.register_node("mushroom:brown_natural",{
description = "Brown Mushroom (Naturally Spawned)",
drawtype = "mesh",
mesh = "plantlife_mushroom.obj",
tiles = {"mushroom_brown_3d.png"},
sunlight_propagates = true,
inventory_image = "mushroom_brown_inv.png",
groups = {oddly_breakable_by_hand=3, not_in_creative_inventory=1},
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
drop = "mushroom:brown",
})
minetest.register_node("mushroom:red_natural",{
description = "Red Mushroom (Naturally Spawned)",
drawtype = "mesh",
mesh = "plantlife_mushroom.obj",
tiles = {"mushroom_red_3d.png"},
sunlight_propagates = true,
inventory_image = "mushroom_red_inv.png",
groups = {oddly_breakable_by_hand=3, not_in_creative_inventory=1},
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
},
drop = "mushroom:red",
})
-- Spore Growing ABMs
minetest.register_abm({
nodenames = {"mushroom:spore_brown"},
neighbors = {"air"},
interval = 360, -- Modif MFF
chance = 12, -- Modif MFF
action = function(pos, node)
local soil = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
if (soil.name == "farming:soil_wet" or string.find(soil.name, "homedecor:flower_pot_"))
and minetest.get_node_light(pos, nil) < 8 then
minetest.set_node({x=pos.x,y=pos.y,z=pos.z}, {name="mushroom:brown"})
end
end
})
minetest.register_abm({
nodenames = {"mushroom:spore_red"},
neighbors = {"air"},
interval = 360, -- Modif MFF
chance = 12, -- Modif MFF
action = function(pos, node)
local soil = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
if (soil.name == "farming:soil_wet" or string.find(soil.name, "homedecor:flower_pot_"))
and minetest.get_node_light(pos, nil) < 8 then
minetest.set_node({x=pos.x,y=pos.y,z=pos.z}, {name="mushroom:red"})
end
end
})
-- list of trees that mushrooms can grow next to
local trees_list = {
"default:tree",
"default:jungletree",
"moretrees:apple_tree_trunk",
"moretrees:beech_trunk",
"moretrees:birch_trunk",
"moretrees:fir_trunk",
"moretrees:oak_trunk",
"moretrees:pine_trunk",
"moretrees:rubber_tree_trunk",
"moretrees:rubber_tree_trunk_empty",
"moretrees:sequoia_trunk",
"moretrees:spruce_trunk",
"moretrees:willow_trunk",
}
-- Natural Spawning ABM
minetest.register_abm({
nodenames = {
"default:dirt_with_grass",
"default:dirt",
"woodsoils:dirt_with_leaves_1",
"woodsoils:dirt_with_leaves_2",
"woodsoils:grass_with_leaves_1",
"woodsoils:grass_with_leaves_2",
"farming:soil_wet"
},
neighbors = {"air"},
interval = 900, -- Modif MFF
chance = 300, -- Modif MFF
action = function(pos, node)
local top_pos = {x=pos.x, y=pos.y+1, z=pos.z}
if minetest.get_node(top_pos).name == "air" and minetest.get_node_light(top_pos, nil) < 8
and minetest.find_node_near(pos, 1, trees_list)
and minetest.find_node_near(pos, 3, "default:water_source") then
if math.random(0, 1) == 0 then
minetest.set_node(top_pos, {name="mushroom:brown_natural"})
else
minetest.set_node(top_pos, {name="mushroom:red_natural"})
end
end
end
})
minetest.register_abm({
nodenames = {"default:stone"},
neighbors = {"air"},
interval = 900, -- Modif MFF
chance = 300, -- Modif MFF
action = function(pos, node)
local top_pos = {x=pos.x, y=pos.y+1, z=pos.z}
if minetest.get_node(top_pos).name == "air" and minetest.get_node_light(top_pos, nil) < 8
and minetest.find_node_near(pos, 1, {"default:water_source"}) then
if math.random(0,1) == 0 then
minetest.set_node(top_pos, {name="mushroom:brown_natural"})
else
minetest.set_node(top_pos, {name="mushroom:red_natural"})
end
end
end
})
-- Spreading ABM
minetest.register_abm({
nodenames = {
"mushroom:brown_natural",
"mushroom:red_natural"
},
neighbors = {"air"},
interval = 120,
chance = 100,
action = function(pos, node)
local soil_pos = {x=pos.x, y=pos.y-1, z=pos.z}
local soil = minetest.get_node(soil_pos)
local woodsoil_str = "woodsoils:.+_with_leaves_?"
if minetest.get_node_light(pos, nil) < 8
and minetest.find_node_near(pos, 1, trees_list) then
local spread_x = math.random(-1, 1)
local spread_z = math.random(-1, 1)
local newpos = {x=pos.x+spread_x, y=pos.y, z=pos.z+spread_z}
local newsoil = minetest.get_node({x=newpos.x, y=newpos.y-1, z=newpos.z})
if minetest.get_node(newpos).name == "air"
and (newsoil.name == "default:dirt_with_grass"
or newsoil.name == "default:dirt"
or string.match(newsoil.name, woodsoil_str))
and minetest.find_node_near(newpos, 3, "default:water_source") then
minetest.set_node(newpos, {name=node.name})
end
end
end
})
-- Dying ABM
minetest.register_abm({
nodenames = {
"mushroom:brown",
"mushroom:red",
},
neighbors = {"air"},
interval = 120,
chance = 50,
action = function(pos, node)
local soil = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
if soil.name ~= "farming:soil_wet"
and not string.find(soil.name, "homedecor:flower_pot_") then
minetest.remove_node(pos)
end
end
})
dofile(minetest.get_modpath("mushroom").."/crafting.lua")
dofile(minetest.get_modpath("mushroom").."/compat.lua")
minetest.log("action", "[Mushrooms] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 B

View File

@ -202,6 +202,7 @@ local TRuNKS = {
-- MoD TRuNK NR
{"default", "tree", 1},
{"default", "jungletree", 2},
{"default", "pine_tree", 12},
{"trees", "tree_conifer", 3},
{"trees", "tree_mangrove", 4},
@ -213,7 +214,6 @@ local TRuNKS = {
{"moretrees", "fir_trunk", 9},
{"moretrees", "oak_trunk", 10},
{"moretrees", "palm_trunk", 11},
{"moretrees", "pine_trunk", 12},
{"moretrees", "rubber_tree_trunk", 13},
{"moretrees", "rubber_tree_trunk_empty", 14},
{"moretrees", "sequoia_trunk", 15},
@ -462,6 +462,7 @@ biome_lib:register_generate_plant({
surface = {
"default:tree",
"default:jungletree",
"default:pine_tree",
"trees:tree_conifer",
"trees:tree_mangrove",
--"trees:tree_palm",
@ -471,7 +472,6 @@ biome_lib:register_generate_plant({
"moretrees:fir_trunk",
"moretrees:oak_trunk",
--"moretrees:palm_trunk",
"moretrees:pine_trunk",
"moretrees:rubber_tree_trunk",
"moretrees:rubber_tree_trunk_empty",
"moretrees:sequoia_trunk",

View File

@ -303,7 +303,7 @@ local TRuNKS = {
-- MoD TRuNK
{"default", "tree" },
{"default", "jungletree" },
{"default", "pinetree" },
{"default", "pine_tree" },
{"trees", "tree_conifer" },
{"trees", "tree_mangrove" },