mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-30 13:50:23 +02:00
Fix set_node(air) calls
In the fireflies case it can be replaced with remove_node. In the beds case we fix the logic to do what it should. Coincidentally the end result was correct nonetheless.
This commit is contained in:
@ -104,7 +104,7 @@ minetest.register_tool("fireflies:bug_net", {
|
||||
local node_name = minetest.get_node(pointed_thing.under).name
|
||||
local inv = player:get_inventory()
|
||||
if minetest.get_item_group(node_name, "catchable") == 1 then
|
||||
minetest.set_node(pointed_thing.under, {name = "air"})
|
||||
minetest.remove_node(pointed_thing.under)
|
||||
local stack = ItemStack(node_name.." 1")
|
||||
local leftover = inv:add_item("main", stack)
|
||||
if leftover:get_count() > 0 then
|
||||
|
Reference in New Issue
Block a user