Merge pull request #98 from tacigar/tacigar/core_writer

Fix core writer
This commit is contained in:
tacigar 2016-12-23 01:23:38 +09:00 committed by GitHub
commit af0bb0fa58

View File

@ -115,7 +115,8 @@ do -- register core writer
-- get_nearest_core_entity returns the nearest core entity.
local function get_nearest_core_entity(pos)
local all_objects = minetest.get_objects_inside_radius(pos, 1.0)
pos.y = pos.y + 0.65
local all_objects = minetest.get_objects_inside_radius(pos, 0.1)
for _, object in ipairs(all_objects) do
if object:get_luaentity().name == "maidroid_tool:core_entity" then
return object:get_luaentity()