Page 1 of 1

[Patch] Node dropping on the terrain [0.4.3]

PostPosted: Fri Nov 30, 2012 20:11
by LorenzoVulcan
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:

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!

PostPosted: Fri Nov 30, 2012 20:42
by PilzAdam

PostPosted: Fri Nov 30, 2012 21:07
by LorenzoVulcan

I made the original patch before that.

PostPosted: Fri Nov 30, 2012 21:08
by PilzAdam
LorenzoVulcan wrote:

I made the original patch before that.

This is not a competition :-P

PostPosted: Fri Nov 30, 2012 21:10
by LorenzoVulcan
PilzAdam wrote:
LorenzoVulcan wrote:

I made the original patch before that.

This is not a competition :-P

I know,but why you linked your thread?

PostPosted: Fri Nov 30, 2012 21:23
by PilzAdam
LorenzoVulcan wrote:
PilzAdam wrote:
LorenzoVulcan wrote:I made the original patch before that.

This is not a competition :-P

I know,but why you linked your thread?

Maybe some users want picking up of items too.

PostPosted: Sat Dec 01, 2012 12:15
by LorenzoVulcan
Added stand-alone version.

PostPosted: Sat Dec 01, 2012 20:26
by jordan4ibanez
I WROTE THE ORIGUNUL VERSION, just kidding, what exactly does this do?