2018-11-02 23:54:43 -04:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
2018-12-30 17:36:47 -05:00
|
|
|
local minetest, nodecore
|
|
|
|
= minetest, nodecore
|
2018-11-02 23:54:43 -04:00
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
|
|
|
local modname = minetest.get_current_modname()
|
|
|
|
|
|
|
|
minetest.register_node(modname .. ":stick", {
|
|
|
|
description = "Stick",
|
|
|
|
drawtype = "nodebox",
|
2018-11-03 11:26:15 -04:00
|
|
|
node_box = nodecore.fixedbox(-1/16, -0.5, -1/16, 1/16, 0, 1/16),
|
2018-11-02 23:54:43 -04:00
|
|
|
tiles = {
|
|
|
|
modname .. "_tree_top.png",
|
|
|
|
modname .. "_tree_top.png",
|
|
|
|
modname .. "_tree_side.png"
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
groups = {
|
2018-11-05 00:21:02 -05:00
|
|
|
shafty = 1,
|
2018-11-02 23:54:43 -04:00
|
|
|
snappy = 2,
|
|
|
|
falling_repose = 1
|
2018-12-30 17:36:47 -05:00
|
|
|
}
|
2018-11-02 23:54:43 -04:00
|
|
|
})
|
|
|
|
|
2018-11-03 11:26:15 -04:00
|
|
|
nodecore.register_leaf_drops(function(pos, node, list)
|
|
|
|
list[#list + 1] = {
|
|
|
|
name = modname .. ":stick",
|
|
|
|
prob = 0.2 * (node.param2 * node.param2)}
|
|
|
|
end)
|