9
0
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:
Samsuik
2025-10-07 11:36:32 +01:00
parent f194568a55
commit 96634b9263
2 changed files with 4 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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++;