@@ -48,9 +48,9 @@ public class CraftBossBar implements BossBar {
|
||||
|
||||
private void initialize() {
|
||||
this.flags = new HashMap<>();
|
||||
this.flags.put(BarFlag.DARKEN_SKY, new FlagContainer(handle::isDarkenSky, handle::setDarkenSky));
|
||||
this.flags.put(BarFlag.PLAY_BOSS_MUSIC, new FlagContainer(handle::isPlayMusic, handle::setPlayMusic));
|
||||
this.flags.put(BarFlag.CREATE_FOG, new FlagContainer(handle::isCreateFog, handle::setCreateFog));
|
||||
this.flags.put(BarFlag.DARKEN_SKY, new FlagContainer(handle::shouldDarkenScreen, handle::setDarkenScreen));
|
||||
this.flags.put(BarFlag.PLAY_BOSS_MUSIC, new FlagContainer(handle::shouldPlayBossMusic, handle::setPlayBossMusic));
|
||||
this.flags.put(BarFlag.CREATE_FOG, new FlagContainer(handle::shouldCreateWorldFog, handle::setCreateWorldFog));
|
||||
}
|
||||
|
||||
private BarColor convertColor(BossBattle.BarColor color) {
|
||||
@@ -103,7 +103,7 @@ public class CraftBossBar implements BossBar {
|
||||
@Override
|
||||
public void setTitle(String title) {
|
||||
handle.name = CraftChatMessage.fromString(title, true)[0];
|
||||
handle.sendUpdate(PacketPlayOutBoss::createUpdateNamePacket);
|
||||
handle.broadcast(PacketPlayOutBoss::createUpdateNamePacket);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,7 +114,7 @@ public class CraftBossBar implements BossBar {
|
||||
@Override
|
||||
public void setColor(BarColor color) {
|
||||
handle.color = convertColor(color);
|
||||
handle.sendUpdate(PacketPlayOutBoss::createUpdateStylePacket);
|
||||
handle.broadcast(PacketPlayOutBoss::createUpdateStylePacket);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,7 +125,7 @@ public class CraftBossBar implements BossBar {
|
||||
@Override
|
||||
public void setStyle(BarStyle style) {
|
||||
handle.overlay = convertStyle(style);
|
||||
handle.sendUpdate(PacketPlayOutBoss::createUpdateStylePacket);
|
||||
handle.broadcast(PacketPlayOutBoss::createUpdateStylePacket);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,22 +40,22 @@ public class CraftDragonBattle implements DragonBattle {
|
||||
|
||||
@Override
|
||||
public boolean generateEndPortal(boolean withPortals) {
|
||||
if (handle.portalLocation != null || handle.getExitPortalShape() != null) {
|
||||
if (handle.portalLocation != null || handle.findExitPortal() != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.handle.generateExitPortal(withPortals);
|
||||
this.handle.spawnExitPortal(withPortals);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasBeenPreviouslyKilled() {
|
||||
return handle.isPreviouslyKilled();
|
||||
return handle.hasPreviouslyKilledDragon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initiateRespawn() {
|
||||
this.handle.initiateRespawn();
|
||||
this.handle.tryRespawn();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,13 +71,13 @@ public class CraftDragonBattle implements DragonBattle {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.handle.setRespawnPhase(toNMSRespawnPhase(phase));
|
||||
this.handle.setRespawnStage(toNMSRespawnPhase(phase));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetCrystals() {
|
||||
this.handle.resetCrystals();
|
||||
this.handle.resetSpikeCrystals();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,7 @@ public class CraftKeyedBossbar extends CraftBossBar implements KeyedBossBar {
|
||||
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
return CraftNamespacedKey.fromMinecraft(getHandle().getKey());
|
||||
return CraftNamespacedKey.fromMinecraft(getHandle().getTextId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user