Fix race condition between inbound and injected packets (fixes #118)

In the case of #118, this was resulting in the EntityTrackerUpdate packet (which
contains info on which skin layers should be visible) sometimes ending up before
the SpawnPlayer packet, hence the players outer skin layers being invisible at
the start of the recording.
This commit is contained in:
Jonas Herzig
2020-04-06 15:10:32 +02:00
parent ee68a63233
commit b4a2c1b266
3 changed files with 17 additions and 0 deletions

View File

@@ -394,6 +394,14 @@ public class MCVer {
//#endif
}
public static void scheduleOnMainThread(Runnable runnable) {
//#if MC>=11400
getMinecraft().send(runnable);
//#else
//$$ getMinecraft().addScheduledTask(runnable);
//#endif
}
//#if MC>=11400
public static Window getWindow(MinecraftClient mc) {
//#if MC>=11500