[Dev Bug] Transfurring via absorption crashes the game.
bijimio opened this issue ยท 3 comments
As of the latest commit: When transfurring any humanoid entity by means of absorption, the game will crash. It doesn't matter what form the player is. However, absorbing a suited entity does not lead to a crash.
Here's a snippet from the log during the crash:
[07Jan2025 19:25:40.505] [Render thread/ERROR] [net.minecraft.client.Minecraft/FATAL]: Unreported exception thrown!
java.lang.ClassCastException: class net.minecraft.client.multiplayer.ClientChunkCache cannot be cast to class net.minecraft.server.level.ServerChunkCache (net.minecraft.client.multiplayer.ClientChunkCache and net.minecraft.server.level.ServerChunkCache are in module [email protected] of loader 'TRANSFORMER' @6cbd0674)
at net.minecraftforge.network.PacketDistributor.lambda$trackingEntityAndSelf$7(PacketDistributor.java:234) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2379%2386!/:?]
at net.minecraftforge.network.PacketDistributor$PacketTarget.send(PacketDistributor.java:165) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2379%2386!/:?]
at net.minecraftforge.network.simple.SimpleChannel.send(SimpleChannel.java:116) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2379%2386!/:?]
at net.ltxprogrammer.changed.init.ChangedAnimationEvents.broadcastTransfurAnimation(ChangedAnimationEvents.java:47) ~[%2385!/:?]
at net.ltxprogrammer.changed.entity.ChangedEntity.tryAbsorbTarget(ChangedEntity.java:600) ~[%2385!/:?]
at net.ltxprogrammer.changed.entity.ChangedEntity.tryFuseWithTarget(ChangedEntity.java:754) ~[%2385!/:?]
at net.ltxprogrammer.changed.entity.ChangedEntity.tryTransfurTarget(ChangedEntity.java:774) ~[%2385!/:?]
at net.minecraft.world.entity.player.Player.md6cce5b$lambda$transfurAttack$1$3(Player.java:2277) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.ltxprogrammer.changed.process.ProcessTransfur.ifPlayerTransfurred(ProcessTransfur.java:481) ~[%2385!/:?]
at net.minecraft.world.entity.player.Player.handler$zbg000$transfurAttack(Player.java:2270) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.world.entity.player.Player.attack(Player.java) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.client.multiplayer.MultiPlayerGameMode.attack(MultiPlayerGameMode.java:360) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.client.Minecraft.startAttack(Minecraft.java:1504) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.client.Minecraft.handleKeybinds(Minecraft.java:1851) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.client.Minecraft.tick(Minecraft.java:1670) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1021) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:665) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at net.minecraft.client.main.Main.main(Main.java:205) ~[forge-1.18.2-40.2.4_mapped_official_1.18.2.jar%2380!/:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:24) ~[fmlloader-1.18.2-40.2.4.jar%230!/:?]
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%2313!/:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%2313!/:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%2313!/:?]
at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%2313!/:?]
at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%2313!/:?]
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%2313!/:?]
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%2313!/:?]
at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]
[07Jan2025 19:25:40.929] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server
[07Jan2025 19:25:40.931] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving players
[07Jan2025 19:25:40.941] [Server thread/INFO] [net.minecraft.server.network.ServerGamePacketListenerImpl/]: Dev lost connection: Disconnected
[07Jan2025 19:25:40.942] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dev left the game
[07Jan2025 19:25:40.952] [Server thread/INFO] [net.minecraft.server.network.ServerGamePacketListenerImpl/]: Stopping singleplayer server as player logged out
[07Jan2025 19:25:40.952] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving worlds
[07Jan2025 19:25:41.565] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[testone]'/minecraft:overworld
[07Jan2025 19:25:41.588] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[testone]'/minecraft:the_end
[07Jan2025 19:25:41.589] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[testone]'/minecraft:the_nether
[07Jan2025 19:25:41.608] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (testone): All chunks are saved
[07Jan2025 19:25:41.608] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[07Jan2025 19:25:41.608] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[07Jan2025 19:25:41.608] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage: All dimensions are saved
[07Jan2025 19:25:41.684] [Render thread/INFO] [com.mojang.blaze3d.platform.GlDebug/]: OpenGL debug message: id=6, source=API, type=ERROR, severity=HIGH, message='GL_INVALID_OPERATION in glBufferData(immutable)'
[07Jan2025 19:25:41.687] [Render thread/INFO] [ChunkBuilder/]: Stopping worker threads
[07Jan2025 19:25:41.986] [Finalizer/WARN] [ModernFix/]: One or more BufferBuilders have been leaked, ModernFix will attempt to correct this.
[07Jan2025 19:25:41.995] [Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID 7b154864-653e-423d-8af5-d6e20753ea4
[07Jan2025 19:25:42.000] [Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID af9fbbd7-e42b-41da-8f1e-4b1eb0548fe1