1
0
Fork 0
MineClone2/mods/ITEMS/mcl_bells/init.lua

35 lines
827 B
Lua
Raw Normal View History

2022-05-20 13:33:18 +02:00
local S = minetest.get_translator(minetest.get_current_modname())
mcl_bells = {}
local has_mcl_wip = minetest.get_modpath("mcl_wip")
2022-05-20 13:44:17 +02:00
function mcl_bells.ring_once(pos)
minetest.sound_play( "mcl_bells_bell_stroke", { pos = pos, gain = 1.5, max_hear_distance = 300,});
end
2022-05-20 13:33:18 +02:00
minetest.register_node("mcl_bells:bell", {
description = S("Bell"),
inventory_image = "bell.png",
drawtype = "plantlike",
tiles = {"bell.png"},
stack_max = 64,
selection_box = {
type = "fixed",
fixed = {
-4/16, -6/16, -4/16,
4/16, 7/16, 4/16,
},
},
2022-05-20 13:36:41 +02:00
is_ground_content = false,
groups = {pickaxey=2, deco_block=1 },
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
2022-05-20 13:44:17 +02:00
on_rightclick = mcl_bells.ring_once,
2022-05-20 13:33:18 +02:00
})
if has_mcl_wip then
mcl_wip.register_wip_item("mcl_bells:bell")
end