summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-10-09 15:16:05 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-10-09 15:16:05 +0100
commit0db8d4b2639ece8f913079cb6e5499354fb1a0a9 (patch)
tree88aa769021c0d52612b611f07e430ffee3edc989
parent3b72ac1357dce4ce7bc7f05e3708c5c161abe0f9 (diff)
getpos to get_pos
-rw-r--r--bunny.lua2
-rw-r--r--chicken.lua4
-rw-r--r--cow.lua2
-rw-r--r--rat.lua2
-rw-r--r--sheep.lua4
5 files changed, 7 insertions, 7 deletions
diff --git a/bunny.lua b/bunny.lua
index f49cd23..93b8dcf 100644
--- a/bunny.lua
+++ b/bunny.lua
@@ -76,7 +76,7 @@ mobs:register_mob("mobs_animal:bunny", {
end,
on_spawn = function(self)
- local pos = self.object:getpos() ; pos.y = pos.y - 1
+ local pos = self.object:get_pos() ; pos.y = pos.y - 1
-- white snowy bunny
if minetest.find_node_near(pos, 1,
diff --git a/chicken.lua b/chicken.lua
index ea5710a..15c689f 100644
--- a/chicken.lua
+++ b/chicken.lua
@@ -71,7 +71,7 @@ mobs:register_mob("mobs_animal:chicken", {
return
end
- local pos = self.object:getpos()
+ local pos = self.object:get_pos()
minetest.add_item(pos, "mobs:egg")
@@ -179,7 +179,7 @@ local egg_VELOCITY = 19
-- 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,
diff --git a/cow.lua b/cow.lua
index c9b9e1e..e7ba196 100644
--- a/cow.lua
+++ b/cow.lua
@@ -87,7 +87,7 @@ mobs:register_mob("mobs_animal:cow", {
if inv:room_for_item("main", {name = "mobs:bucket_milk"}) then
clicker:get_inventory():add_item("main", "mobs:bucket_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:bucket_milk"})
end
diff --git a/rat.lua b/rat.lua
index 31304eb..033a238 100644
--- a/rat.lua
+++ b/rat.lua
@@ -41,7 +41,7 @@ mobs:register_mob("mobs_animal:rat", {
self.rat_timer = 0
- local pos = self.object:getpos()
+ local pos = self.object:get_pos()
print("rat pos", pos.x, pos.y, pos.z, dtime)
diff --git a/sheep.lua b/sheep.lua
index 1d8e8c0..74300f8 100644
--- a/sheep.lua
+++ b/sheep.lua
@@ -106,7 +106,7 @@ for _, col in ipairs(all_colours) do
self.gotten = true -- shaved
local obj = minetest.add_item(
- self.object:getpos(),
+ self.object:get_pos(),
ItemStack( "wool:" .. col[1] .. " " .. math.random(1, 3) )
)
@@ -147,7 +147,7 @@ for _, col in ipairs(all_colours) do
if c[1] == colr then
- local pos = self.object:getpos()
+ local pos = self.object:get_pos()
self.object:remove()