mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
66779f5c86
== AT == public net.minecraft.network.chat.HoverEvent$ItemStackInfo item public net.minecraft.network.chat.HoverEvent$ItemStackInfo count public net.minecraft.network.chat.HoverEvent$ItemStackInfo components public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult; Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
86 lines
3.6 KiB
Diff
86 lines
3.6 KiB
Diff
--- a/net/minecraft/world/BossEvent.java
|
|
+++ b/net/minecraft/world/BossEvent.java
|
|
@@ -13,6 +13,7 @@
|
|
protected boolean darkenScreen;
|
|
protected boolean playBossMusic;
|
|
protected boolean createWorldFog;
|
|
+ public net.kyori.adventure.bossbar.BossBar adventure; // Paper
|
|
|
|
public BossEvent(UUID uuid, Component name, BossEvent.BossBarColor color, BossEvent.BossBarOverlay style) {
|
|
this.id = uuid;
|
|
@@ -27,61 +28,75 @@
|
|
}
|
|
|
|
public Component getName() {
|
|
+ if (this.adventure != null) return io.papermc.paper.adventure.PaperAdventure.asVanilla(this.adventure.name()); // Paper
|
|
return this.name;
|
|
}
|
|
|
|
public void setName(Component name) {
|
|
+ if (this.adventure != null) this.adventure.name(io.papermc.paper.adventure.PaperAdventure.asAdventure(name)); // Paper
|
|
this.name = name;
|
|
}
|
|
|
|
public float getProgress() {
|
|
+ if (this.adventure != null) return this.adventure.progress(); // Paper
|
|
return this.progress;
|
|
}
|
|
|
|
public void setProgress(float percent) {
|
|
+ if (this.adventure != null) this.adventure.progress(percent); // Paper
|
|
this.progress = percent;
|
|
}
|
|
|
|
public BossEvent.BossBarColor getColor() {
|
|
+ if (this.adventure != null) return io.papermc.paper.adventure.PaperAdventure.asVanilla(this.adventure.color()); // Paper
|
|
return this.color;
|
|
}
|
|
|
|
public void setColor(BossEvent.BossBarColor color) {
|
|
+ if (this.adventure != null) this.adventure.color(io.papermc.paper.adventure.PaperAdventure.asAdventure(color)); // Paper
|
|
this.color = color;
|
|
}
|
|
|
|
public BossEvent.BossBarOverlay getOverlay() {
|
|
+ if (this.adventure != null) return io.papermc.paper.adventure.PaperAdventure.asVanilla(this.adventure.overlay()); // Paper
|
|
return this.overlay;
|
|
}
|
|
|
|
public void setOverlay(BossEvent.BossBarOverlay style) {
|
|
+ if (this.adventure != null) this.adventure.overlay(io.papermc.paper.adventure.PaperAdventure.asAdventure(style)); // Paper
|
|
this.overlay = style;
|
|
}
|
|
|
|
public boolean shouldDarkenScreen() {
|
|
+ if (this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.DARKEN_SCREEN); // Paper
|
|
return this.darkenScreen;
|
|
}
|
|
|
|
public BossEvent setDarkenScreen(boolean darkenSky) {
|
|
+ if (this.adventure != null) io.papermc.paper.adventure.PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.DARKEN_SCREEN, darkenSky); // Paper
|
|
this.darkenScreen = darkenSky;
|
|
return this;
|
|
}
|
|
|
|
public boolean shouldPlayBossMusic() {
|
|
+ if (this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.PLAY_BOSS_MUSIC); // Paper
|
|
return this.playBossMusic;
|
|
}
|
|
|
|
public BossEvent setPlayBossMusic(boolean dragonMusic) {
|
|
+ if (this.adventure != null) io.papermc.paper.adventure.PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.PLAY_BOSS_MUSIC, dragonMusic); // Paper
|
|
this.playBossMusic = dragonMusic;
|
|
return this;
|
|
}
|
|
|
|
public BossEvent setCreateWorldFog(boolean thickenFog) {
|
|
+ if (this.adventure != null) io.papermc.paper.adventure.PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.CREATE_WORLD_FOG, thickenFog); // Paper
|
|
this.createWorldFog = thickenFog;
|
|
return this;
|
|
}
|
|
|
|
public boolean shouldCreateWorldFog() {
|
|
+ if (this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.CREATE_WORLD_FOG); // Paper
|
|
return this.createWorldFog;
|
|
}
|
|
|