Replace for loop with forEach

This commit is contained in:
Brady 2018-09-24 17:56:13 -05:00
parent 3e189510d4
commit 239a95961e
No known key found for this signature in database
GPG Key ID: 73A788379A197567

View File

@ -116,9 +116,8 @@ public final class CachedWorld implements Helper {
int regionZ = zoff + playerRegionZ;
CachedRegion region = getOrCreateRegion(regionX, regionZ);
if (region != null) {
for (BlockPos pos : region.getLocationsOf(block)) {
res.add(pos);
}
// TODO: 100% verify if this or addAll is faster.
region.getLocationsOf(block).forEach(res::add);
}
}
}