SHOW:
|
|
- or go back to the newest paste.
| 1 | - | minetest.register_node("modtest:musicblock", {
|
| 1 | + | minetest.register_node("modtest:musicblock", {
|
| 2 | - | tiles = {"modtest_explosive.png"},
|
| 2 | + | tiles = {"modtest_explosive.png"},
|
| 3 | - | groups = { crumbly=3, flammable=3, explody=3}
|
| 3 | + | groups = { crumbly=3, flammable=3, explody=3},
|
| 4 | - | }) |
| 4 | + | |
| 5 | - | if right_click(modtest:musicblock)&& is_player(true) then |
| 5 | + | on_rightclick = function(pos, node, clicker, itemstack) |
| 6 | - | string abc = get_player_name() |
| 6 | + | minetest.sound_player("modtest_song_1", {to_player=clicker:get_player_name()})
|
| 7 | - | minetest.sound_play("modtest_song_1", to_player = abc)
|
| 7 | + | end, |
| 8 | - | end |
| 8 | + | }) |