Add loadIfPresent method for use where the section should definitely exist and be FULL

This commit is contained in:
dordsor21
2021-09-13 12:47:00 +01:00
parent af890cf21d
commit 40a4010041
11 changed files with 79 additions and 13 deletions

View File

@ -61,8 +61,9 @@ public class HeightmapProcessor implements IBatchProcessor {
if (!(hasSectionSet || hasSectionGet)) {
continue;
}
char[] setSection = hasSectionSet ? set.load(layer) : null;
if (Arrays.equals(setSection, FaweCache.IMP.EMPTY_CHAR_4096) || Arrays.equals(setSection, AIR_LAYER)) {
char[] setSection = hasSectionSet ? set.loadIfPresent(layer) : null;
if (setSection == null || Arrays.equals(setSection, FaweCache.IMP.EMPTY_CHAR_4096) ||
Arrays.equals(setSection, AIR_LAYER)) {
hasSectionSet = false;
}
if (!hasSectionSet && !hasSectionGet) {