Several problems involving customized biomes!
MrRaposinha opened this issue ยท 3 comments
[19:33:22] [Server thread/ERROR]: Could not pass event CreatureSpawnEvent to ExtraHardMode v3.14.2-3b567aa java.lang.NullPointerException: Cannot invoke "org.bukkit.block.Biome.ordinal()" because the return value of "org.bukkit.block.Block.getBiome()" is null at com.extrahardmode.features.AntiFarming.onSquidSpawn(AntiFarming.java:303) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1144.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.4.jar:git-Purpur-897] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.4.jar:git-Purpur-897] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Purpur-897] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Purpur-897] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:685) ~[patched_1.16.4.jar:git-Purpur-897] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:606) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.WorldServer.addEntity0(WorldServer.java:1695) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.WorldServer.addEntity(WorldServer.java:1596) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.WorldAccess.lambda$addAllEntities$0(WorldAccess.java:13) ~[patched_1.16.4.jar:git-Purpur-897] at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) ~[?:?] at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?] at net.minecraft.server.v1_16_R3.WorldAccess.addAllEntities(WorldAccess.java:13) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.SpawnerCreature.spawnMobsInternal(SpawnerCreature.java:252) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.SpawnerCreature.spawnMobs(SpawnerCreature.java:178) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.SpawnerCreature.a(SpawnerCreature.java:154) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.ChunkProviderServer.tickChunks(ChunkProviderServer.java:1028) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.ChunkProviderServer.tick(ChunkProviderServer.java:924) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.WorldServer.doTick(WorldServer.java:885) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1433) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:387) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1282) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1008) ~[patched_1.16.4.jar:git-Purpur-897] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:180) ~[patched_1.16.4.jar:git-Purpur-897] at java.lang.Thread.run(Thread.java:832) [?:?]
[14:15:30] [Server thread/ERROR]: Could not pass event CreatureSpawnEvent to ExtraHardMode v3.14.2-86dd7c6 java.lang.NullPointerException: Cannot invoke "net.minecraft.server.v1_16_R3.MinecraftKey.getNamespace()" because "minecraft" is null at org.bukkit.craftbukkit.v1_16_R3.util.CraftNamespacedKey.fromMinecraft(CraftNamespacedKey.java:24) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlock.biomeBaseToBiome(CraftBlock.java:516) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.CraftWorld.getBiome(CraftWorld.java:1113) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlock.getBiome(CraftBlock.java:503) ~[patched_1.16.4.jar:git-Purpur-956] at com.extrahardmode.features.monsters.CaveSpider.onEntitySpawn(CaveSpider.java:64) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1326.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.4.jar:git-Purpur-956] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:692) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:613) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldServer.addEntity0(WorldServer.java:1642) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldServer.addEntity(WorldServer.java:1538) ~[patched_1.16.4.jar:git-Purpur-956] at net.theprogrammersworld.herobrine.entity.EntityManager.spawnCustomSkeleton(EntityManager.java:28) ~[?:?] at net.theprogrammersworld.herobrine.listeners.EntityListener.onCreatureSpawn(EntityListener.java:86) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1900.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.4.jar:git-Purpur-956] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:692) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:613) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldServer.addEntity0(WorldServer.java:1642) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldServer.addEntity(WorldServer.java:1543) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.CraftWorld.addEntity(CraftWorld.java:2021) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.CraftWorld.spawn(CraftWorld.java:2028) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.CraftWorld.spawn(CraftWorld.java:1602) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.CraftWorld.spawnEntity(CraftWorld.java:823) ~[patched_1.16.4.jar:git-Purpur-956] at com.extrahardmode.module.EntityHelper.spawn(EntityHelper.java:248) ~[?:?] at com.extrahardmode.module.EntityHelper.spawnRandomMob(EntityHelper.java:296) ~[?:?] at com.extrahardmode.features.monsters.MonsterRules.onEntitySpawn(MonsterRules.java:98) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1300.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.4.jar:git-Purpur-956] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:692) ~[patched_1.16.4.jar:git-Purpur-956] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:613) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldServer.addEntity0(WorldServer.java:1642) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldServer.addEntity(WorldServer.java:1543) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldAccess.lambda$addAllEntities$0(WorldAccess.java:13) ~[patched_1.16.4.jar:git-Purpur-956] at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) ~[?:?] at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?] at net.minecraft.server.v1_16_R3.WorldAccess.addAllEntities(WorldAccess.java:13) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.SpawnerCreature.spawnMobsInternal(SpawnerCreature.java:252) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.SpawnerCreature.spawnMobs(SpawnerCreature.java:178) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.SpawnerCreature.a(SpawnerCreature.java:154) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.ChunkProviderServer.tickChunks(ChunkProviderServer.java:1019) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.ChunkProviderServer.tick(ChunkProviderServer.java:915) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.WorldServer.doTick(WorldServer.java:832) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1434) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:387) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1283) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1009) ~[patched_1.16.4.jar:git-Purpur-956] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175) ~[patched_1.16.4.jar:git-Purpur-956]
[10:29:46] [Server thread/ERROR]: Suspected Plugins: [10:29:46] [Server thread/ERROR]: ExtraHardMode{enabled,ver=3.14.2-86dd7c6,path=plugins\ExtraHardMode.jar} [10:29:46] [Server thread/ERROR]: Exception details below: java.lang.NullPointerException: null at org.bukkit.craftbukkit.v1_16_R3.util.CraftNamespacedKey.fromMinecraft(CraftNamespacedKey.java:24) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlock.biomeBaseToBiome(CraftBlock.java:516) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at org.bukkit.craftbukkit.v1_16_R3.CraftWorld.getBiome(CraftWorld.java:1113) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlock.getBiome(CraftBlock.java:503) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at com.extrahardmode.features.monsters.CaveSpider.onEntitySpawn(CaveSpider.java:64) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor679.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:611) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:693) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:614) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.WorldServer.addEntity0(WorldServer.java:1658) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.WorldServer.addEntity(WorldServer.java:1559) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.WorldAccess.lambda$addAllEntities$0(WorldAccess.java:13) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) ~[?:?] at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?] at net.minecraft.server.v1_16_R3.WorldAccess.addAllEntities(WorldAccess.java:13) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.SpawnerCreature.spawnMobsInternal(SpawnerCreature.java:252) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.SpawnerCreature.spawnMobs(SpawnerCreature.java:178) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.SpawnerCreature.a(SpawnerCreature.java:154) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.ChunkProviderServer.tickChunks(ChunkProviderServer.java:1021) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.ChunkProviderServer.tick(ChunkProviderServer.java:915) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.WorldServer.doTick(WorldServer.java:839) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1449) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:397) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1294) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1015) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175) ~[1.16.5-patched.jar:git-Yatopia-ver/1.16.5-18] at java.lang.Thread.run(Thread.java:834) [?:?]
I also had errors relating to squid spawning too, when using Modern Beta datapack. I think it's because the plugin looks for minecraft:
namespaced ocean biomes, which may not exist with alternate world-gen. Some error-checking to silence this or emit a warning once might be good.
(Also fyi, if you're pasting logs, it's a good idea to use ```
(triple backticks) so that the line breaks are preserved)
I think it's because the plugin looks for minecraft: namespaced ocean biomes, which may not exist with alternate world-gen.
No. It's simply because Bukkit doesn't support/have enums for custom biomes.
The fix (which you kind of already alluded to) is to do null checks at the locations specified in the stacktraces. I just haven't had the time to dive in and do it (and it's a bit deprioritized since it doesn't affect behavior as far as I'm aware, it just creates a lot of useless noise in the logs), but anyone else is free to PR the relevant NPE checks. Should be as simple as ignoring/returning if (block#getBiome == null)