BedrockActionTranslator: Fix occasional death stall (#1432)

Usually this happened when joining from another dimension after the player exited to the main menu on the death screen. The player would not realize that they are dead.
This commit is contained in:
Camotoy 2020-10-29 16:44:45 -04:00 committed by GitHub
parent a2a7e99402
commit 9b46bf8bc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,6 +68,8 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
eventPacket.setType(EntityEventType.RESPAWN);
eventPacket.setData(0);
session.sendUpstreamPacket(eventPacket);
// Resend attributes or else in rare cases the user can think they're not dead when they are, upon joining the server
entity.updateBedrockAttributes(session);
break;
case START_SWIMMING:
ClientPlayerStatePacket startSwimPacket = new ClientPlayerStatePacket((int) entity.getEntityId(), PlayerState.START_SPRINTING);