Kibe Utilities

Kibe Utilities

8M Downloads

Entangled chest / tank crash

aria1th opened this issue ยท 1 comments

commented

crash-2022-05-03_15.13.36-server.txt

shortly
java.lang.ClassCastException: class io.github.lucaargolo.kibe.blocks.entangledchest.EntangledChestState cannot be cast to class io.github.lucaargolo.kibe.blocks.entangledtank.EntangledTankState (io.github.lucaargolo.kibe.blocks.entangledchest.EntangledChestState and io.github.lucaargolo.kibe.blocks.entangledtank.EntangledTankState are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @68837a77) at io.github.lucaargolo.kibe.KibeModKt.initExtras$lambda-20(KibeMod.kt:186) ~[kibe-1.9.6-BETA+1.18.jar:?]

It happens when player opens inventory which contains entangled tank & chest binded to player somehow.

commented

Additional Context : I added try catch phrase and searched what is causing it .

so entangledchest is trying to be casted to entangled tank.

[15:39:17] [Server thread/INFO]: [STDOUT]: entangledchest-35f9507c-d203-48bc-8d8c-bdcd65d6b05b [15:39:17] [Server thread/INFO]: [STDOUT]: 06000000 [15:39:17] [Server thread/INFO]: [STDOUT]: class_3222['AngelBottomless'/458, l='ServerLevel[world]', x=164.46, y=120.38, z=599.98] [15:39:17] [Server thread/INFO]: [STDOUT]: [(entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00000060), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 09000000), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00400000), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00000020), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00b0000f), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00a0000f), (entangledchest-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 06000000), (entangledtank-global, 00000000)]

which came from EntangledTankState.SERVER_PLAYER_REQUESTS, somehow chest is registered to tank state requests, by

       ` EntangledTankState.SERVER_PLAYER_REQUESTS[player] = set`

in fun initPackets()

so it should check if packet really contains valid informations about tanks.
if (!first.contains("chest")){ set.add(Pair(first, second)) }

In conclusion, client is sending packet about 'chest' in tank somehow, then server crashes.