forked from mtcontrib/maidroid
Merge pull request #98 from tacigar/tacigar/core_writer
Fix core writer
This commit is contained in:
commit
af0bb0fa58
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user