Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main/java/com/moulberry/flashback/record/Recorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,14 @@ public void writePacketAsync(Packet<?> packet, ConnectionProtocol phase) {

LocalPlayer localPlayer = Minecraft.getInstance().player;
if (localPlayer != null) {
int localPlayerId = localPlayer.getId();
int localPlayerId;
try {
localPlayerId = localPlayer.getId();
} catch (IllegalStateException e) {
// Player exists but has no entity id yet. Happens on proxied servers while the
// client is being moved between backends.
localPlayerId = -1;
}
if (packet instanceof ClientboundSetEntityDataPacket entityDataPacket && entityDataPacket.id() == localPlayerId) {
return;
}
Expand Down