[Patch] Node dropping on the terrain [0.4.3]
This is an updated version of the Minecraft-like Node drop: http://minetest.net/forum/viewtopic.php?id=1342
Stand-alone Mod version: http://hidemyass.com/files/MEBBR/
1.Open builtin>item.lua
2.Search out this:
Delete:
And write:
Final result:
Demo video (Deprecated build): http://www.youtube.com/watch?v=qwSybmvqINo&feature=youtu.be
Enjoy!
Stand-alone Mod version: http://hidemyass.com/files/MEBBR/
1.Open builtin>item.lua
2.Search out this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
function minetest.handle_node_drops(pos, drops, digger)
-- Add dropped items to object's inventory
if digger:get_inventory() then
local _, dropped_item
for _, dropped_item in ipairs(drops) do
digger:get_inventory():add_item("main", dropped_item)
end
end
end
Delete:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
digger:get_inventory():add_item("main", dropped_item)
And write:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.env:add_item(pos,dropped_item)
Final result:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
function minetest.handle_node_drops(pos, drops, digger)
-- Add dropped items to object's inventory
if digger:get_inventory() then
local _, dropped_item
for _, dropped_item in ipairs(drops) do
minetest.env:add_item(pos,dropped_item)
end
end
end
Demo video (Deprecated build): http://www.youtube.com/watch?v=qwSybmvqINo&feature=youtu.be
Enjoy!