So I wanted to make a water world like which used this and Noxys Swimming but found both are not working together since you overwrite the collision mask, which undoes the changes Noxys Swimming makes to have the players swim (aka walk on water).
So I went and basically rewrote your mod to make it work with Noxys Swimming. Also makes it easy to update in the future and add support for other water-tiles.
local waters = {"water", "deepwater", "water-green", "deepwater-green", "water-mud", "water-shallow"}
for _,water in pairs(waters) do
local mask = data.raw.tile[water].collision_mask
for i=#mask,1,-1 do
if mask[i] == "resource-layer" then
table.remove(mask, i)
end
end
end
What is does, is going through all tiles defined in waters and removes the "resource-layer" collision from the mask.