rutgerkok / WorldGeneratorApi

Minecraft Spigot plugin that enables other plugins to customize world generation
MIT License
96 stars 9 forks source link

Release 1.0.1 crashes on Spigot 1.16.1 #26

Closed TheGreatRambler closed 3 years ago

TheGreatRambler commented 3 years ago

Describe the bug When running release 1.0.1 on a Spigot 1.16.1 server, it crashes with

java.lang.IllegalArgumentException: Can not set final net.minecraft.server.v1_16_R1.GeneratorSettingBase field net.minecraft.server.v1_16_R1.ChunkGeneratorAbstract.h to net.minecraft.server.v1_16_R1.ChunkProviderFlat
        at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:?]
        at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:?]
        at jdk.internal.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58) ~[?:?]
        at jdk.internal.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38) ~[?:?]
        at java.lang.reflect.Field.get(Field.java:418) ~[?:?]
        at nl.rutgerkok.worldgeneratorapi.internal.WorldGeneratorImpl.extractSettings(WorldGeneratorImpl.java:47) ~[?:?]
        at nl.rutgerkok.worldgeneratorapi.internal.WorldGeneratorImpl.replaceChunkGenerator(WorldGeneratorImpl.java:172) ~[?:?]
        at nl.rutgerkok.worldgeneratorapi.internal.WorldGeneratorImpl.setBaseTerrainGenerator(WorldGeneratorImpl.java:222) ~[?:?]
        at challengeserver.tgrcode.worldgen_height.App.lambda$getDefaultWorldGenerator$0(App.java:22) ~[?:?]
        at nl.rutgerkok.worldgeneratorapi.internal.WorldGeneratorApiImpl.lambda$0(WorldGeneratorApiImpl.java:61) ~[?:?]
        at java.util.HashMap.computeIfAbsent(HashMap.java:1133) ~[?:?]
        at nl.rutgerkok.worldgeneratorapi.internal.WorldGeneratorApiImpl.getForWorld(WorldGeneratorApiImpl.java:53) ~[?:?]
        at nl.rutgerkok.worldgeneratorapi.internal.bukkitoverrides.DummyBukkitChunkGenerator.getDefaultPopulators(DummyBukkitChunkGenerator.java:53) ~[?:?]
        at net.minecraft.server.v1_16_R1.MinecraftServer.initWorld(MinecraftServer.java:452) ~[spigot_1-16-1.jar:git-Spigot-0287a20-7560f5f]
        at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:422) ~[spigot_1-16-1.jar:git-Spigot-0287a20-7560f5f]
        at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:219) ~[spigot_1-16-1.jar:git-Spigot-0287a20-7560f5f]
        at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:810) ~[spigot_1-16-1.jar:git-Spigot-0287a20-7560f5f]
        at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot_1-16-1.jar:git-Spigot-0287a20-7560f5f]
        at java.lang.Thread.run(Thread.java:834) [?:?]

The plugin starts and stops successfully, however.

[14:32:26] [Server thread/INFO]: [WorldGeneratorApi] Loading WorldGeneratorApi v1.0.1
[14:32:26] [Server thread/INFO]: [WorldGenHeight] Loading WorldGenHeight v0.0.1
[14:32:26] [Server thread/INFO]: [WorldGeneratorApi] Enabling WorldGeneratorApi v1.0.1
[14:32:26] [Server thread/INFO]: [WorldGenHeight] Enabling WorldGenHeight v0.0.1
[14:32:26] [Server thread/INFO]: Preparing level "temp"
...
[14:32:28] [Server thread/INFO]: [WorldGenHeight] Disabling WorldGenHeight v0.0.1
[14:32:28] [Server thread/INFO]: [WorldGeneratorApi] Disabling WorldGeneratorApi v1.0.1
rutgerkok commented 3 years ago

Unfortunate, but I'm not going to spend time fixing old versions of WorldGeneratorApi.