getpos to get_pos

This commit is contained in:
TenPlus1 2017-10-09 15:16:05 +01:00
parent 3b72ac1357
commit 0db8d4b263
5 changed files with 7 additions and 7 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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)

View File

@ -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()