The Twilight Forest

The Twilight Forest

143M Downloads

[1.12.2]client crash

yuanjie000 opened this issue ยท 3 comments

commented

Forge version: forge-1.12.2-14.23.0.2517-universal
Twilight Forest version: (this is the build number) twilightforest-1.12.2-3.3.202-universal
Link to crash log: crash
Steps to reproduce:

  1. When I fight with the Yeti, client crash
commented

The crash appears to be caused by the fallTile field being null, which appears to be the case on clients when the entity is spawned in response to a "spawn entity" packet.

Vanilla falling blocks are handled by the vanilla packet system, but as the falling ice is a modded entity, it is processed by Forge and doesn't get the same treatment, even if it extends the class.

(See how packets are made by EntityTracketEntry.createSpawnPacket, also NetHandlerPlayClient.handleSpawnObject for vanilla packet handling and EntitySpawnHandler.spawnEntity for the modded equivalent)

Recommended fix is to make EntityTFFallingIce implement IEntityAdditionalSpawnData and use the writeSpawnData and readSpawnData functions to synch the fallTile field.

commented

In this case, you could also just manually set fallTile in the EntityTFFallingIce(World) constructor, as the value is fixed.

commented

same issue as #47