added banana bunch

master
tenplus1 2020-08-11 12:14:52 +01:00
parent 8115f66ab7
commit 95ed74aa58
3 changed files with 48 additions and 1 deletions

View File

@ -29,6 +29,47 @@ minetest.register_node("ethereal:banana", {
end,
})
-- Banana Bunch
minetest.register_node("ethereal:banana_bunch", {
description = S("Banana Bunch"),
drawtype = "torchlike",
tiles = {"banana_bunch.png"},
inventory_image = "banana_bunch.png",
wield_image = "banana_bunch.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
},
groups = {
fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 1, leafdecay_drop = 1
},
drop = "ethereal:banana_bunch",
on_use = minetest.item_eat(6),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:banana_bunch", param2 = 1})
end
end,
})
-- Bunch to Single
minetest.register_craft({
type = "shapeless",
output = "ethereal:banana 3",
recipe = {"ethereal:banana_bunch"}
})
minetest.register_craft({
type = "shapeless",
output = "ethereal:banana_bunch",
recipe = {"ethereal:banana", "ethereal:banana", "ethereal:banana"}
})
-- Banana Dough
minetest.register_craftitem("ethereal:banana_dough", {
description = S("Banana Dough"),

View File

@ -87,7 +87,13 @@ function ethereal.grow_big_tree(pos)
end
function ethereal.grow_banana_tree(pos)
add_tree(pos, 3, 0, 3, ethereal.bananatree)
if math.random(3) == 1
and minetest.find_node_near(pos, 1, {"farming:soil_wet"}) then
add_tree(pos, 3, 0, 3, ethereal.bananatree,
{{"ethereal:banana", "ethereal:banana_bunch"}})
else
add_tree(pos, 3, 0, 3, ethereal.bananatree)
end
end
function ethereal.grow_frost_tree(pos)

BIN
textures/banana_bunch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B