3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-01 23:50:11 +02:00

Fix boss bars not showing up on dimension switch

Dieser Commit ist enthalten in:
Camotoy 2023-05-07 02:59:44 -04:00
Ursprung 6e9b272f50
Commit 0d25a3f04d
2 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -155,6 +155,14 @@ public class EntityCache {
}
}
/**
* Re-adds all boss bars to the client by re-creating the entities attached to them.
* This seems to fix boss bars showing up on dimension switch, as of Bedrock 1.19.81.
*/
public void addBossBars() {
bossBars.values().forEach(BossBar::addBossBar);
}
public void updateBossBars() {
bossBars.values().forEach(BossBar::updateBossBar);
}

Datei anzeigen

@ -238,7 +238,7 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
attributesPacket.getAttributes().addAll(entity.getAttributes().values());
session.sendUpstreamPacket(attributesPacket);
session.getEntityCache().updateBossBars();
session.getEntityCache().addBossBars();
break;
case JUMP:
entity.setOnGround(false); // Increase block break time while jumping