Skip to content

Commit

Permalink
Fix #5162
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed Nov 24, 2024
1 parent 2ebce9c commit 5250915
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,13 @@ public void translate(GeyserSession session, ClientboundRecipeBookAddPacket pack
}
}

session.sendUpstreamPacket(craftingDataPacket);
session.sendUpstreamPacket(recipesPacket);
if (!recipesPacket.getUnlockedRecipes().isEmpty()) {
// Sending an empty list here will crash the client as of 1.20.60
// This was definitely in the codebase the entire time and did not
// accidentally get refactored out during Java 1.21.3. :)
session.sendUpstreamPacket(craftingDataPacket);
session.sendUpstreamPacket(recipesPacket);
}
session.getLastRecipeNetId().set(netId);

// Multi-version can mean different Bedrock item IDs
Expand Down

0 comments on commit 5250915

Please sign in to comment.