We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d356f90 commit 0d86f2cCopy full SHA for 0d86f2c
mesecons_noteblock/init.lua
@@ -3,7 +3,11 @@ minetest.register_node("mesecons_noteblock:noteblock", {
3
tiles = {"mesecons_noteblock.png"},
4
is_ground_content = false,
5
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},
6
- on_punch = function(pos, node) -- change sound when punched
+ on_punch = function(pos, node, puncher) -- change sound when punched
7
+ if minetest.is_protected(pos, puncher and puncher:get_player_name()) then
8
+ return
9
+ end
10
+
11
node.param2 = (node.param2+1)%12
12
mesecon.noteblock_play(pos, node.param2)
13
minetest.set_node(pos, node)
0 commit comments