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/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight | |
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/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java | 8 |
1 files changed, 5 insertions, 3 deletions
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; } |