Make sure thread-cached arrays are reset

This commit is contained in:
dordsor21
2022-03-13 01:44:59 +00:00
parent 7ba185c4ac
commit d8c0f8e3b1
4 changed files with 15 additions and 3 deletions

View File

@ -369,8 +369,12 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
}
return levelChunkSection;
} catch (final Throwable e) {
Arrays.fill(blockToPalette, Integer.MAX_VALUE);
throw e;
} finally {
Arrays.fill(blockToPalette, Integer.MAX_VALUE);
Arrays.fill(paletteToBlock, Integer.MAX_VALUE);
Arrays.fill(blockStates, 0);
Arrays.fill(blocksCopy, 0);
}
}