mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 05:01:41 -04:00
Update init.lua
This commit is contained in:
parent
e032a74f6a
commit
c33736dbac
1 changed files with 1 additions and 13 deletions
|
@ -39,19 +39,7 @@ for i in ipairs (butter_list) do
|
|||
fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1},
|
||||
},
|
||||
floodable = true,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local player_name = placer:get_player_name()
|
||||
local pos = pointed_thing.above
|
||||
|
||||
if not minetest.is_protected(pos, player_name) and
|
||||
not minetest.is_protected(pointed_thing.under, player_name) and
|
||||
minetest.get_node(pos).name == "air" then
|
||||
minetest.set_node(pos, {name = "butterflies:butterfly_"..name})
|
||||
minetest.get_node_timer(pos):start(1)
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_place = minetest.item_place,
|
||||
on_timer = function(pos, elapsed)
|
||||
if minetest.get_node_light(pos) < 11 then
|
||||
minetest.set_node(pos, {name = "butterflies:hidden_butterfly_"..name})
|
||||
|
|
Loading…
Add table
Reference in a new issue