changed acacia sapling drop
This commit is contained in:
parent
8aaceaf164
commit
efd4ab247c
@ -21,7 +21,7 @@ minetest.register_node("ethereal:acacia_leaves", {
|
|||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
{ items = {"ethereal:acacia_sapling"}, rarity = 50},
|
{ items = {"ethereal:acacia_sapling"}, rarity = 20},
|
||||||
{ items = {"ethereal:acacia_leaves"}}
|
{ items = {"ethereal:acacia_leaves"}}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
ethereal.register_sapling = function( sapling_node_name, sapling_descr, sapling_texture )
|
ethereal.register_sapling = function( sapling_node_name, sapling_descr, sapling_texture )
|
||||||
|
|
||||||
-- if the sapling does not exist yet, create a node for it
|
-- if the sapling does not exist yet, create a node for it
|
||||||
if( not( minetest.registered_nodes[ sapling_node_name ] )) then
|
if not minetest.registered_nodes[sapling_node_name] then
|
||||||
minetest.register_node( sapling_node_name, {
|
minetest.register_node( sapling_node_name, {
|
||||||
description = sapling_descr,
|
description = sapling_descr,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -43,7 +43,7 @@ ethereal.place_tree = function (pos, ofx, ofz, schem)
|
|||||||
minetest.set_node(pos, {name="air"})
|
minetest.set_node(pos, {name="air"})
|
||||||
pos.x = pos.x - ofx
|
pos.x = pos.x - ofx
|
||||||
pos.z = pos.z - ofz
|
pos.z = pos.z - ofz
|
||||||
minetest.place_schematic(pos, minetest.get_modpath("ethereal").."/schematics/"..schem..".mts", "0", {}, false );
|
minetest.place_schematic(pos, minetest.get_modpath("ethereal").."/schematics/"..schem..".mts", "0", {}, false )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Grow saplings
|
-- Grow saplings
|
||||||
@ -53,7 +53,7 @@ minetest.register_abm({
|
|||||||
chance = 25,
|
chance = 25,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
|
||||||
local under = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name;
|
local under = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
||||||
|
|
||||||
-- Check if Sapling is growing on correct substrate
|
-- Check if Sapling is growing on correct substrate
|
||||||
if (node.name == "ethereal:yellow_tree_sapling" and under == "default:dirt_with_snow") then
|
if (node.name == "ethereal:yellow_tree_sapling" and under == "default:dirt_with_snow") then
|
||||||
@ -84,8 +84,6 @@ minetest.register_abm({
|
|||||||
ethereal.place_tree(pos, 1, 1, "orangetree")
|
ethereal.place_tree(pos, 1, 1, "orangetree")
|
||||||
elseif (node.name == "ethereal:acacia_sapling" and under == "default:desert_sand") then
|
elseif (node.name == "ethereal:acacia_sapling" and under == "default:desert_sand") then
|
||||||
ethereal.place_tree(pos, 5, 5, "acaciatree")
|
ethereal.place_tree(pos, 5, 5, "acaciatree")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user