The Twilight Forest

The Twilight Forest

143M Downloads

Crash in Overworld: WorldClient cannot be cast to WorldServer

RealGrep opened this issue ยท 1 comments

commented

Forge version: 14.22.0.2467 (for 1.12.1)
Twilight Forest version: From Github, ~Sept. 1st
Link to crash log: https://pastebin.com/0vfcAZ2u

The stack trace shows this exception happening within TF code. This is from a recent Github cloning for 1.12.x. Hope you don't mind posting this crash for that development version, but I figured there seemed to be a bug, and it might save some trouble in the future if you knew about it now. Thanks, and looking good so far. Good job!

Steps to reproduce:

  1. Put storage drawer on ground,
  2. Try and pick it up with Chest Transporter.

What I expected to happen:
The usual pick up the storage drawer with the chest transporter item.

What happened instead:
Full crash, and this message (truncated):

java.lang.ClassCastException: net.minecraft.client.multiplayer.WorldClient cannot be cast to net.minecraft.world.WorldServer
	at twilightforest.world.TFWorld.getChunkGenerator(TFWorld.java:13)

There's a call to cubex2.mods.chesttransporter.ItemChestTransporter.onItemUseFirst a little up the call stack (from Chest Transporter). Event seems to trigger your TFEventListener.breakBlock method, and then this trickles down to a bad cast attempt in TFWorld.getChunkGenerator from WorldClient to WorldServer, hence the exception.

Anyway, I don't know your code or much about Minecraft modding. Just my read of the stack trace. I was playing single player, if that helps.

commented