Commits

md_5 authored 63df70ec06c
Rebuild patches to fix decompilation of certain nested loops
No tags

nms-patches/net/minecraft/server/bossevents/BossBattleCustom.patch

Modified
1 1 --- a/net/minecraft/server/bossevents/BossBattleCustom.java
2 2 +++ b/net/minecraft/server/bossevents/BossBattleCustom.java
3 -@@ -19,6 +19,11 @@
3 +@@ -18,6 +18,11 @@
4 4 import net.minecraft.util.MathHelper;
5 5 import net.minecraft.world.BossBattle;
6 6
7 7 +// CraftBukkit start
8 8 +import org.bukkit.boss.KeyedBossBar;
9 9 +import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
10 10 +// CraftBukkit end
11 11 +
12 12 public class BossBattleCustom extends BossBattleServer {
13 13
14 14 private static final int DEFAULT_MAX = 100;
15 -@@ -26,6 +31,16 @@
15 +@@ -25,6 +30,16 @@
16 16 private final Set<UUID> players = Sets.newHashSet();
17 17 private int value;
18 18 private int max = 100;
19 19 + // CraftBukkit start
20 20 + private KeyedBossBar bossBar;
21 21 +
22 22 + public KeyedBossBar getBukkitEntity() {
23 23 + if (bossBar == null) {
24 24 + bossBar = new CraftKeyedBossbar(this);
25 25 + }
26 26 + return bossBar;
27 27 + }
28 28 + // CraftBukkit end
29 29
30 30 public BossBattleCustom(MinecraftKey minecraftkey, IChatBaseComponent ichatbasecomponent) {
31 31 super(ichatbasecomponent, BossBattle.BarColor.WHITE, BossBattle.BarStyle.PROGRESS);
32 -@@ -168,7 +183,7 @@
32 +@@ -145,7 +160,7 @@
33 33 bossbattlecustom.setDarkenScreen(bossbattlecustom_a.darkenScreen);
34 34 bossbattlecustom.setPlayBossMusic(bossbattlecustom_a.playBossMusic);
35 35 bossbattlecustom.setCreateWorldFog(bossbattlecustom_a.createWorldFog);
36 36 - Set set = bossbattlecustom_a.players;
37 37 + Set<UUID> set = bossbattlecustom_a.players; // CraftBukkit - decompile error
38 38
39 39 Objects.requireNonNull(bossbattlecustom);
40 40 set.forEach(bossbattlecustom::addOfflinePlayer);

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut