File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -243,16 +243,20 @@ minetest.register_node("flowers:waterlily", {
243
243
local def = minetest .registered_nodes [node ]
244
244
local player_name = placer :get_player_name ()
245
245
246
- if def and def .liquidtype == " source" and minetest .get_item_group (node , " water" ) > 0 then
246
+ if def and def .liquidtype == " source" and
247
+ minetest .get_item_group (node , " water" ) > 0 then
247
248
if not minetest .is_protected (pos , player_name ) then
248
- minetest .set_node (pos , {name = " flowers:waterlily" , param2 = math.random (0 , 3 )})
249
+ minetest .set_node (pos , {name = " flowers:waterlily" ,
250
+ param2 = math.random (0 , 3 )})
251
+ if not minetest .setting_getbool (" creative_mode" ) then
252
+ itemstack :take_item ()
253
+ end
249
254
else
250
- minetest .chat_send_player (player_name , " This area is protected" )
251
- end
252
- if not minetest .setting_getbool (" creative_mode" ) then
253
- itemstack :take_item ()
255
+ minetest .chat_send_player (player_name , " Node is protected" )
256
+ minetest .record_protection_violation (pos , player_name )
254
257
end
255
258
end
259
+
256
260
return itemstack
257
261
end
258
262
})
You can’t perform that action at this time.
0 commit comments