mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix boss bars not showing up on dimension switch
This commit is contained in:
parent
6e9b272f50
commit
0d25a3f04d
2 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue