diff options
author | syeyoung <cyong06@naver.com> | 2021-01-30 18:41:30 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-01-30 18:41:30 +0900 |
commit | 1e092bb06afd70a58d5aa56dc1aba96fbc79150a (patch) | |
tree | 06322b72eb321e3dbe309414ee49d42182352355 /src/main | |
parent | 7fc7b45713e3a84cb3dd4455fa516359e49a2e43 (diff) | |
download | Skyblock-Dungeons-Guide-1e092bb06afd70a58d5aa56dc1aba96fbc79150a.tar.gz Skyblock-Dungeons-Guide-1e092bb06afd70a58d5aa56dc1aba96fbc79150a.tar.bz2 Skyblock-Dungeons-Guide-1e092bb06afd70a58d5aa56dc1aba96fbc79150a.zip |
Thorn upgrade 2
Diffstat (limited to 'src/main')
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java index c1ca2882..c62ce149 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java @@ -15,7 +15,7 @@ import java.util.List; public class FeatureThornBearPercentage extends GuiFeature { public FeatureThornBearPercentage() { - super("Bossfight", "Display Spirit Bear Summon Percentage", "Displays spirit bear summon percentage in hud", "bossfight.spiritbear", true, getFontRenderer().getStringWidth("Spirit Bear: 50%"), getFontRenderer().FONT_HEIGHT); + super("Bossfight", "Display Spirit Bear Summon Percentage", "Displays spirit bear summon percentage in hud", "bossfight.spiritbear", true, getFontRenderer().getStringWidth("Spirit Bear: 100%"), getFontRenderer().FONT_HEIGHT); this.setEnabled(true); parameters.put("color", new FeatureParameter<Color>("color", "Color", "Color of text", Color.orange, "color")); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java index f4e9435e..5732d68c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java @@ -36,13 +36,14 @@ public class BossfightProcessorThorn extends GeneralBossfightProcessor { @Override public void tick() { - ticksPassed++; + ticksPassed ++; if (ticksPassed == 20) { + progressBar.clear(); for (int x = -30; x <= 30; x++) { for (int y = -30; y <= 30; y++) { BlockPos newPos = new BlockPos(205 + x, 77, 205 + y); Block b = w.getBlockState(newPos).getBlock(); - if (b == Blocks.coal_block || b == Blocks.sea_lantern) + if ((b == Blocks.coal_block || b == Blocks.sea_lantern) && w.getBlockState(newPos.add(0, 1, 0)).getBlock() != Blocks.carpet) progressBar.add(newPos); } } @@ -60,8 +61,9 @@ public class BossfightProcessorThorn extends GeneralBossfightProcessor { int total = progressBar.size(), lit = 0; if (total == 0) return 0; for (BlockPos pos : progressBar) { - if (w.getBlockState(pos).getBlock() == Blocks.prismarine) lit++; + if (w.getBlockState(pos).getBlock() == Blocks.sea_lantern ) lit++; } + return lit / (double)total; } |