diff --git a/apply_diff.lua b/apply_diff.lua index 4b4e048..8baea7f 100644 --- a/apply_diff.lua +++ b/apply_diff.lua @@ -32,7 +32,8 @@ function mapsync.apply_diff(chunk_pos, changed_nodes) end if changed_node.param1 ~= nil then - param1[index] = changed_node.param1 + -- use max light from source or target + param1[index] = math.max(param1[index], changed_node.param1) end if changed_node.param2 ~= nil then