At first I thought the problem was with my regions using decimal values (like 1.5). But even after I round it all to whole numbers, they are harvesting it from very strange (and random) positions, most of the time 3 blocks far from the correct place.
Yes, it was a change to support some upcoming content. See get_harvest_range() in entities.lua. I’ve changed it to the following for the next release so that it’s easier to achieve closer harvesting distances:
function entities.get_harvest_range(entity)
local RESOURCE_RADIUS = 0.5 -- distance from the center of a voxel to the edge
local entity_reach = radiant.entities.get_entity_data(entity, 'stonehearth:entity_reach') or 1
local tool_reach = 0
local weapon = stonehearth.combat:get_main_weapon(entity)
if radiant.entities.exists(weapon) then
local weapon_data = radiant.entities.get_entity_data(weapon, 'stonehearth:combat:weapon_data')
if weapon_data and weapon_data.reach then
tool_reach = weapon_data.reach
end
end
return entity_reach + tool_reach - RESOURCE_RADIUS
end