B1n-ry / Youre-in-grave-danger

A minecraft mod which adds one single block. The grave, which will generate when you die, and store your items
https://www.curseforge.com/minecraft/mc-mods/youre-in-grave-danger
MIT License
65 stars 18 forks source link

Packet Handler Error, Suppressing Error: Infitnity Death Spawn Bug #184

Closed suerion closed 5 days ago

suerion commented 1 week ago

Hey, we got an Issue on our Server, allways on Respawn event, there will be an Error Surppressed by an Mod from me, because it is an Error on Packet Handler on Respawning.

If i disable the Packet Suppressing Mod, it would Disconnect the Client after Respawn.

[15:20:35] [Server thread/INFO]: Suerion  <Overworld> was slain by [Uncommon] Healthy Zombie
[15:20:35] [Server thread/INFO]: No grave backup generated (empty grave)
[15:20:37] [Server thread/ERROR]: Failed to handle packet net.minecraft.class_2799@69491fc4, suppressing error
java.util.NoSuchElementException: null
        at java.base/java.util.ArrayList.getLast(ArrayList.java:454) ~[?:?]
        at com.b1n_ry.yigd.components.RespawnComponent.apply(RespawnComponent.java:101) ~[youre-in-grave-danger-fabric-2.4.9.jar:?]
        at com.b1n_ry.yigd.events.ServerEventHandler.lambda$registerEvents$1(ServerEventHandler.java:41) ~[youre-in-grave-danger-fabric-2.4.9.jar:?]
        at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
        at com.b1n_ry.yigd.events.ServerEventHandler.lambda$registerEvents$3(ServerEventHandler.java:41) ~[youre-in-grave-danger-fabric-2.4.9.jar:?]
        at net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents.lambda$static$2(ServerPlayerEvents.java:45) ~[fabric-entity-events-v1-1.7.0+2122d82819-da520e6743481c54.jar:?]
        at net.minecraft.class_3324.handler$cka000$fabric-entity-events-v1$afterRespawn(class_3324.java:6505) ~[server-intermediary.jar:?]
        at net.minecraft.class_3324.method_14556(class_3324.java:530) ~[server-intermediary.jar:?]
        at net.minecraft.class_3244.method_12068(class_3244.java:1672) ~[server-intermediary.jar:?]
        at net.minecraft.class_2799.method_12120(class_2799.java:32) ~[server-intermediary.jar:?]
        at net.minecraft.class_2799.method_11054(class_2799.java:8) ~[server-intermediary.jar:?]
        at net.minecraft.class_2600.method_11072(class_2600.java:27) ~[server-intermediary.jar:?]
        at net.minecraft.class_3738.run(class_3738.java:18) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_18859(class_1255.java:162) ~[server-intermediary.jar:?]
        at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:864) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:173) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_16075(class_1255.java:136) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:846) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:840) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_5383(class_1255.java:121) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:814) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:702) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281) ~[server-intermediary.jar:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

Server Latest.log latest.log

B1n-ry commented 1 week ago

This seems odd... I can see this being an issue if you died with a completely empty inventory your first time dying in a world, so I'll fix that, but I can't see how that would only crash the client. I'm even more clueless to why this would always crash the client. Have the players who crashed not generated a grave before?

suerion commented 1 week ago

Hey, not crashing, it only disconnect the client from the server.

Had an packet fixer here, that not disconnect the player. It surpress the Issue only,

I think, the Spawn, Death, Spawn, Death rotation is for the Packet Handler an issue, that he kick the player from the server

B1n-ry commented 1 week ago

That might be why actually. Does it only happen to one specific player that has no previous grave (even claimed)?

suerion commented 1 week ago

Hey, i had here an Dev enviroment, i will let try other players, if that happens also, i will come back a little later with an answere

B1n-ry commented 1 week ago

I just wanted to know if it had happened to more people than someone dying for their first time with an empty inventory. If not, I can be confident that I know what went wrong, and be able to fix it. There's no need to gather more information that what you already have

suerion commented 1 week ago

Yeah, but i think, if i could help, i would be helpful :) because all devs from the mods are so awesome, i could read, some code, i could read, some stacktrace, i think this is more helpful for you devs :)

B1n-ry commented 1 week ago

I like the initiative, however I am pretty sure I know what is wrong, and how to fix it. I just thought I didn't from your first message, as I thought it happened to multiple people who had died and had graves generated before. But now it seems more like it was just a repeated case for one player in a sort of specific case

suerion commented 1 week ago

I like the initiative, however I am pretty sure I know what is wrong, and how to fix it. I just thought I didn't from your first message, as I thought it happened to multiple people who had died and had graves generated before. But now it seems more like it was just a repeated case for one player in a sort of specific case

Ah yeah it was only 1 player, it happens after the death, it tries allways do respawn the player again. Spawn Death Spawn Death -> Without Packet Handler Disconnect,

B1n-ry commented 5 days ago

It's now fixed in the newest release