Dungeon Crawl

Dungeon Crawl

51M Downloads

Issue with Enderman spawners cages throwing NBT error

mactso opened this issue ยท 2 comments

commented

This is a basic problem with Minecraft starting in 1.16.1
They use the enderman on the client side to display endermen in spawning cages but in the Enderman code they are unconditionally casting the world as a (serverworld) and this is causing a torrent of "WARN" errors.

The result is a lot of Warning error messages in the log.

Lupicus says this is an error in Minecraft was probably not caught because there are no Enderman spawner cages in Vanilla Minecraft. Until they fix this code in the Enderman in minecraft, it will need an ASM fix to the Enderman code to replace this casting of the world to ServerWorld without checking if it is a client call to display the enderman in the cage.

Here's the error message.
net.minecraft.crash.ReportedException: Loading entity NBT
at net.minecraft.entity.Entity.func_70020_e(Entity.java:1487) ~[?:?]
at net.minecraft.entity.EntityType.lambda$loadEntityUnchecked$2(EntityType.java:452) ~[?:?]
at net.minecraft.entity.EntityType$$Lambda$7582/396578945.accept(Unknown Source) ~[?:?]
at net.minecraft.util.Util.func_215077_a(SourceFile:401) ~[?:?]
at net.minecraft.entity.EntityType.func_220330_a(EntityType.java:449) ~[?:?]
at net.minecraft.entity.EntityType.func_220343_b(EntityType.java:507) [?:?]
at net.minecraft.entity.EntityType.func_220335_a(EntityType.java:489) [?:?]
at net.minecraft.world.spawner.AbstractSpawner.func_184994_d(AbstractSpawner.java:252) [?:?]
at net.minecraft.client.renderer.tileentity.MobSpawnerTileEntityRenderer.func_225616_a_(SourceFile:22) [?:?]
at net.minecraft.client.renderer.tileentity.MobSpawnerTileEntityRenderer.func_225616_a_(SourceFile:12) [?:?]
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_228855_a_(TileEntityRendererDispatcher.java:101) [?:?]
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.lambda$renderTileEntity$0(TileEntityRendererDispatcher.java:85) [?:?]
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher$$Lambda$8495/1408173964.run(Unknown Source) [?:?]
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_228853_a_(TileEntityRendererDispatcher.java:118) [?:?]
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_228850_a_(TileEntityRendererDispatcher.java:84) [?:?]
at net.minecraft.client.renderer.WorldRenderer.func_228426_a_(WorldRenderer.java:1017) [?:?]
at net.minecraft.client.renderer.GameRenderer.func_228378_a_(GameRenderer.java:601) [?:?]
at net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:422) [?:?]
at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:951) [?:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:582) [?:?]
at net.minecraft.client.main.Main.main(Main.java:184) [?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.1-32.0.108.jar:32.0]
at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$473/917190676.call(Unknown Source) [forge-1.16.1-32.0.108.jar:32.0]
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-6.1.1.jar:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-6.1.1.jar:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-6.1.1.jar:?]
at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-6.1.1.jar:?]
at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-6.1.1.jar:?]
Caused by: java.lang.ClassCastException: net.minecraft.client.world.ClientWorld cannot be cast to net.minecraft.world.server.ServerWorld
at net.minecraft.entity.monster.EndermanEntity.func_70037_a(EndermanEntity.java:186) ~[?:?]
at net.minecraft.entity.Entity.func_70020_e(Entity.java:1472) ~[?:?]
... 31 more

You can duplicate this easily with no mod by creating a generic spawn cage and clicking an enderman Egg on the spawn cage.

I'll enter a ticket to Minecraft or see if they have one on this already.

commented

I found this is an resolved bug but only for minecraft version 17.
https://bugs.mojang.com/browse/MC-189565

Bee
Enderman
Polar Bear
Wolf
Zombified Piglin
Evoker Fangs

You might want to consider someway to turn these cages off to prevent

commented

Lupicus has written a bug patch for this for Endermen.
"Spawner Bug Fix".
I've tested the 1.16.1 version with Dungeon Crawl and generic spawner cage+enderman egg successfully.
I submitted it for approval a few minutes ago. It will require a separate 1.16.2 version because the Pack files have a different format. It should be ready later tonight.
Cheers.