mod-sneeker/functions.lua

14 lines
427 B
Lua
Raw Normal View History

2017-05-27 19:54:26 -07:00
-- Functions for sneeker mod
-- Spawns a sneeker entity
function sneeker.spawn(pos)
2017-07-28 17:10:57 -07:00
core.add_entity(pos, sneeker.mob_name)
2021-05-05 19:11:14 -07: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