senseiwells / ServerReplay

A completely server-side implementation of the replay mod, this mod allows you to record multiple players that are online on a server at a time, as well as any given chunk area. This will produce replay files which can then be used with the replay mod for rendering.
MIT License
87 stars 9 forks source link

When the mod is set to record all players, players cannot join the game. #12

Closed RedSnailMC closed 6 months ago

RedSnailMC commented 6 months ago

Overview of issues

I want to record all players with this mod, but when I set "player_predicate" to "all" in the config file, the message "Invalid player data" pops up when a player joins. The server version is 1.20.1, but when I try to use the 1.20.4 server, the problem persists.

Server log:

[09:00:59] [Server thread/INFO]: Started replay for RedSnailMC [09:00:59] [Server thread/INFO]: RedSnailMC[/127.0.0.1:5788] logged in with entity id 182 at (208.5, 68.0, 240.5) [09:01:00] [Server thread/INFO]: RedSnailMC joined the game [09:01:00] [Server thread/ERROR]: Couldn't place player in world java.lang.NullPointerException: null cannot be cast to non-null type me.senseiwells.replay.mixin.rejoin.TrackedEntityAccessor at me.senseiwells.replay.player.PlayerRecorder.getPlayerServerEntity(PlayerRecorder.kt:134) ~[ServerReplay-1.0.5+mc1.20.1.jar:?] at me.senseiwells.replay.player.PlayerRecorder.spawnPlayer(PlayerRecorder.kt:64) ~[ServerReplay-1.0.5+mc1.20.1.jar:?] at me.senseiwells.replay.recorder.ReplayRecorder.postPacket(ReplayRecorder.kt:304) ~[ServerReplay-1.0.5+mc1.20.1.jar:?] at me.senseiwells.replay.recorder.ReplayRecorder.record(ReplayRecorder.kt:141) ~[ServerReplay-1.0.5+mc1.20.1.jar:?] at net.minecraft.class_3244.handler$zpg000$server-replay$onPacket(class_3244.java:5966) ~[server-intermediary.jar:?] at net.minecraft.class_3244.method_14369(class_3244.java) ~[server-intermediary.jar:?] at net.minecraft.class_3244.method_14364(class_3244.java:1248) ~[server-intermediary.jar:?] at net.minecraft.class_3324.method_14581(class_3324.java:580) ~[server-intermediary.jar:?] at net.minecraft.class_3324.method_14570(class_3324.java:248) ~[server-intermediary.jar:?] at net.minecraft.class_3248.method_33800(class_3248.java:131) ~[server-intermediary.jar:?] at net.minecraft.class_3248.method_14384(class_3248.java:118) ~[server-intermediary.jar:?] at net.minecraft.class_3248.redirect$zlo000$fabric-networking-api-v1$handlePlayerJoin(class_3248.java:563) ~[server-intermediary.jar:?] at net.minecraft.class_3248.method_18784(class_3248.java:68) ~[server-intermediary.jar:?] at net.minecraft.class_2535.method_10754(class_2535.java:259) ~[server-intermediary.jar:?] at net.minecraft.class_3242.method_14357(class_3242.java:172) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:908) ~[server-intermediary.jar:?] at net.minecraft.class_3176.method_3813(class_3176.java:283) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:824) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.handler$zbf000$carpet$modifiedRunLoop(MinecraftServer.java:6442) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:650) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265) ~[server-intermediary.jar:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] [09:01:00] [Server thread/INFO]: RedSnailMC lost connection: Invalid player data [09:01:00] [Server thread/INFO]: RedSnailMC left the game [09:01:00] [Server thread/WARN]: handleDisconnection() called twice [09:01:00] [pool-4-thread-1/INFO]: Successfully closed replay and saved to .\recordings\players\25257183-0d08-3335-b5c2-c23d1f721f06\2024-02-27--09-01-00.mcpr

Mod Version (1.20.1)

ServerReplay: 1.0.5 Fabric-API: 0.91.1 Fabric-Language-Kotlin: 1.10.18+kotlin.1.9.22

senseiwells commented 6 months ago

Thank you, this has now been fixed, you can download it here