diff --git a/mods/CORE/walkover/init.lua b/mods/CORE/walkover/init.lua index 2d170cb600..1e2749ff50 100644 --- a/mods/CORE/walkover/init.lua +++ b/mods/CORE/walkover/init.lua @@ -4,7 +4,7 @@ minetest.register_globalstep(function(dtime) timer = timer + dtime; if timer >= 0.3 then for _,player in pairs(minetest.get_connected_players()) do - local pp = player:getpos() + local pp = player:get_pos() pp.y = math.ceil(pp.y) local loc = vector.add(pp, {x=0,y=-1,z=0}) if loc ~= nil then diff --git a/mods/ENTITIES/drippingwater/init.lua b/mods/ENTITIES/drippingwater/init.lua index 8e3ef4c181..5cd74cd503 100644 --- a/mods/ENTITIES/drippingwater/init.lua +++ b/mods/ENTITIES/drippingwater/init.lua @@ -25,7 +25,7 @@ minetest.register_entity("drippingwater:drop_water", { on_step = function(self, dtime) local k = math.random(1,222) - local ownpos = self.object:getpos() + local ownpos = self.object:get_pos() if k==1 then self.object:setacceleration({x=0, y=-5, z=0}) @@ -63,7 +63,7 @@ minetest.register_entity("drippingwater:drop_lava", { on_step = function(self, dtime) local k = math.random(1,222) - local ownpos = self.object:getpos() + local ownpos = self.object:get_pos() if k==1 then self.object:setacceleration({x=0, y=-5, z=0}) diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 01457c4bba..c347efb0a7 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -67,7 +67,7 @@ function boat.on_rightclick(self, clicker) clicker:set_properties({visual_size = {x=1, y=1}}) mcl_player.player_attached[name] = false mcl_player.player_set_animation(clicker, "stand" , 30) - local pos = clicker:getpos() + local pos = clicker:get_pos() pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} clicker:setpos(pos) elseif not self._driver then @@ -131,7 +131,7 @@ function boat.on_punch(self, puncher) self._removed = true -- Drop boat as item on the ground after punching if not minetest.settings:get_bool("creative_mode") then - minetest.add_item(self.object:getpos(), self._itemstring) + minetest.add_item(self.object:get_pos(), self._itemstring) end self.object:remove() end @@ -189,7 +189,7 @@ function boat.on_step(self, dtime) end local velo = self.object:getvelocity() if self._v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then - self.object:setpos(self.object:getpos()) + self.object:setpos(self.object:get_pos()) return end local s = get_sign(self._v) @@ -203,7 +203,7 @@ function boat.on_step(self, dtime) self._v = 5 * get_sign(self._v) end - local p = self.object:getpos() + local p = self.object:get_pos() p.y = p.y - boat_y_offset local new_velo local new_acce = {x = 0, y = 0, z = 0} @@ -217,7 +217,7 @@ function boat.on_step(self, dtime) end new_velo = get_velocity(self._v, self.object:getyaw(), self.object:getvelocity().y) - self.object:setpos(self.object:getpos()) + self.object:setpos(self.object:get_pos()) else p.y = p.y + 1 if is_water(p) then @@ -230,18 +230,18 @@ function boat.on_step(self, dtime) new_acce = {x = 0, y = 5, z = 0} end new_velo = get_velocity(self._v, self.object:getyaw(), y) - self.object:setpos(self.object:getpos()) + self.object:setpos(self.object:get_pos()) else new_acce = {x = 0, y = 0, z = 0} if math.abs(self.object:getvelocity().y) < 1 then - local pos = self.object:getpos() + local pos = self.object:get_pos() pos.y = math.floor(pos.y) + boat_y_offset self.object:setpos(pos) new_velo = get_velocity(self._v, self.object:getyaw(), 0) else new_velo = get_velocity(self._v, self.object:getyaw(), self.object:getvelocity().y) - self.object:setpos(self.object:getpos()) + self.object:setpos(self.object:get_pos()) end end end diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index fa587bf2f4..63bb07b602 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -55,7 +55,7 @@ end minetest.register_globalstep(function(dtime) for _,player in ipairs(minetest.get_connected_players()) do if player:get_hp() > 0 or not minetest.settings:get_bool("enable_damage") then - local pos = player:getpos() + local pos = player:get_pos() local inv = player:get_inventory() local checkpos = {x=pos.x,y=pos.y + item_drop_settings.player_collect_height,z=pos.z} @@ -67,7 +67,7 @@ minetest.register_globalstep(function(dtime) if object:get_luaentity()._magnet_timer >= 0 and object:get_luaentity()._magnet_timer < item_drop_settings.magnet_time and inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then -- Collection - if vector.distance(checkpos, object:getpos()) <= item_drop_settings.radius_collect and not object:get_luaentity()._removed then + if vector.distance(checkpos, object:get_pos()) <= item_drop_settings.radius_collect and not object:get_luaentity()._removed then -- Ignore if itemstring is not set yet if object:get_luaentity().itemstring ~= "" then inv:add_item("main", ItemStack(object:get_luaentity().itemstring)) @@ -95,7 +95,7 @@ minetest.register_globalstep(function(dtime) -- Move object to player disable_physics(object, object:get_luaentity()) - local opos = object:getpos() + local opos = object:get_pos() local vec = vector.subtract(checkpos, opos) vec = vector.add(opos, vector.divide(vec, 2)) object:moveto(vec) @@ -503,12 +503,12 @@ core.register_entity(":__builtin:item", { -- Delete corrupted item entities. The itemstring MUST be non-empty on its first step, -- otherwise there might have some data corruption. if self.itemstring == "" then - minetest.log("warning", "Item entity with empty itemstring found at "..minetest.pos_to_string(self.object:getpos()).. "! Deleting it now.") + minetest.log("warning", "Item entity with empty itemstring found at "..minetest.pos_to_string(self.object:get_pos()).. "! Deleting it now.") self._removed = true self.object:remove() end - local p = self.object:getpos() + local p = self.object:get_pos() local node = core.get_node_or_nil(p) local in_unloaded = (node == nil) @@ -530,7 +530,7 @@ core.register_entity(":__builtin:item", { if (def and def.groups and (def.groups.lava or def.groups.destroys_items == 1)) then -- Special effect for lava if def.groups.lava then - minetest.sound_play("builtin_item_lava", {pos = self.object:getpos(), gain = 0.5}) + minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}) end self._removed = true self.object:remove() diff --git a/mods/ENTITIES/mcl_minecarts/init.lua b/mods/ENTITIES/mcl_minecarts/init.lua index 8e9a088f73..e5afcedf68 100644 --- a/mods/ENTITIES/mcl_minecarts/init.lua +++ b/mods/ENTITIES/mcl_minecarts/init.lua @@ -41,7 +41,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) end function cart:on_punch(puncher, time_from_last_punch, tool_capabilities, direction) - local pos = self.object:getpos() + local pos = self.object:get_pos() if not self._railtype then local node = minetest.get_node(vector.floor(pos)).name self._railtype = minetest.get_item_group(node, "connect_to_raillike") @@ -83,7 +83,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) -- Drop items and remove cart entity if not minetest.settings:get_bool("creative_mode") then for d=1, #drop do - minetest.add_item(self.object:getpos(), drop[d]) + minetest.add_item(self.object:get_pos(), drop[d]) end end @@ -124,7 +124,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) local pos, rou_pos, node -- Drop minecart if it isn't on a rail anymore if self._last_float_check >= mcl_minecarts.check_float_time then - pos = self.object:getpos() + pos = self.object:get_pos() rou_pos = vector.round(pos) node = minetest.get_node(rou_pos) local g = minetest.get_item_group(node.name, "connect_to_raillike") @@ -145,7 +145,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) -- Drop items and remove cart entity if not minetest.settings:get_bool("creative_mode") then for d=1, #drop do - minetest.add_item(self.object:getpos(), drop[d]) + minetest.add_item(self.object:get_pos(), drop[d]) end end @@ -165,7 +165,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) local dir, last_switch = nil, nil if not pos then - pos = self.object:getpos() + pos = self.object:get_pos() end if self._old_pos and not self._punched then local flo_pos = vector.floor(pos) @@ -485,7 +485,7 @@ register_minecart( clicker:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0}) elseif not self._driver then self._driver = player_name - self._start_pos = self.object:getpos() + self._start_pos = self.object:get_pos() mcl_player.player_attached[player_name] = true clicker:set_attach(self.object, "", {x=0, y=8.25, z=-2}, {x=0, y=0, z=0}) mcl_player.player_attached[name] = true diff --git a/mods/ENTITIES/mcl_mobs/api.txt b/mods/ENTITIES/mcl_mobs/api.txt index 2c0db0ef25..9e30ca5cd7 100644 --- a/mods/ENTITIES/mcl_mobs/api.txt +++ b/mods/ENTITIES/mcl_mobs/api.txt @@ -710,7 +710,7 @@ mobs:register_mob("mob_horse:horse", { if inv:room_for_item("main", "mobs:saddle") then inv:add_item("main", "mobs:saddle") else - minetest.add_item(clicker.getpos(), "mobs:saddle") + minetest.add_item(clicker.get_pos(), "mobs:saddle") end -- attach player to horse diff --git a/mods/ENTITIES/mobs_mc/2_throwing.lua b/mods/ENTITIES/mobs_mc/2_throwing.lua index 0959580327..810c63f22a 100644 --- a/mods/ENTITIES/mobs_mc/2_throwing.lua +++ b/mods/ENTITIES/mobs_mc/2_throwing.lua @@ -52,7 +52,7 @@ local THROWING_ARROW_ENTITY={ --ARROW CODE THROWING_ARROW_ENTITY.on_step = function(self, dtime) self.timer=self.timer+dtime - local pos = self.object:getpos() + local pos = self.object:get_pos() local node = minetest.get_node(pos) minetest.add_particle({ @@ -113,7 +113,7 @@ local throwing_shoot_arrow = function(itemstack, player) if not minetest.settings:get_bool("creative_mode") then player:get_inventory():remove_item("main", arrow[1]) end - local playerpos = player:getpos() + local playerpos = player:get_pos() local obj = minetest.add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, arrow[2]) --mc local dir = player:get_look_dir() obj:setvelocity({x=dir.x*22, y=dir.y*22, z=dir.z*22}) @@ -247,7 +247,7 @@ if c("egg") then -- shoot egg local mobs_shoot_egg = function (item, player, pointed_thing) - local playerpos = player:getpos() + local playerpos = player:get_pos() minetest.sound_play("default_place_node_hard", { pos = playerpos, @@ -337,7 +337,7 @@ if c("snowball") then -- shoot snowball local mobs_shoot_snowball = function (item, player, pointed_thing) - local playerpos = player:getpos() + local playerpos = player:get_pos() local obj = minetest.add_entity({ x = playerpos.x, diff --git a/mods/ENTITIES/mobs_mc/3_shared.lua b/mods/ENTITIES/mobs_mc/3_shared.lua index 84a43dfe03..4110335988 100644 --- a/mods/ENTITIES/mobs_mc/3_shared.lua +++ b/mods/ENTITIES/mobs_mc/3_shared.lua @@ -32,13 +32,13 @@ mobs_mc.make_owner_teleport_function = function(dist, teleport_check_interval) self._teleport_timer = self._teleport_timer - dtime if self._teleport_timer <= 0 then self._teleport_timer = teleport_check_interval - local mob_pos = self.object:getpos() + local mob_pos = self.object:get_pos() local owner = minetest.get_player_by_name(self.owner) if not owner then -- No owner found, no teleportation return end - local owner_pos = owner:getpos() + local owner_pos = owner:get_pos() local dist_from_owner = vector.distance(owner_pos, mob_pos) if dist_from_owner > dist then -- Check for nodes below air in a 5×1×5 area around the owner position diff --git a/mods/ENTITIES/mobs_mc/chicken.lua b/mods/ENTITIES/mobs_mc/chicken.lua index a29311b62a..0c3d0510fb 100644 --- a/mods/ENTITIES/mobs_mc/chicken.lua +++ b/mods/ENTITIES/mobs_mc/chicken.lua @@ -80,7 +80,7 @@ mobs:register_mob("mobs_mc:chicken", { return end - local pos = self.object:getpos() + local pos = self.object:get_pos() minetest.add_item(pos, mobs_mc.items.egg) diff --git a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua index 6dbae97ea2..bf1f9c1d6f 100644 --- a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua +++ b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua @@ -61,7 +61,7 @@ local cow_def = { if inv:room_for_item("main", {name=mobs_mc.items.milk}) then clicker:get_inventory():add_item("main", mobs_mc.items.milk) else - local pos = self.object:getpos() + local pos = self.object:get_pos() pos.y = pos.y + 0.5 minetest.add_item(pos, {name = mobs_mc.items.milk}) end @@ -91,7 +91,7 @@ mooshroom_def.on_rightclick = function(self, clicker) local item = clicker:get_wielded_item() -- Use shears to get mushrooms and turn mooshroom into cow if item:get_name() == mobs_mc.items.shears then - local pos = self.object:getpos() + local pos = self.object:get_pos() minetest.sound_play("shears", {pos = pos}) minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_red .. " 5") @@ -112,7 +112,7 @@ mooshroom_def.on_rightclick = function(self, clicker) if inv:room_for_item("main", {name=mobs_mc.items.milk}) then clicker:get_inventory():add_item("main", mobs_mc.items.milk) else - local pos = self.object:getpos() + local pos = self.object:get_pos() pos.y = pos.y + 0.5 minetest.add_item(pos, {name = mobs_mc.items.milk}) end @@ -124,7 +124,7 @@ mooshroom_def.on_rightclick = function(self, clicker) if inv:room_for_item("main", {name=mobs_mc.items.mushroom_stew}) then clicker:get_inventory():add_item("main", mobs_mc.items.mushroom_stew) else - local pos = self.object:getpos() + local pos = self.object:get_pos() pos.y = pos.y + 0.5 minetest.add_item(pos, {name = mobs_mc.items.mushroom_stew}) end diff --git a/mods/ENTITIES/mobs_mc/creeper.lua b/mods/ENTITIES/mobs_mc/creeper.lua index ee10566283..77fd06ac74 100644 --- a/mods/ENTITIES/mobs_mc/creeper.lua +++ b/mods/ENTITIES/mobs_mc/creeper.lua @@ -62,19 +62,19 @@ mobs:register_mob("mobs_mc:creeper", { item:add_wear(1000) -- Tool break sound if item:get_count() == 0 and wdef.sound and wdef.sound.breaks then - minetest.sound_play(wdef.sound.breaks, {pos = clicker:getpos(), gain = 0.5}) + minetest.sound_play(wdef.sound.breaks, {pos = clicker:get_pos(), gain = 0.5}) end clicker:set_wielded_item(item) end self._forced_explosion_countdown_timer = self.explosion_timer - minetest.sound_play(self.sounds.attack, {pos = self.object:getpos(), gain = 1, max_hear_distance = 16}) + minetest.sound_play(self.sounds.attack, {pos = self.object:get_pos(), gain = 1, max_hear_distance = 16}) end end, do_custom = function(self, dtime) if self._forced_explosion_countdown_timer ~= nil then self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime if self._forced_explosion_countdown_timer <= 0 then - mobs:explosion(self.object:getpos(), self.explosion_radius, 0, 1, self.sounds.explode) + mobs:explosion(self.object:get_pos(), self.explosion_radius, 0, 1, self.sounds.explode) self.object:remove() end end diff --git a/mods/ENTITIES/mobs_mc/ender_dragon.lua b/mods/ENTITIES/mobs_mc/ender_dragon.lua index c6e99f47b8..1492fde53d 100644 --- a/mods/ENTITIES/mobs_mc/ender_dragon.lua +++ b/mods/ENTITIES/mobs_mc/ender_dragon.lua @@ -110,7 +110,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", { on_step = function(self, dtime) - local pos = self.object:getpos() + local pos = self.object:get_pos() local n = minetest.get_node(pos).name @@ -158,7 +158,7 @@ mobs:register_arrow(":mobs_mc:fireball2", { -- direct hit, no fire... just plenty of pain hit_player = function(self, player) - minetest.sound_play("tnt_explode", {pos = player:getpos(), gain = 1.5, max_hear_distance = 2*64}) + minetest.sound_play("tnt_explode", {pos = player:get_pos(), gain = 1.5, max_hear_distance = 2*64}) player:punch(self.object, 1.0, { full_punch_interval = 0.5, damage_groups = {fleshy = 6}, @@ -167,7 +167,7 @@ mobs:register_arrow(":mobs_mc:fireball2", { end, hit_mob = function(self, mob) - minetest.sound_play("tnt_explode", {pos = mob:getpos(), gain = 1.5, max_hear_distance = 2*64}) + minetest.sound_play("tnt_explode", {pos = mob:get_pos(), gain = 1.5, max_hear_distance = 2*64}) mob:punch(self.object, 1.0, { full_punch_interval = 0.5, damage_groups = {fleshy = 12}, diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index 49e3c9a89b..06998175c5 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -217,7 +217,7 @@ mobs:register_mob("mobs_mc:enderman", { -- Take random node self._take_place_timer = 0 self._next_take_place_time = math.random(place_frequency_min, place_frequency_max) - local pos = self.object:getpos() + local pos = self.object:get_pos() local takable_nodes = minetest.find_nodes_in_area({x=pos.x-2, y=pos.y-1, z=pos.z-2}, {x=pos.x+2, y=pos.y+1, z=pos.z+2}, mobs_mc.enderman_takable) if #takable_nodes >= 1 then local r = pr:next(1, #takable_nodes) @@ -268,7 +268,7 @@ mobs:register_mob("mobs_mc:enderman", { -- Place taken node self._take_place_timer = 0 self._next_take_place_time = math.random(take_frequency_min, take_frequency_max) - local pos = self.object:getpos() + local pos = self.object:get_pos() local yaw = self.object:get_yaw() -- Place node at looking direction local place_pos = vector.subtract(pos, minetest.facedir_to_dir(minetest.dir_to_facedir(minetest.yaw_to_dir(yaw)))) @@ -291,7 +291,7 @@ mobs:register_mob("mobs_mc:enderman", { -- TODO: Teleport enderman on damage, etc. _do_teleport = function(self) -- Attempt to randomly teleport enderman - local pos = self.object:getpos() + local pos = self.object:get_pos() -- Find all solid nodes below air in a 65×65×65 cuboid centered on the enderman local nodes = minetest.find_nodes_in_area_under_air(vector.subtract(pos, 32), vector.add(pos, 32), {"group:solid", "group:cracky", "group:crumbly"}) local telepos diff --git a/mods/ENTITIES/mobs_mc/ocelot.lua b/mods/ENTITIES/mobs_mc/ocelot.lua index 174611271a..58a7d94f9f 100644 --- a/mods/ENTITIES/mobs_mc/ocelot.lua +++ b/mods/ENTITIES/mobs_mc/ocelot.lua @@ -85,7 +85,7 @@ local ocelot = { -- 1/3 chance of getting tamed if pr:next(1, 3) == 1 then local yaw = self.object:get_yaw() - local cat = minetest.add_entity(self.object:getpos(), "mobs_mc:cat") + local cat = minetest.add_entity(self.object:get_pos(), "mobs_mc:cat") cat:set_yaw(yaw) local ent = cat:get_luaentity() ent.owner = clicker:get_player_name() diff --git a/mods/ENTITIES/mobs_mc/pig.lua b/mods/ENTITIES/mobs_mc/pig.lua index d5228a2b06..cb6bf6a1d4 100644 --- a/mods/ENTITIES/mobs_mc/pig.lua +++ b/mods/ENTITIES/mobs_mc/pig.lua @@ -153,7 +153,7 @@ mobs:register_mob("mobs_mc:pig", { -- Break carrot on a stick local def = wielditem:get_definition() if def.sounds and def.sounds.breaks then - minetest.sound_play(def.sounds.breaks, {pos = clicker:getpos(), max_hear_distance = 8, gain = 0.5}) + minetest.sound_play(def.sounds.breaks, {pos = clicker:get_pos(), max_hear_distance = 8, gain = 0.5}) end wielditem = {name = mobs_mc.items.fishing_rod, count = 1} else diff --git a/mods/ENTITIES/mobs_mc/sheep.lua b/mods/ENTITIES/mobs_mc/sheep.lua index 331d80c26f..9ddf9e039a 100644 --- a/mods/ENTITIES/mobs_mc/sheep.lua +++ b/mods/ENTITIES/mobs_mc/sheep.lua @@ -156,7 +156,7 @@ mobs:register_mob("mobs_mc:sheep", { if item:get_name() == mobs_mc.items.shears and not self.gotten and not self.child then self.gotten = true - local pos = self.object:getpos() + local pos = self.object:get_pos() minetest.sound_play("shears", {pos = pos}) pos.y = pos.y + 0.5 if not self.color then diff --git a/mods/ENTITIES/mobs_mc/snowman.lua b/mods/ENTITIES/mobs_mc/snowman.lua index c5e5604558..1c1ad6860a 100644 --- a/mods/ENTITIES/mobs_mc/snowman.lua +++ b/mods/ENTITIES/mobs_mc/snowman.lua @@ -85,7 +85,7 @@ mobs:register_mob("mobs_mc:snowman", { self._snowtimer = self._snowtimer + dtime if self.health > 0 and self._snowtimer > snow_trail_frequency then self._snowtimer = 0 - local pos = self.object:getpos() + local pos = self.object:get_pos() local below = {x=pos.x, y=pos.y-1, z=pos.z} local def = minetest.registered_nodes[minetest.get_node(pos).name] -- Node at snow golem's position must be replacable @@ -110,7 +110,7 @@ mobs:register_mob("mobs_mc:snowman", { textures = gotten_texture, }) - local pos = self.object:getpos() + local pos = self.object:get_pos() minetest.sound_play("shears", {pos = pos}) -- Wear out diff --git a/mods/ENTITIES/mobs_mc/villager_evoker.lua b/mods/ENTITIES/mobs_mc/villager_evoker.lua index 9c96e7ee76..6d9fc87a41 100644 --- a/mods/ENTITIES/mobs_mc/villager_evoker.lua +++ b/mods/ENTITIES/mobs_mc/villager_evoker.lua @@ -38,7 +38,7 @@ mobs:register_mob("mobs_mc:evoker", { -- Summon vexes custom_attack = function(self, to_attack) local r = pr:next(2,4) - local basepos = self.object:getpos() + local basepos = self.object:get_pos() basepos.y = basepos.y + 1 for i=1, r do local spawnpos = vector.add(basepos, minetest.yaw_to_dir(pr:next(0,360))) diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index 4c85390eca..a52fbdf619 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -84,7 +84,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon", { on_step = function(self, dtime) - local pos = self.object:getpos() + local pos = self.object:get_pos() local n = minetest.get_node(pos).name diff --git a/mods/ENTITIES/mobs_mc/wolf.lua b/mods/ENTITIES/mobs_mc/wolf.lua index 1884b6dec1..fc73e834eb 100644 --- a/mods/ENTITIES/mobs_mc/wolf.lua +++ b/mods/ENTITIES/mobs_mc/wolf.lua @@ -65,7 +65,7 @@ local wolf = { -- 1/3 chance of getting tamed if pr:next(1, 3) == 1 then local yaw = self.object:get_yaw() - dog = minetest.add_entity(self.object:getpos(), "mobs_mc:dog") + dog = minetest.add_entity(self.object:get_pos(), "mobs_mc:dog") dog:set_yaw(yaw) ent = dog:get_luaentity() ent.owner = clicker:get_player_name() diff --git a/mods/ENVIRONMENT/lightning/init.lua b/mods/ENVIRONMENT/lightning/init.lua index 625934fb14..dfcfe0149a 100644 --- a/mods/ENVIRONMENT/lightning/init.lua +++ b/mods/ENVIRONMENT/lightning/init.lua @@ -54,7 +54,7 @@ local function choose_pos(pos) local r = rng:next(1, playercount) local randomplayer = playerlist[r] - pos = randomplayer:getpos() + pos = randomplayer:get_pos() -- avoid striking underground if pos.y < -20 then diff --git a/mods/ENVIRONMENT/mcl_weather/rain.lua b/mods/ENVIRONMENT/mcl_weather/rain.lua index 9b41b7b673..8a4cff0870 100644 --- a/mods/ENVIRONMENT/mcl_weather/rain.lua +++ b/mods/ENVIRONMENT/mcl_weather/rain.lua @@ -178,7 +178,7 @@ mcl_weather.rain.make_weather = function() end for _, player in ipairs(minetest.get_connected_players()) do - if (mcl_weather.is_underwater(player) or not mcl_worlds.has_weather(player:getpos())) then + if (mcl_weather.is_underwater(player) or not mcl_worlds.has_weather(player:get_pos())) then mcl_weather.rain.remove_sound(player) return false end diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index ab8ab5a631..180a3f87c5 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -140,7 +140,7 @@ mcl_weather.skycolor = { local players = mcl_weather.skycolor.utils.get_players(nil) for _, player in ipairs(players) do - local pos = player:getpos() + local pos = player:get_pos() local dim = mcl_worlds.pos_to_dimension(pos) if dim == "overworld" then player:set_sky(color, "plain", nil, true) diff --git a/mods/ENVIRONMENT/mcl_weather/snow.lua b/mods/ENVIRONMENT/mcl_weather/snow.lua index ee98c20068..c1812a1bca 100644 --- a/mods/ENVIRONMENT/mcl_weather/snow.lua +++ b/mods/ENVIRONMENT/mcl_weather/snow.lua @@ -8,7 +8,7 @@ mcl_weather.snow.add_snow_particles = function(player) mcl_weather.rain.last_rp_count = 0 for i=mcl_weather.snow.particles_count, 1,-1 do local random_pos_x, random_pos_y, random_pos_z = mcl_weather.get_random_pos_by_player_look_dir(player) - random_pos_y = math.random() + math.random(player:getpos().y - 1, player:getpos().y + 7) + random_pos_y = math.random() + math.random(player:get_pos().y - 1, player:get_pos().y + 7) if minetest.get_node_light({x=random_pos_x, y=random_pos_y, z=random_pos_z}, 0.5) == 15 then mcl_weather.rain.last_rp_count = mcl_weather.rain.last_rp_count + 1 minetest.add_particle({ @@ -78,7 +78,7 @@ minetest.register_globalstep(function(dtime) end for _, player in ipairs(minetest.get_connected_players()) do - if (mcl_weather.is_underwater(player) or not mcl_worlds.has_weather(player:getpos())) then + if (mcl_weather.is_underwater(player) or not mcl_worlds.has_weather(player:get_pos())) then return false end mcl_weather.snow.add_snow_particles(player) diff --git a/mods/ENVIRONMENT/mcl_weather/weather_core.lua b/mods/ENVIRONMENT/mcl_weather/weather_core.lua index ec16211773..bec9606dd4 100644 --- a/mods/ENVIRONMENT/mcl_weather/weather_core.lua +++ b/mods/ENVIRONMENT/mcl_weather/weather_core.lua @@ -75,7 +75,7 @@ end -- checks if player is undewater. This is needed in order to -- turn off weather particles generation. mcl_weather.is_underwater = function(player) - local ppos = player:getpos() + local ppos = player:get_pos() local offset = player:get_eye_offset() local player_eye_pos = {x = ppos.x + offset.x, y = ppos.y + offset.y + 1.5, diff --git a/mods/HUD/mcl_death_messages/init.lua b/mods/HUD/mcl_death_messages/init.lua index 8c1642a8e2..00f39ac440 100644 --- a/mods/HUD/mcl_death_messages/init.lua +++ b/mods/HUD/mcl_death_messages/init.lua @@ -125,7 +125,7 @@ minetest.register_on_dieplayer(function(player) return end - local node = minetest.registered_nodes[minetest.get_node(player:getpos()).name] + local node = minetest.registered_nodes[minetest.get_node(player:get_pos()).name] local msg -- Lava if minetest.get_item_group(node.name, "lava") ~= 0 then diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index 34a0e3f14b..2833c3ac73 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -36,7 +36,7 @@ end local function return_fields(player, name) local inv = player:get_inventory() for i,stack in ipairs(inv:get_list(name)) do - return_item(stack, player, player:getpos(), inv) + return_item(stack, player, player:get_pos(), inv) stack:clear() inv:set_stack(name, i, stack) end diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua index 9c3f90e432..4047a926a9 100644 --- a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua @@ -41,7 +41,7 @@ local function resolve_commands(commands, pos) local nearest, farthest = nil, nil local min_distance, max_distance = math.huge, -1 for index, player in pairs(players) do - local distance = vector.distance(pos, player:getpos()) + local distance = vector.distance(pos, player:get_pos()) if distance < min_distance then min_distance = distance nearest = player:get_player_name() diff --git a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua index f9e573aad6..2e2d0fd601 100644 --- a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua @@ -304,7 +304,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack) for _, obj in ipairs(objects_to_move) do local entity = obj:get_luaentity() if not entity or not mesecon.is_mvps_unmov(entity.name) then - local np = vector.add(obj:getpos(), dir) + local np = vector.add(obj:get_pos(), dir) --move only if destination is not solid local nn = minetest.get_node(np) diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua index a57e7ba737..395c5130b1 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua @@ -56,7 +56,7 @@ local function pp_on_timer(pos, elapsed) end elseif node.name == basename .. "_off" then for k, obj in pairs(objs) do - local objpos = obj:getpos() + local objpos = obj:get_pos() if obj_does_activate(obj, activated_by) then if objpos.y > pos.y-1 and objpos.y < pos.y then minetest.set_node(pos, {name = basename .. "_on"}) diff --git a/mods/ITEMS/mcl_banners/init.lua b/mods/ITEMS/mcl_banners/init.lua index 610f8b7116..71f0ac02b4 100644 --- a/mods/ITEMS/mcl_banners/init.lua +++ b/mods/ITEMS/mcl_banners/init.lua @@ -394,7 +394,7 @@ local entity_standing = { -- This is a custom function which causes the banner to be dropped as item and destroys the entity. _drop = function(self) - local pos = self.object:getpos() + local pos = self.object:get_pos() pos.y = pos.y + 1 if not minetest.settings:get_bool("creative_mode") and self._base_color then diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index 480240eea6..2843bdd4df 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -212,7 +212,7 @@ function mcl_beds.on_rightclick(pos, player) end end local name = player:get_player_name() - local ppos = player:getpos() + local ppos = player:get_pos() local tod = minetest.get_timeofday() * 24000 -- Values taken from Minecraft Wiki with offset of +6000 diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index 132918d1d8..52a857a0e8 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -94,7 +94,7 @@ local spawn_item = function(self, pos) end ARROW_ENTITY.on_step = function(self, dtime) - local pos = self.object:getpos() + local pos = self.object:get_pos() local dpos = table.copy(pos) -- digital pos dpos = vector.round(dpos) local node = minetest.get_node(dpos) @@ -166,7 +166,7 @@ ARROW_ENTITY.on_step = function(self, dtime) end if ok then - local dist = vector.distance(pos, obj:getpos()) + local dist = vector.distance(pos, obj:get_pos()) if not closest_object or not closest_distance then closest_object = obj closest_distance = dist diff --git a/mods/ITEMS/mcl_bows/bow.lua b/mods/ITEMS/mcl_bows/bow.lua index 857ccda377..55a4e0b1db 100644 --- a/mods/ITEMS/mcl_bows/bow.lua +++ b/mods/ITEMS/mcl_bows/bow.lua @@ -82,7 +82,7 @@ local player_shoot_arrow = function(itemstack, player, power, damage) local inv = player:get_inventory() inv:set_stack("main", arrow_stack_id, arrow_stack) end - local playerpos = player:getpos() + local playerpos = player:get_pos() local dir = player:get_look_dir() local yaw = player:get_look_horizontal() diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index 43260abab8..5eac32eff9 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -146,7 +146,7 @@ function mcl_buckets.register_liquid(source_place, source_take, itemname, invent if inv:room_for_item("main", new_bucket) then inv:add_item("main", new_bucket) else - minetest.add_item(user:getpos(), new_bucket) + minetest.add_item(user:get_pos(), new_bucket) end itemstack:take_item() return itemstack @@ -247,7 +247,7 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", { if inv:room_for_item("main", new_bucket) then inv:add_item("main", new_bucket) else - minetest.add_item(user:getpos(), new_bucket) + minetest.add_item(user:get_pos(), new_bucket) end if not minetest.settings:get_bool("creative_mode") then itemstack:take_item() diff --git a/mods/ITEMS/mcl_clock/init.lua b/mods/ITEMS/mcl_clock/init.lua index c5a87e5b6a..0f0b8461a2 100644 --- a/mods/ITEMS/mcl_clock/init.lua +++ b/mods/ITEMS/mcl_clock/init.lua @@ -96,7 +96,7 @@ minetest.register_globalstep(function(dtime) local dim = mcl_worlds.pos_to_dimension(player:get_pos()) local frame -- Clocks do not work in certain zones - if not mcl_worlds.clock_works(player:getpos()) then + if not mcl_worlds.clock_works(player:get_pos()) then frame = random_frame else frame = now diff --git a/mods/ITEMS/mcl_compass/init.lua b/mods/ITEMS/mcl_compass/init.lua index a07d58ffd3..a8d557e8e1 100644 --- a/mods/ITEMS/mcl_compass/init.lua +++ b/mods/ITEMS/mcl_compass/init.lua @@ -28,7 +28,7 @@ minetest.register_globalstep(function(dtime) return false end if has_compass(player) then - local pos = player:getpos() + local pos = player:get_pos() local dim = mcl_worlds.pos_to_dimension(pos) local compass_image -- Compasses do not work in certain zones diff --git a/mods/ITEMS/mcl_doors/api_trapdoors.lua b/mods/ITEMS/mcl_doors/api_trapdoors.lua index db118da412..89a4bef541 100644 --- a/mods/ITEMS/mcl_doors/api_trapdoors.lua +++ b/mods/ITEMS/mcl_doors/api_trapdoors.lua @@ -121,7 +121,7 @@ function mcl_doors:register_trapdoor(name, def) local p1 = pointed_thing.above local param2 = 0 - local placer_pos = placer:getpos() + local placer_pos = placer:get_pos() if placer_pos then param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos)) end diff --git a/mods/ITEMS/mcl_end/building.lua b/mods/ITEMS/mcl_end/building.lua index 0caa2bc4e0..f4eff3e16f 100644 --- a/mods/ITEMS/mcl_end/building.lua +++ b/mods/ITEMS/mcl_end/building.lua @@ -95,7 +95,7 @@ minetest.register_node("mcl_end:end_rod", { local p1 = pointed_thing.above local param2 = 0 - local placer_pos = placer:getpos() + local placer_pos = placer:get_pos() if placer_pos then local dir = { x = p1.x - placer_pos.x, diff --git a/mods/ITEMS/mcl_fire/flint_and_steel.lua b/mods/ITEMS/mcl_fire/flint_and_steel.lua index d074f31af5..3b6861f58d 100644 --- a/mods/ITEMS/mcl_fire/flint_and_steel.lua +++ b/mods/ITEMS/mcl_fire/flint_and_steel.lua @@ -35,7 +35,7 @@ minetest.register_tool("mcl_fire:flint_and_steel", { used = true end if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then - minetest.sound_play(idef.sound.breaks, {pos=user:getpos(), gain=0.5}) + minetest.sound_play(idef.sound.breaks, {pos=user:get_pos(), gain=0.5}) end if not minetest.settings:get_bool("creative_mode") and used == true then itemstack:add_wear(65535/65) -- 65 uses diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index 2a7a81199e..c8c12ea365 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -203,7 +203,7 @@ if flame_sound then function mcl_fire.update_player_sound(player) local player_name = player:get_player_name() -- Search for flame nodes in radius around player - local ppos = player:getpos() + local ppos = player:get_pos() local areamin = vector.subtract(ppos, radius) local areamax = vector.add(ppos, radius) local fpos, num = minetest.find_nodes_in_area( diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index dd9a63a5c2..a05646b732 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -297,7 +297,7 @@ minetest.register_abm({ -- Item must get sucked in when the item just TOUCHES the block above the hopper -- This is the reason for the Y calculation. -- Test: Items on farmland and slabs get sucked, but items on full blocks don't - local posob = object:getpos() + local posob = object:get_pos() local posob_miny = posob.y + object:get_properties().collisionbox[2] if math.abs(posob.x-pos.x) <= 0.5 and (posob_miny-pos.y < 1.5 and posob.y-pos.y >= 0.3) then inv:add_item("main", ItemStack(object:get_luaentity().itemstring)) diff --git a/mods/ITEMS/mcl_maps/init.lua b/mods/ITEMS/mcl_maps/init.lua index 9f762a7fe8..300e1d35b1 100644 --- a/mods/ITEMS/mcl_maps/init.lua +++ b/mods/ITEMS/mcl_maps/init.lua @@ -9,7 +9,7 @@ local make_filled_map = function(itemstack, placer, pointed_thing) if inv:room_for_item("main", new_map) then inv:add_item("main", new_map) else - minetest.add_item(placer:getpos(), new_map) + minetest.add_item(placer:get_pos(), new_map) end return itemstack end diff --git a/mods/ITEMS/mcl_mobspawners/init.lua b/mods/ITEMS/mcl_mobspawners/init.lua index 99c266f9a7..1eb9005ac0 100644 --- a/mods/ITEMS/mcl_mobspawners/init.lua +++ b/mods/ITEMS/mcl_mobspawners/init.lua @@ -365,7 +365,7 @@ end doll_def.on_step = function(self, dtime) -- Check if spawner is still present. If not, delete the entity self.timer = self.timer + 0.01 - local n = minetest.get_node_or_nil(self.object:getpos()) + local n = minetest.get_node_or_nil(self.object:get_pos()) if self.timer > 1 then if n and n.name and n.name ~= "mcl_mobspawners:spawner" then self.object:remove() diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index 8461e446c6..c172eacfb3 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -223,7 +223,7 @@ minetest.register_abm({ if obj:is_player() or lua_entity then local dim = mcl_worlds.pos_to_dimension(pos) - local objpos = obj:getpos() + local objpos = obj:get_pos() if objpos == nil then return end diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index eb4803e33c..d08bddef8d 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -415,7 +415,7 @@ minetest.register_abm({ if portal_cooloff[obj] then return end - local objpos = obj:getpos() + local objpos = obj:get_pos() if objpos == nil then return end diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index c8b1f73c5c..277267b01b 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -84,7 +84,7 @@ minetest.register_craftitem("mcl_potions:glass_bottle", { if inv:room_for_item("main", water_bottle) then inv:add_item("main", water_bottle) else - minetest.add_item(placer:getpos(), water_bottle) + minetest.add_item(placer:get_pos(), water_bottle) end itemstack:take_item() end diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index 978f73fde4..29c23f52b0 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -283,7 +283,7 @@ minetest.register_node("mcl_signs:wall_sign", { local wdir = minetest.dir_to_wallmounted(dir) - local placer_pos = placer:getpos() + local placer_pos = placer:get_pos() local fdir = minetest.dir_to_facedir(dir) @@ -443,7 +443,7 @@ minetest.register_entity("mcl_signs:text", { self._signnodename = des._signnodename end end - local meta = minetest.get_meta(self.object:getpos()) + local meta = minetest.get_meta(self.object:get_pos()) local text = meta:get_string("text") self.object:set_properties({ textures={generate_texture(create_lines(text), self._signnodename)}, diff --git a/mods/ITEMS/mcl_stairs/api.lua b/mods/ITEMS/mcl_stairs/api.lua index 613d66af69..d90bc84528 100644 --- a/mods/ITEMS/mcl_stairs/api.lua +++ b/mods/ITEMS/mcl_stairs/api.lua @@ -29,7 +29,7 @@ local function place_slab_normal(itemstack, placer, pointed_thing) local p0 = pointed_thing.under local p1 = pointed_thing.above - local placer_pos = placer:getpos() + local placer_pos = placer:get_pos() local fpos = get_fpos(placer, pointed_thing) @@ -57,7 +57,7 @@ local function place_stair(itemstack, placer, pointed_thing) local p1 = pointed_thing.above local param2 = 0 - local placer_pos = placer:getpos() + local placer_pos = placer:get_pos() if placer_pos then param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos)) end diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index 4f57297337..731e9ce83f 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -114,7 +114,7 @@ local pearl_ENTITY={ -- Snowball on_step()--> called when snowball is moving. local snowball_on_step = function(self, dtime) self.timer=self.timer+dtime - local pos = self.object:getpos() + local pos = self.object:get_pos() local node = minetest.get_node(pos) local def = minetest.registered_nodes[node.name] @@ -131,7 +131,7 @@ end -- Movement function of egg local egg_on_step = function(self, dtime) self.timer=self.timer+dtime - local pos = self.object:getpos() + local pos = self.object:get_pos() local node = minetest.get_node(pos) local def = minetest.registered_nodes[node.name] @@ -185,7 +185,7 @@ end -- Movement function of ender pearl local pearl_on_step = function(self, dtime) self.timer=self.timer+dtime - local pos = self.object:getpos() + local pos = self.object:get_pos() pos.y = math.floor(pos.y) local node = minetest.get_node(pos) local nn = node.name @@ -259,7 +259,7 @@ local pearl_on_step = function(self, dtime) end end - local oldpos = player:getpos() + local oldpos = player:get_pos() -- Teleport and hurt player player:setpos(telepos) player:set_hp(player:get_hp() - 5) diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index 306c6298da..39df3848b9 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -20,7 +20,7 @@ local function do_tnt_physics(tnt_np,tntr) for k, obj in pairs(objs) do local ent = obj:get_luaentity() local v = obj:getvelocity() - local p = obj:getpos() + local p = obj:get_pos() if ent and ent.name == "mcl_tnt:tnt" then obj:setvelocity({x=(p.x - tnt_np.x) + (tntr / 2) + v.x, y=(p.y - tnt_np.y) + tntr + v.y, z=(p.z - tnt_np.z) + (tntr / 2) + v.z}) else @@ -159,7 +159,7 @@ local function add_effects(pos, radius, drops) end function TNT:on_step(dtime) - local pos = self.object:getpos() + local pos = self.object:get_pos() minetest.add_particle({ pos = {x=pos.x,y=pos.y+0.5,z=pos.z}, velocity = vector.new(math.random() * 0.2 - 0.1, 1.0 + math.random(), math.random() * 0.2 - 0.1), @@ -181,7 +181,7 @@ function TNT:on_step(dtime) self.blinkstatus = not self.blinkstatus end if self.timer > 4 then - tnt.boom(self.object:getpos()) + tnt.boom(self.object:get_pos()) self.object:remove() end end diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua b/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua index 4dfa92e836..0b07fb14cc 100644 --- a/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua +++ b/mods/ITEMS/minetest-3d_armor/3d_armor/armor.lua @@ -245,7 +245,7 @@ armor.get_valid_player = function(self, player, msg) minetest.log("error", "3d_armor: Player name is nil "..msg) return end - local pos = player:getpos() + local pos = player:get_pos() local player_inv = player:get_inventory() local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"}) if not pos then @@ -539,7 +539,7 @@ minetest.register_globalstep(function(dtime) end for _,player in pairs(minetest.get_connected_players()) do local name = player:get_player_name() - local pos = player:getpos() + local pos = player:get_pos() local hp = player:get_hp() -- water breathing if name and armor.def[name].water > 0 then diff --git a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua index 1a25dc6881..d6212e3790 100644 --- a/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua +++ b/mods/ITEMS/minetest-3d_armor/3d_armor_stand/init.lua @@ -219,7 +219,7 @@ minetest.register_entity("3d_armor_stand:armor_entity", { pos = nil, timer = 0, on_activate = function(self) - local pos = self.object:getpos() + local pos = self.object:get_pos() self.object:set_armor_groups({immortal=1}) if pos then self.pos = vector.round(pos) @@ -233,7 +233,7 @@ minetest.register_entity("3d_armor_stand:armor_entity", { self.timer = self.timer + dtime if self.timer > 1 then self.timer = 0 - local pos = self.object:getpos() + local pos = self.object:get_pos() if pos then if vector.equals(vector.round(pos), self.pos) then return diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 25f51e092a..93889604b4 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -334,7 +334,7 @@ minetest.register_chatcommand("spawnstruct", { description = "Generate a pre-defined structure near your position.", privs = {debug = true}, func = function(name, param) - local pos= minetest.get_player_by_name(name):getpos() + local pos= minetest.get_player_by_name(name):get_pos() if not pos then return end diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua index d77a7b1874..875d1be335 100644 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ b/mods/PLAYER/mcl_hunger/hunger.lua @@ -141,7 +141,7 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso local name = user:get_player_name() local hp = user:get_hp() - local pos = user:getpos() + local pos = user:get_pos() -- player height pos.y = pos.y + 1.5 local foodtype = minetest.get_item_group(itemname, "food") diff --git a/mods/PLAYER/mcl_playerinfo/init.lua b/mods/PLAYER/mcl_playerinfo/init.lua index 8fa615da11..31dad39a6f 100644 --- a/mods/PLAYER/mcl_playerinfo/init.lua +++ b/mods/PLAYER/mcl_playerinfo/init.lua @@ -57,7 +57,7 @@ minetest.register_globalstep(function(dtime) local name = player:get_player_name() -- where am I? - local pos = player:getpos() + local pos = player:get_pos() -- what is around me? local node_stand, node_stand_below, node_head, node_feet = get_player_nodes(pos) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 1320028aab..f9022a3b79 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -18,7 +18,7 @@ minetest.register_globalstep(function(dtime) end if player:get_player_control().jump and mcl_playerplus_internal[name].jump_cooldown <= 0 then - local pos = player:getpos() + local pos = player:get_pos() local node_stand = mcl_playerinfo[name].node_stand local node_stand_below = mcl_playerinfo[name].node_stand_below @@ -76,7 +76,7 @@ minetest.register_globalstep(function(dtime) local name = player:get_player_name() -- where am I? - local pos = player:getpos() + local pos = player:get_pos() -- what is around me? local node_stand = mcl_playerinfo[name].node_stand @@ -183,7 +183,7 @@ minetest.register_globalstep(function(dtime) -- Show positions of barriers when player is wielding a barrier local wi = player:get_wielded_item():get_name() if wi == "mcl_core:barrier" or wi == "mcl_core:realm_barrier" then - local pos = vector.round(player:getpos()) + local pos = vector.round(player:get_pos()) local r = 8 local vm = minetest.get_voxel_manip() local emin, emax = vm:read_from_map({x=pos.x-r, y=pos.y-r, z=pos.z-r}, {x=pos.x+r, y=pos.y+r, z=pos.z+r}) diff --git a/mods/PLAYER/mcl_sprint/init.lua b/mods/PLAYER/mcl_sprint/init.lua index e1224bb72d..123809a897 100644 --- a/mods/PLAYER/mcl_sprint/init.lua +++ b/mods/PLAYER/mcl_sprint/init.lua @@ -31,7 +31,7 @@ minetest.register_on_joinplayer(function(player) sprinting = false, timeOut = 0, shouldSprint = false, - lastPos = player:getpos(), + lastPos = player:get_pos(), sprintDistance = 0, } end) @@ -69,7 +69,7 @@ minetest.register_globalstep(function(dtime) players[playerName]["shouldSprint"] = false end - local playerPos = player:getpos() + local playerPos = player:get_pos() --If the player is sprinting, create particles behind and cause exhaustion if playerInfo["sprinting"] == true and gameTime % 0.1 == 0 then