summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-30 23:20:05 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-30 23:20:05 -0400
commit2fa2867eb72593ae37d325352413e3f5c84f252d (patch)
treec28f088b2b3a45ca2525a77c9cc4a98d17a1680b
parente932a8478a12eb4fdddb76b5db3535854efd8293 (diff)
downloaddreambuilder_modpack-2fa2867eb72593ae37d325352413e3f5c84f252d.tar
dreambuilder_modpack-2fa2867eb72593ae37d325352413e3f5c84f252d.tar.gz
dreambuilder_modpack-2fa2867eb72593ae37d325352413e3f5c84f252d.tar.bz2
dreambuilder_modpack-2fa2867eb72593ae37d325352413e3f5c84f252d.tar.xz
dreambuilder_modpack-2fa2867eb72593ae37d325352413e3f5c84f252d.zip
update moretrees and plantlife (upstream vines mod updated, + bugfix)
-rw-r--r--moretrees/node_defs.lua30
-rw-r--r--vines/README.md2
-rw-r--r--vines/functions.lua15
-rw-r--r--vines/nodes.lua2
-rw-r--r--vines/recipes.lua6
-rw-r--r--vines/shear.lua4
-rw-r--r--vines/vines.lua3
7 files changed, 35 insertions, 27 deletions
diff --git a/moretrees/node_defs.lua b/moretrees/node_defs.lua
index 96a57fa..1a02a9a 100644
--- a/moretrees/node_defs.lua
+++ b/moretrees/node_defs.lua
@@ -337,7 +337,6 @@ minetest.override_item("moretrees:poplar_leaves", {
}
})
-
-- Extra nodes for jungle trees:
local jungleleaves = {"yellow","red"}
@@ -362,7 +361,7 @@ for color = 1, #jungleleaves do
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
is_ground_content = false,
- groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius },
+ groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = 3 },
drop = {
max_items = 1,
items = {
@@ -374,6 +373,18 @@ for color = 1, #jungleleaves do
})
end
+-- To get Moretrees to generate its own jungle trees among the default mapgen
+-- we need our own copy of that node, which moretrees will match against.
+
+local jungle_tree = table.copy(minetest.registered_nodes["default:jungletree"])
+minetest.register_node("moretrees:jungletree_trunk", jungle_tree)
+
+default.register_leafdecay({
+ trunks = { "default:jungletree", "moretrees:jungletree_trunk" },
+ leaves = { "default:jungleleaves", "moretrees:jungletree_leaves_yellow", "moretrees:jungletree_leaves_red" },
+ radius = moretrees.leafdecay_radius,
+})
+
-- Extra needles for firs
local moretrees_leaves_inventory_image = nil
@@ -391,7 +402,7 @@ minetest.register_node("moretrees:fir_leaves_bright", {
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
is_ground_content = false,
- groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius },
+ groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = 3 },
drop = {
max_items = 1,
items = {
@@ -402,6 +413,13 @@ minetest.register_node("moretrees:fir_leaves_bright", {
sounds = default.node_sound_leaves_defaults()
})
+default.register_leafdecay({
+ trunks = { "moretrees:fir_trunk" },
+ leaves = { "moretrees:fir_leaves", "moretrees:fir_leaves_bright" },
+ radius = moretrees.leafdecay_radius,
+})
+
+
if moretrees.enable_redefine_apple then
local appledef = moretrees.clone_node("default:apple")
appledef.groups.attached_node = 1
@@ -449,12 +467,6 @@ minetest.register_abm({
end,
})
--- To get Moretrees to generate its own jungle trees among the default mapgen
--- we need our own copy of that node, which moretrees will match against.
-
-local jungle_tree = moretrees.clone_node("default:jungletree")
-minetest.register_node("moretrees:jungletree_trunk", jungle_tree)
-
-- For compatibility with old nodes, recently-changed nodes, and default nodes
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
diff --git a/vines/README.md b/vines/README.md
index 386dcae..89fdb27 100644
--- a/vines/README.md
+++ b/vines/README.md
@@ -47,7 +47,7 @@ table.
|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)
+For biome definitions please see the [plants_lib API documentation](https://github.com/VanessaE/plantlife_modpack/blob/master/API.txt)
## Notice
Vines use after_destruct on registered leave nodes to remove vines from which
diff --git a/vines/functions.lua b/vines/functions.lua
index 26e7cc4..a2f1566 100644
--- a/vines/functions.lua
+++ b/vines/functions.lua
@@ -1,5 +1,4 @@
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'
@@ -61,7 +60,6 @@ vines.register_vine = function( name, defs, biome )
end
})
-
minetest.register_node( vine_name_middle, {
description = "Matured "..defs.description,
walkable = false,
@@ -79,12 +77,9 @@ vines.register_vine = function( name, defs, biome )
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") > 0 then
- -- Calling `remove_node` directly would cause
- -- a stack overflow for really long vines.
minetest.after( 0, minetest.remove_node, bottom )
end
end,
@@ -95,12 +90,12 @@ vines.register_vine = function( name, defs, biome )
biome_lib:spawn_on_surfaces( biome )
- local override_nodes = function( nodes, defs )
- local function override( index, registered )
+ local override_nodes = function( nodes, def )
+ 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 )
+ minetest.override_item( node, def )
registered[#registered+1] = node
end
override( index+1, registered )
@@ -109,7 +104,7 @@ vines.register_vine = function( name, defs, biome )
end
override_nodes( biome.spawn_surfaces,{
- after_destruct = function( pos )
+ on_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" )
@@ -125,7 +120,7 @@ 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
+ if 'vines:shears' == wielded:get_name() then
local inv = user:get_inventory()
if inv then
inv:add_item("main", ItemStack( node_name ))
diff --git a/vines/nodes.lua b/vines/nodes.lua
index 9d7df00..6a1ee22 100644
--- a/vines/nodes.lua
+++ b/vines/nodes.lua
@@ -58,7 +58,7 @@ minetest.register_node("vines:rope_end", {
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}
+ local yesh = {x = pos.x, y= pos.y-1, z=pos.z}
minetest.add_node(yesh, {name="vines:rope"})
end,
selection_box = {
diff --git a/vines/recipes.lua b/vines/recipes.lua
index d2b928a..d64dcea 100644
--- a/vines/recipes.lua
+++ b/vines/recipes.lua
@@ -1,12 +1,12 @@
vines.recipes['rope_block'] = {
- {'', 'default:wood', ''},
+ {'', 'group:wood', ''},
{'', 'group:vines', ''},
{'', 'group:vines', ''}
}
vines.recipes['shears'] = {
{'', 'default:steel_ingot', ''},
- {'default:stick', 'default:wood', 'default:steel_ingot'},
- {'', '', 'default:stick'}
+ {'group:stick', 'group:wood', 'default:steel_ingot'},
+ {'', '', 'group:stick'}
}
diff --git a/vines/shear.lua b/vines/shear.lua
index e6d915a..b42a3e7 100644
--- a/vines/shear.lua
+++ b/vines/shear.lua
@@ -8,8 +8,8 @@ minetest.register_tool("vines:shears", {
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}
+ snappy={times={[3]=0.2}, uses=60, maxlevel=3},
+ wool={times={[3]=0.2}, uses=60, maxlevel=3}
}
},
})
diff --git a/vines/vines.lua b/vines/vines.lua
index 82c5b2a..42c20d8 100644
--- a/vines/vines.lua
+++ b/vines/vines.lua
@@ -26,6 +26,7 @@ vines.register_vine( 'vine', {
spawn_delay = 500,
spawn_chance = 100,
spawn_surfaces = {
+ "default:leaves",
"default:jungleleaves",
"moretrees:jungletree_leaves_red",
"moretrees:jungletree_leaves_yellow",
@@ -42,11 +43,11 @@ vines.register_vine( 'side', {
},{
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:leaves",
"default:jungleleaves",
"moretrees:jungletree_leaves_red",
"moretrees:jungletree_leaves_yellow",