mod-sneeker/functions.lua

14 lines
427 B
Lua
Raw Normal View History

2017-05-28 04:54:26 +02:00
-- Functions for sneeker mod
-- Spawns a sneeker entity
function sneeker.spawn(pos)
2017-07-29 02:10:57 +02:00
core.add_entity(pos, sneeker.mob_name)
2021-05-06 04:11:14 +02:00
sneeker.log("debug", "Spawned entity \"" .. sneeker.mob_name .. "\" at " .. tostring(pos.x) .. "," .. tostring(pos.y))
end
-- Retrieves pos coordinates in string value
function sneeker.get_pos_string(pos)
return 'x=' .. tostring(pos.x) .. ', y=' .. tostring(pos.y) .. ', z=' .. tostring(pos.z)
end