aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-01-27 16:22:17 +0900
committersyeyoung <cyong06@naver.com>2021-01-27 16:22:17 +0900
commitb5cbefcccf5ae5b7d156b181c5cefdcee3861ab8 (patch)
tree0ef974639c88af69376bc2341a4ddc38ebccf38f /src/main/java/kr/syeyoung/dungeonsguide/features
parent9c2057e53549b28f3e5ea38001a8ddf443154aa8 (diff)
downloadSkyblock-Dungeons-Guide-b5cbefcccf5ae5b7d156b181c5cefdcee3861ab8.tar.gz
Skyblock-Dungeons-Guide-b5cbefcccf5ae5b7d156b181c5cefdcee3861ab8.tar.bz2
Skyblock-Dungeons-Guide-b5cbefcccf5ae5b7d156b181c5cefdcee3861ab8.zip
asdasd
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java3
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java43
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java4
4 files changed, 50 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
index ac42cb2e..2400e84f 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
@@ -1,6 +1,7 @@
package kr.syeyoung.dungeonsguide.features;
import kr.syeyoung.dungeonsguide.features.impl.boss.FeatureAutoReparty;
+import kr.syeyoung.dungeonsguide.features.impl.boss.FeatureBoxRealLivid;
import kr.syeyoung.dungeonsguide.features.impl.boss.FeatureChestPrice;
import kr.syeyoung.dungeonsguide.features.impl.dungeon.*;
import kr.syeyoung.dungeonsguide.features.impl.etc.FeatureCooldownCounter;
@@ -61,6 +62,7 @@ public class FeatureRegistry {
public static final SimpleFeature BOSSFIGHT_CHESTPRICE = register(new FeatureChestPrice());
public static final FeatureAutoReparty BOSSFIGHT_AUTOREPARTY = register(new FeatureAutoReparty());
+ public static final FeatureBoxRealLivid BOSSFIGHT_BOX_REALLIVID = register(new FeatureBoxRealLivid());
public static final FeatureInstaCloseChest DUNGEON_INSTACLOSE = register(new FeatureInstaCloseChest());
public static final FeatureBoxSkelemaster DUNGEON_BOXSKELEMASTER = register(new FeatureBoxSkelemaster());
@@ -75,4 +77,5 @@ public class FeatureRegistry {
public static final FeatureWarnLowHealth DUNGEON_LOWHEALTH_WARN = register(new FeatureWarnLowHealth());
public static final SimpleFeature DUNGEON_INTERMODCOMM = register(new SimpleFeature("Dungeon", "Communicate With Other's Dungeons Guide", "Sends total secret in the room to others\nSo that they can use the data to calculate total secret in dungeon run\n\nThis automates player chatting action, (chatting data) Thus it might be against hypixel's rules.\nBut mods like auto-gg which also automate player action and is kinda allowed mod exist so I'm leaving this feature.\nThis option is use-at-your-risk and you'll be responsible for ban if you somehow get banned because of this feature\n(Although it is not likely to happen)\nDefaults to off", "dungeon.intermodcomm", false));
public static final FeatureDungeonMap DUNGEON_MAP = register(new FeatureDungeonMap());
+
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java
new file mode 100644
index 00000000..6261df61
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java
@@ -0,0 +1,43 @@
+package kr.syeyoung.dungeonsguide.features.impl.boss;
+
+import com.google.common.base.Predicate;
+import kr.syeyoung.dungeonsguide.SkyblockStatus;
+import kr.syeyoung.dungeonsguide.config.types.AColor;
+import kr.syeyoung.dungeonsguide.e;
+import kr.syeyoung.dungeonsguide.features.FeatureParameter;
+import kr.syeyoung.dungeonsguide.features.SimpleFeature;
+import kr.syeyoung.dungeonsguide.features.listener.WorldRenderListener;
+import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessorLivid;
+import kr.syeyoung.dungeonsguide.utils.RenderUtils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityOtherPlayerMP;
+import net.minecraft.entity.item.EntityArmorStand;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.BlockPos;
+import org.jetbrains.annotations.Nullable;
+
+import java.awt.*;
+import java.util.List;
+
+
+public class FeatureBoxRealLivid extends SimpleFeature implements WorldRenderListener {
+ public FeatureBoxRealLivid() {
+ super("Bossfight", "Box Real Livid", "Box Real Livid in bossfight", "bossfight.realLividBox", true);
+ parameters.put("color", new FeatureParameter<AColor>("color", "Highlight Color", "Highlight Color of Skeleton master", new AColor(0,255,0,150), "acolor"));
+ }
+
+
+ private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus();
+ @Override
+ public void drawWorld(float partialTicks) {
+ if (!isEnabled()) return;
+ if (!skyblockStatus.isOnDungeon()) return;
+ if (skyblockStatus.getContext().getBossfightProcessor() == null) return;
+ if (!(skyblockStatus.getContext().getBossfightProcessor() instanceof BossfightProcessorLivid)) return;
+ EntityOtherPlayerMP playerMP = ((BossfightProcessorLivid) skyblockStatus.getContext().getBossfightProcessor()).getRealLivid();
+
+ Color c = this.<Color>getParameter("color").getValue();
+ System.out.println(playerMP.getEntityBoundingBox());
+ RenderUtils.highlightBox(playerMP, AxisAlignedBB.fromBounds(-0.4,-1.5,-0.4,0.4,0,0.4), c, partialTicks, true);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
index f2c20965..962f314d 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
@@ -180,7 +180,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener,
Point pt2;
double yaw2;
- if (entityplayer != null) {
+ if (entityplayer != null && !entityplayer.isInvisible()) {
pt2 = mapProcessor.worldPointToMapPoint(entityplayer.getPositionEyes(partialTicks));
yaw2 = entityplayer.prevRotationYawHead + (entityplayer.rotationYawHead - entityplayer.prevRotationYawHead) * partialTicks;
} else {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java
index 60610b9d..e121b660 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java
@@ -138,12 +138,14 @@ public class FeatureDungeonScore extends GuiFeature {
int totalSecrets = 0;
int secrets = 0;
{
+ int completed = 0;
for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) {
if (dungeonRoom.getTotalSecrets() != -1)
totalSecrets += dungeonRoom.getTotalSecrets();
else totalSecretsKnown = false;
+ completed += dungeonRoom.getUnitPoints().size();
}
- fullyCleared = getPercentage() == context.getDungeonRoomList().size() && context.getMapProcessor().getUndiscoveredRoom() == 0;
+ fullyCleared = completed >= getTotalRooms() && context.getMapProcessor().getUndiscoveredRoom() == 0;
explorer += MathHelper.clamp_int((int) Math.floor(6.0 / 10.0 * getPercentage()), 0, 60);
explorer += MathHelper.clamp_int((int) Math.floor(40 * ((secrets = FeatureRegistry.DUNGEON_SECRETS.getSecretsFound()) / (double)totalSecrets)),0,40);
}