minetest_x_bows/nodes.lua

39 lines
1.0 KiB
Lua
Raw Normal View History

2021-03-13 20:39:42 -06:00
minetest.register_node('x_bows:arrow_node', {
2022-10-16 15:02:04 -05:00
drawtype = 'mesh',
mesh = 'x_bows_arrow.obj',
tiles = {'x_bows_arrow_mesh.png'},
groups = {not_in_creative_inventory=1},
sunlight_propagates = true,
paramtype = 'light',
collision_box = {0, 0, 0, 0, 0, 0},
selection_box = {0, 0, 0, 0, 0, 0}
2021-03-13 20:39:42 -06:00
})
minetest.register_node('x_bows:target', {
2022-10-16 15:02:04 -05:00
description = 'Straw',
tiles = {'x_bows_target.png'},
is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30},
sounds = default.node_sound_leaves_defaults(),
mesecons = {receptor = {state = 'off'}},
on_timer = function (pos, elapsed)
mesecon.receptor_off(pos)
return false
end,
2021-03-13 20:39:42 -06:00
})
minetest.register_craft({
2022-10-16 15:02:04 -05:00
type = 'fuel',
recipe = 'x_bows:target',
burntime = 3,
2021-03-13 20:39:42 -06:00
})
minetest.register_craft({
2022-10-16 15:02:04 -05:00
output = 'x_bows:target',
recipe = {
{'', 'default:mese_crystal', ''},
{'default:mese_crystal', 'farming:straw', 'default:mese_crystal'},
{'', 'default:mese_crystal', ''},
}
2021-03-13 20:39:42 -06:00
})