Page 1 of 1

how do u make a chest suck in items

PostPosted: Fri Apr 05, 2013 01:39
by dj22
this is all I have for code




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
on_punch = function(pos,player)
function minetest.handle_node_drops(pos, node, 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

PostPosted: Fri Apr 05, 2013 01:41
by dj22
could anyone help

PostPosted: Fri Apr 05, 2013 11:18
by PilzAdam
This code is just completly wrong, why do you override handle_node_drops() there?
Can you please write what do you want to achieve so anyone else can try to help you?

PostPosted: Sat Apr 06, 2013 07:28
by prestidigitator
Might go better in the Modding General forum, too. Probably more people to help figure it out there.