Replace for loop with forEach
This commit is contained in:
parent
3e189510d4
commit
239a95961e
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user