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
if minetest.registered_nodes[nn].walkable then
if self.physical_state then
self.object:setvelocity({x=0,y=0,z=0})
self.object:setacceleration({x=0, y=0, z=0})
self.physical_state = false
self.object:set_properties({
physical = false
})
end
else
This is in builtin/item_entity.lua
I suppose everything in this if clause is executed if an item is on the ground. What do you want to do?
If you want to make the item kinda "fly" to you when walking next to it, I already tried it. I can give you some advice.