aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java8
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;
}