aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-01-22 22:36:02 +0900
committersyeyoung <cyong06@naver.com>2021-01-22 22:36:02 +0900
commit870dc90b3834f62ee6c7e2bdcde7144158383738 (patch)
tree25644ef5627f1d55303c86b54331d0be061f5961 /src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
parentc37e8bb98d04801a31b1f0dd1c74f5117c534aeb (diff)
downloadSkyblock-Dungeons-Guide-870dc90b3834f62ee6c7e2bdcde7144158383738.tar.gz
Skyblock-Dungeons-Guide-870dc90b3834f62ee6c7e2bdcde7144158383738.tar.bz2
Skyblock-Dungeons-Guide-870dc90b3834f62ee6c7e2bdcde7144158383738.zip
fack
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java10
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java24
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/HealthData.java14
4 files changed, 44 insertions, 6 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java
index 395c3542..9d2541c0 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessor.java
@@ -8,4 +8,6 @@ public interface BossfightProcessor extends RoomProcessor {
List<String> getPhases();
String getCurrentPhase();
List<String> getNextPhases();
+
+ List<HealthData> getHealths();
} \ No newline at end of file
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java
index 6f664099..78dfd060 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java
@@ -5,9 +5,7 @@ import net.minecraft.client.entity.EntityOtherPlayerMP;
import net.minecraft.entity.item.EntityArmorStand;
import net.minecraftforge.event.entity.living.LivingEvent;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
+import java.util.*;
@Getter
public class BossfightProcessorLivid extends GeneralBossfightProcessor {
@@ -31,4 +29,10 @@ public class BossfightProcessorLivid extends GeneralBossfightProcessor {
}
}
}
+
+ @Override
+ public List<HealthData> getHealths() {
+ ArrayList<HealthData> healthData = new ArrayList<HealthData>();
+ return super.getHealths();
+ }
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java
index 5b71d406..2b1ce71c 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java
@@ -1,9 +1,10 @@
package kr.syeyoung.dungeonsguide.roomprocessor.bossfight;
-import lombok.Builder;
-import lombok.Data;
-import lombok.Singular;
+import lombok.*;
+import net.minecraft.entity.boss.BossStatus;
+import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.util.IChatComponent;
+import net.minecraft.world.World;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.event.entity.living.LivingEvent;
@@ -13,6 +14,15 @@ public class GeneralBossfightProcessor implements BossfightProcessor {
private Map<String, PhaseData> phases = new HashMap<String, PhaseData>();
private PhaseData currentPhase = null;
+ @Getter
+ @Setter
+ private int bossMaxHealth = 100;
+ @Getter
+ @Setter
+ private String name;
+
+ private World world;
+
public void addPhase(PhaseData phaseData) {
if (phaseData == null) return;
if (currentPhase == null) currentPhase = phaseData;
@@ -35,6 +45,14 @@ public class GeneralBossfightProcessor implements BossfightProcessor {
}
@Override
+ public List<HealthData> getHealths() {
+ ArrayList<HealthData> arr = new ArrayList<HealthData>();
+ arr.add(new HealthData(name, (int) (bossMaxHealth * BossStatus.healthScale), bossMaxHealth));
+ return arr;
+ }
+
+
+ @Override
public String getCurrentPhase() {
return currentPhase == null ? "unknown" : currentPhase.getPhase();
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/HealthData.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/HealthData.java
new file mode 100644
index 00000000..66a727dd
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/HealthData.java
@@ -0,0 +1,14 @@
+package kr.syeyoung.dungeonsguide.roomprocessor.bossfight;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class HealthData {
+ private String name;
+ private int health;
+ private int maxHealth;
+}