diff --git a/NMS/NMS-v1_20_R3/src/main/java/com/craftaro/core/nms/v1_20_R3/world/spawner/BBaseSpawnerImpl.java b/NMS/NMS-v1_20_R3/src/main/java/com/craftaro/core/nms/v1_20_R3/world/spawner/BBaseSpawnerImpl.java index 688896f6..7f54d94e 100644 --- a/NMS/NMS-v1_20_R3/src/main/java/com/craftaro/core/nms/v1_20_R3/world/spawner/BBaseSpawnerImpl.java +++ b/NMS/NMS-v1_20_R3/src/main/java/com/craftaro/core/nms/v1_20_R3/world/spawner/BBaseSpawnerImpl.java @@ -45,7 +45,15 @@ public class BBaseSpawnerImpl implements BBaseSpawner { this.setNextSpawnDataMethod.setAccessible(true); } - this.getOrCreateNextSpawnDataMethod = this.spawner.getClass().getSuperclass().getDeclaredMethod("b", Level.class, RandomSource.class, BlockPos.class); + // Spigot mappings changed again mid-nms-version :< + Method getOrCreateNextSpawnDataMethodLocal; + try { + getOrCreateNextSpawnDataMethodLocal = this.spawner.getClass().getSuperclass().getDeclaredMethod("a", Level.class, RandomSource.class, BlockPos.class); + } catch (NoSuchMethodException ex) { + getOrCreateNextSpawnDataMethodLocal = this.spawner.getClass().getSuperclass().getDeclaredMethod("b", Level.class, RandomSource.class, BlockPos.class); + } + + this.getOrCreateNextSpawnDataMethod = getOrCreateNextSpawnDataMethodLocal; if (!this.getOrCreateNextSpawnDataMethod.canAccess(this.spawner)) { this.getOrCreateNextSpawnDataMethod.setAccessible(true); }