mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-30 04:09:09 +00:00
fix calculating the local section size
This commit is contained in:
@@ -34,9 +34,9 @@ public record ConfigurationArea(int minX, int minY, int minZ, int maxX, int maxY
|
||||
}
|
||||
|
||||
public long countSections(final int sectionExponent) {
|
||||
final int sectionsX = (maxX - minX >> sectionExponent) + 1;
|
||||
final int sectionsY = (maxY - minY >> sectionExponent) + 1;
|
||||
final int sectionsZ = (maxZ - minZ >> sectionExponent) + 1;
|
||||
final int sectionsX = ((this.maxX - this.minX) >> sectionExponent) + 1;
|
||||
final int sectionsY = ((this.maxY - this.minY) >> sectionExponent) + 1;
|
||||
final int sectionsZ = ((this.maxZ - this.minZ) >> sectionExponent) + 1;
|
||||
return (long) sectionsX * (long) sectionsY * (long) sectionsZ;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public final class LocalConfigurationContainers {
|
||||
long totalSectionCount = 0;
|
||||
int totalAreas = 0;
|
||||
for (final ConfigurationArea area : this.containers.keySet()) {
|
||||
final long sections = area.countSections(4);
|
||||
final long sections = area.countSections(0);
|
||||
if (sections < MASSIVE_REGION_SIZE) {
|
||||
totalSectionCount += sections;
|
||||
totalAreas++;
|
||||
|
||||
Reference in New Issue
Block a user