3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 19:10:07 +01:00

Apply hack-fix for biomes to 1.20.6 as well

Dieser Commit ist enthalten in:
dordsor21 2024-07-05 17:20:13 +01:00
Ursprung 8f353e8f0d
Commit 5341b06813
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -140,7 +140,14 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
fieldTickingFluidCount.setAccessible(true);
fieldTickingBlockCount = LevelChunkSection.class.getDeclaredField(Refraction.pickName("tickingBlockCount", "f"));
fieldTickingBlockCount.setAccessible(true);
fieldBiomes = LevelChunkSection.class.getDeclaredField(Refraction.pickName("biomes", "i"));
Field tmpFieldBiomes;
try {
// Seems it's sometimes biomes and sometimes "i". Idk this is just easier than having to try to deal with it
tmpFieldBiomes = LevelChunkSection.class.getDeclaredField("biomes"); // apparently unobf
} catch (NoSuchFieldException ignored) {
tmpFieldBiomes = LevelChunkSection.class.getDeclaredField("i"); // apparently obf
}
fieldBiomes = tmpFieldBiomes;
fieldBiomes.setAccessible(true);
Method getVisibleChunkIfPresent = ChunkMap.class.getDeclaredMethod(Refraction.pickName(