Fix mappings issue with biome-based regen on 1.18.2 (#1982)

access correct fields
This commit is contained in:
Hannes Greule 2022-10-13 19:20:01 +02:00 committed by GitHub
parent 878509406b
commit 13eb1f815f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,10 +146,10 @@ public class PaperweightRegen extends Regenerator<ChunkAccess, ProtoChunk, Level
chunkSourceField = ServerLevel.class.getDeclaredField(Refraction.pickName("chunkSource", "K")); chunkSourceField = ServerLevel.class.getDeclaredField(Refraction.pickName("chunkSource", "K"));
chunkSourceField.setAccessible(true); chunkSourceField.setAccessible(true);
ringPositionsField = ChunkGenerator.class.getDeclaredField(Refraction.pickName("ringPositions", "i")); ringPositionsField = ChunkGenerator.class.getDeclaredField(Refraction.pickName("ringPositions", "h"));
ringPositionsField.setAccessible(true); ringPositionsField.setAccessible(true);
hasGeneratedPositionsField = ChunkGenerator.class.getDeclaredField(Refraction.pickName("hasGeneratedPositions", "j")); hasGeneratedPositionsField = ChunkGenerator.class.getDeclaredField(Refraction.pickName("hasGeneratedPositions", "i"));
hasGeneratedPositionsField.setAccessible(true); hasGeneratedPositionsField.setAccessible(true);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);