diff options
| author | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-07-17 20:17:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-17 20:17:54 +0200 |
| commit | ade7a1cbcf7156ebddb12bd2ec2ea60818d72b19 (patch) | |
| tree | 93200b6fad15c936cb213dc824ed761088eeb1a0 /builtin/game/item.lua | |
| parent | a0635f602487944d25c03efecee61cecf3bdb5ab (diff) | |
| download | minetest-ade7a1cbcf7156ebddb12bd2ec2ea60818d72b19.tar.xz | |
Builtin: Replace deprecated function calls (#7561)
Diffstat (limited to 'builtin/game/item.lua')
| -rw-r--r-- | builtin/game/item.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua index 8fbe5b672..591531db0 100644 --- a/builtin/game/item.lua +++ b/builtin/game/item.lua @@ -33,7 +33,7 @@ function core.get_pointed_thing_position(pointed_thing, above) -- The position where a node would be dug return pointed_thing.under elseif pointed_thing.type == "object" then - return pointed_thing.ref and pointed_thing.ref:getpos() + return pointed_thing.ref and pointed_thing.ref:get_pos() end end @@ -331,7 +331,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2, -- Calculate the direction for furnaces and chests and stuff elseif (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") and not param2 then - local placer_pos = placer and placer:getpos() + local placer_pos = placer and placer:get_pos() if placer_pos then local dir = { x = above.x - placer_pos.x, @@ -478,7 +478,7 @@ function core.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed if inv and inv:room_for_item("main", {name=replace_with_item}) then inv:add_item("main", replace_with_item) else - local pos = user:getpos() + local pos = user:get_pos() pos.y = math.floor(pos.y + 0.5) core.add_item(pos, replace_with_item) end |
