Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 08:30:12 +01:00
Fix boss bars not showing up on dimension switch
Dieser Commit ist enthalten in:
Ursprung
6e9b272f50
Commit
0d25a3f04d
@ -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() {
|
public void updateBossBars() {
|
||||||
bossBars.values().forEach(BossBar::updateBossBar);
|
bossBars.values().forEach(BossBar::updateBossBar);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
|
|||||||
attributesPacket.getAttributes().addAll(entity.getAttributes().values());
|
attributesPacket.getAttributes().addAll(entity.getAttributes().values());
|
||||||
session.sendUpstreamPacket(attributesPacket);
|
session.sendUpstreamPacket(attributesPacket);
|
||||||
|
|
||||||
session.getEntityCache().updateBossBars();
|
session.getEntityCache().addBossBars();
|
||||||
break;
|
break;
|
||||||
case JUMP:
|
case JUMP:
|
||||||
entity.setOnGround(false); // Increase block break time while jumping
|
entity.setOnGround(false); // Increase block break time while jumping
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren