FarPlaneTwo

FarPlaneTwo

18.5k Downloads

java.lang.ClassCastException: net.minecraft.world.WorldServer cannot be cast to net.daporkchop.fp2.mode.api.ctx.IFarWorldServer

singlerr opened this issue ยท 3 comments

commented

Error thrown when join a world in minecraft run by gradle task "runClient"

Environment:
Windows 10
Jdk 8
Intellij

Error log:

java.lang.ClassCastException: net.minecraft.world.WorldServer cannot be cast to net.daporkchop.fp2.mode.api.ctx.IFarWorldServer at net.daporkchop.fp2.server.ServerEvents.worldLoad(ServerEvents.java:68) ~[ServerEvents.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_16_ServerEvents_worldLoad_Load.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:132) [IntegratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:156) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271] [16:07:19] [Server thread/ERROR] [FML]: Index: 3 Listeners: [16:07:19] [Server thread/ERROR] [FML]: 0: HIGHEST [16:07:19] [Server thread/ERROR] [FML]: 1: ASM: net.minecraftforge.common.ForgeInternalHandler@451431d2 onDimensionLoad(Lnet/minecraftforge/event/world/WorldEvent$Load;)V [16:07:19] [Server thread/ERROR] [FML]: 2: NORMAL [16:07:19] [Server thread/ERROR] [FML]: 3: ASM: class net.daporkchop.fp2.server.ServerEvents worldLoad(Lnet/minecraftforge/event/world/WorldEvent$Load;)V [16:07:19] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception java.lang.ClassCastException: net.minecraft.world.WorldServer cannot be cast to net.daporkchop.fp2.mode.api.ctx.IFarWorldServer at net.daporkchop.fp2.server.ServerEvents.worldLoad(ServerEvents.java:68) ~[ServerEvents.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_16_ServerEvents_worldLoad_Load.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:132) ~[IntegratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:156) ~[IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271] [16:07:19] [Server thread/ERROR] [minecraft/MinecraftServer]: This crash report has been saved to: D:\ProjectStorage\IdeaProjects\FarPlaneTwo\run\.\crash-reports\crash-2022-11-13_16.07.19-server.txt [16:07:19] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [16:07:19] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [16:07:19] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [16:07:19] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'New World'/overworld [16:07:19] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save New World [16:07:19] [Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.world.WorldEvent$Unload@67fb8e3e: java.lang.ClassCastException: net.minecraft.world.WorldServer cannot be cast to net.daporkchop.fp2.mode.api.ctx.IFarWorldServer at net.daporkchop.fp2.server.ServerEvents.worldUnload(ServerEvents.java:75) ~[ServerEvents.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_14_ServerEvents_worldUnload_Unload.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:452) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:372) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:579) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271] [16:07:19] [Server thread/ERROR] [FML]: Index: 3 Listeners: [16:07:19] [Server thread/ERROR] [FML]: 0: HIGHEST [16:07:19] [Server thread/ERROR] [FML]: 1: ASM: net.minecraftforge.common.ForgeInternalHandler@451431d2 onDimensionUnload(Lnet/minecraftforge/event/world/WorldEvent$Unload;)V [16:07:19] [Server thread/ERROR] [FML]: 2: NORMAL [16:07:19] [Server thread/ERROR] [FML]: 3: ASM: class net.daporkchop.fp2.server.ServerEvents worldUnload(Lnet/minecraftforge/event/world/WorldEvent$Unload;)V [16:07:19] [Server thread/ERROR] [minecraft/MinecraftServer]: Exception stopping the server java.lang.ClassCastException: net.minecraft.world.WorldServer cannot be cast to net.daporkchop.fp2.mode.api.ctx.IFarWorldServer at net.daporkchop.fp2.server.ServerEvents.worldUnload(ServerEvents.java:75) ~[ServerEvents.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_14_ServerEvents_worldUnload_Unload.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?] at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:452) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:372) ~[IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:579) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271]

commented

Looks to me like (some) mixins aren't being applied. Can you send a full debug log?

commented

Looks to me like (some) mixins aren't being applied. Can you send a full debug log?

Sure,
log.txt

commented

I've found that the problem caused by coremod.
In task "runClient", coremod is not loaded. I've solved by creating another coremod that execute FP2MixinLoader after loading FP2