aboutsummaryrefslogtreecommitdiff
path: root/builtin/item_entity.lua
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-06-01 13:18:52 +0200
committerWeblate <42@minetest.ru>2013-06-01 13:18:52 +0200
commit1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124 (patch)
tree54660f353f3342f89b6259ea6a5dfedfa20dc16f /builtin/item_entity.lua
parentec039a3d123120f9918812b13f5971e94546b9af (diff)
parent64627817fcca52f20948c24b60ce192b218f6ce2 (diff)
downloadminetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.tar.gz
minetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.tar.bz2
minetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'builtin/item_entity.lua')
-rw-r--r--builtin/item_entity.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/item_entity.lua b/builtin/item_entity.lua
index 50ce7eafe..c682db2fa 100644
--- a/builtin/item_entity.lua
+++ b/builtin/item_entity.lua
@@ -3,7 +3,7 @@
function minetest.spawn_item(pos, item)
-- Take item in any format
local stack = ItemStack(item)
- local obj = minetest.env:add_entity(pos, "__builtin:item")
+ local obj = minetest.add_entity(pos, "__builtin:item")
obj:get_luaentity():set_item(stack:to_string())
return obj
end
@@ -83,7 +83,7 @@ minetest.register_entity("__builtin:item", {
on_step = function(self, dtime)
local p = self.object:getpos()
p.y = p.y - 0.3
- local nn = minetest.env:get_node(p).name
+ local nn = minetest.get_node(p).name
-- If node is not registered or node is walkably solid and resting on nodebox
local v = self.object:getvelocity()
if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable and v.y == 0 then