apace100 / origins-fabric

MIT License
175 stars 170 forks source link

1.21.x alpha 6 - players desync upon death and respawn #771

Open AUSASHI opened 3 weeks ago

AUSASHI commented 3 weeks ago

1.21 fabric server, hosted on a separate computer on a different network, connected through ip:port, i.e 12.3xx.xx.123:25565

error is as follows:

[10:34:48] [Server thread/INFO]: chat.type.admin //giving self lava bucket to kill self. [10:44:02] [Server thread/INFO]: death.attack.lava //killed self with lava. [10:44:03] [Server thread/ERROR]: Failed to handle packet net.minecraft.class_2799@4ab67433, suppressing error java.lang.NullPointerException: Cannot invoke "java.util.function.Consumer.accept(Object)" because "elseAction" is null at io.github.apace100.apoli.action.type.meta.IfElseActionType.action(IfElseActionType.java:24) ~[apoli-2.12.0-alpha.9+mc.1.21.x-c352a8bb1fef4a98.jar:?] at io.github.apace100.apoli.action.type.meta.IfElseActionType.lambda$getFactory$0(IfElseActionType.java:35) ~[apoli-2.12.0-alpha.9+mc.1.21.x-c352a8bb1fef4a98.jar:?] at io.github.apace100.apoli.action.factory.ActionTypeFactory.lambda$new$0(ActionTypeFactory.java:22) ~[apoli-2.12.0-alpha.9+mc.1.21.x-c352a8bb1fef4a98.jar:?] at io.github.apace100.apoli.action.factory.ActionTypeFactory$Instance.accept(ActionTypeFactory.java:58) ~[apoli-2.12.0-alpha.9+mc.1.21.x-c352a8bb1fef4a98.jar:?] at io.github.apace100.apoli.power.type.ActionOnCallbackPowerType.onRespawn(ActionOnCallbackPowerType.java:34) ~[apoli-2.12.0-alpha.9+mc.1.21.x-c352a8bb1fef4a98.jar:?] at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] at net.minecraft.class_3324.handler$zda000$apoli$invokeOnRespawnPowerCallback(class_3324.java:998) ~[server-intermediary.jar:?] at net.minecraft.class_3324.method_14556(class_3324.java:518) ~[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_18857(class_1255.java:145) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_18857(MinecraftServer.java:810) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:815) ~[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) [?:?] [10:44:18] [Server thread/INFO]: bigfloppa488 lost connection: multiplayer.disconnect.generic //disconnected through menu. [10:44:18] [Server thread/INFO]: multiplayer.player.left //left after confirming issue still exists.

explanation for my wording, not the best at english so i am sorry if some things do not make sense.

client means player client, the actual minecraft window that you interact with the world through. player means the player on the server. i will probably use host and server interchangeably, though host means the computer the server is hosted on and server is the server window.

upon respawn, player will "desync" from the server, and be unable to interact with the world besides using/modifying block entities (such as chests, enchant tables, barrels, etc.) player will remain in place for the most of the time in this "desync" state on the server, sometimes "teleporting" to where the client thinks it is, while the client itself will perceive itself moving freely. not too dissimilar from that boat glitch from years ago, where the client could move freely but the server would perceive the player in a boat.

player will be unable to interact with own inventory, the inventory window will open but not function as normal. inventory menu will open if chests and other block entities with inventories are interacted with, but player can't actually interact with any of the items, though the client will think it is able to. if keepinventory is true, the client will not respawn with items held prior to death, but the player will still "hold" these items on the server. (this is how i realized that something was definitely wrong after dying a few times prior.)

player and client can interact with the chat without issue.

the client will "die" multiple times in this state for the same reason the player died originally, seemingly at random intervals, though usually after 30 seconds but before 2 mintues. death is not recognized by the server console. upon "respawn" the player and the client will appear at the players spawn location, still in the "desync" state

issue persists through connecting/disconnecting, and restarting the server only works to mixed results, i don't believe it ever truly worked to remove a player from this state. deleting player data is the only way i've found to temporarily "fix" it, issue will re-appear upon death.

i've tested on three different servers, different mods, and tried using the origins mod by itself, and this issue still persists. only thing that has remained constant are the host computer, IP, and client.

eggohito commented 3 weeks ago

This is a known issue; more specifically, it has something to do with the if_else meta action type treating the supposed optional else_action field as required. This will be fixed in alpha 7 (until then, I'll keep this issue open)