Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-27 11:20:04 +01:00
fix: do not bother with refraction for biomes/i field, this just fixes it now
Dieser Commit ist enthalten in:
Ursprung
e3fde6cf82
Commit
d9e69cfd58
@ -141,7 +141,14 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
|||||||
fieldTickingFluidCount.setAccessible(true);
|
fieldTickingFluidCount.setAccessible(true);
|
||||||
fieldTickingBlockCount = LevelChunkSection.class.getDeclaredField(Refraction.pickName("tickingBlockCount", "f"));
|
fieldTickingBlockCount = LevelChunkSection.class.getDeclaredField(Refraction.pickName("tickingBlockCount", "f"));
|
||||||
fieldTickingBlockCount.setAccessible(true);
|
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);
|
fieldBiomes.setAccessible(true);
|
||||||
|
|
||||||
Method getVisibleChunkIfPresent = ChunkMap.class.getDeclaredMethod(Refraction.pickName(
|
Method getVisibleChunkIfPresent = ChunkMap.class.getDeclaredMethod(Refraction.pickName(
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren