aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide
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
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')
-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
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java79
5 files changed, 128 insertions, 3 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);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
index 65d2fef3..ec40d44c 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
@@ -2,6 +2,7 @@ package kr.syeyoung.dungeonsguide.utils;
import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonDoor;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityOtherPlayerMP;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.GlStateManager;
@@ -10,6 +11,7 @@ import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.Vec3;
@@ -301,7 +303,7 @@ public class RenderUtils {
}
- public static void highlightBox(Entity entity, Color c, float partialTicks, boolean depth) {
+ public static void highlightBox(Entity entity, AxisAlignedBB axisAlignedBB, Color c, float partialTicks, boolean depth) {
Entity viewing_from = Minecraft.getMinecraft().getRenderViewEntity();
double x_fix = viewing_from.lastTickPosX + ((viewing_from.posX - viewing_from.lastTickPosX) * partialTicks);
@@ -323,7 +325,82 @@ public class RenderUtils {
}
GlStateManager.color(c.getRed()/ 255.0f, c.getGreen()/ 255.0f, c.getBlue()/ 255.0f, c.getAlpha()/ 255.0f);
+
+ GlStateManager.translate(-0.4 + entity.posX, entity.posY, -0.4 + entity.posZ);
+
+ double x = 0.8;
+ double y = 1.5;
+ double z = 0.8;
+ GL11.glBegin(GL11.GL_QUADS);
+ GL11.glVertex3d(0, 0, 0);
+ GL11.glVertex3d(0, 0, z);
+ GL11.glVertex3d(0, y, z);
+ GL11.glVertex3d(0, y, 0); // TOP LEFT / BOTTOM LEFT / TOP RIGHT/ BOTTOM RIGHT
+
+ GL11.glVertex3d(x, 0, z);
+ GL11.glVertex3d(x, 0, 0);
+ GL11.glVertex3d(x, y, 0);
+ GL11.glVertex3d(x, y, z);
+
+ GL11.glVertex3d(0, y, z);
+ GL11.glVertex3d(0, 0, z);
+ GL11.glVertex3d(x, 0, z);
+ GL11.glVertex3d(x, y, z); // TOP LEFT / BOTTOM LEFT / TOP RIGHT/ BOTTOM RIGHT
+
+ GL11.glVertex3d(0, 0, 0);
+ GL11.glVertex3d(0, y, 0);
+ GL11.glVertex3d(x, y, 0);
+ GL11.glVertex3d(x, 0, 0);
+
+ GL11.glVertex3d(0,y,0);
+ GL11.glVertex3d(0,y,z);
+ GL11.glVertex3d(x,y,z);
+ GL11.glVertex3d(x,y,0);
+
+ GL11.glVertex3d(0,0,z);
+ GL11.glVertex3d(0,0,0);
+ GL11.glVertex3d(x,0,0);
+ GL11.glVertex3d(x,0,z);
+
+
+
+ GL11.glEnd();
+
+
+ if (!depth) {
+ GlStateManager.disableDepth();
+ GlStateManager.depthMask(true);
+ }
+ GlStateManager.enableTexture2D();
+ GlStateManager.disableBlend();
+ GlStateManager.enableLighting();
+ GlStateManager.popMatrix();
+ GlStateManager.popAttrib();
+ }
+ public static void highlightBox(Entity entity, Color c, float partialTicks, boolean depth) {
+ Entity viewing_from = Minecraft.getMinecraft().getRenderViewEntity();
+
+ double x_fix = viewing_from.lastTickPosX + ((viewing_from.posX - viewing_from.lastTickPosX) * partialTicks);
+ double y_fix = viewing_from.lastTickPosY + ((viewing_from.posY - viewing_from.lastTickPosY) * partialTicks);
+ double z_fix = viewing_from.lastTickPosZ + ((viewing_from.posZ - viewing_from.lastTickPosZ) * partialTicks);
+
+ GlStateManager.pushMatrix();
+ GlStateManager.pushAttrib();
+ GlStateManager.translate(-x_fix, -y_fix, -z_fix);
+
+ GlStateManager.disableLighting();
+ GlStateManager.enableBlend();
+ GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.disableTexture2D();
+
+ if (!depth) {
+ GlStateManager.disableDepth();
+ GlStateManager.depthMask(false);
+ }
+ GlStateManager.color(c.getRed()/ 255.0f, c.getGreen()/ 255.0f, c.getBlue()/ 255.0f, c.getAlpha()/ 255.0f);
AxisAlignedBB axisAlignedBB = AxisAlignedBB.fromBounds(-0.4,-1.5,-0.4,0.4,0,0.4);
+
+
GlStateManager.translate(-0.4 + entity.posX, -1.5 + entity.posY, -0.4 + entity.posZ);
double x = 0.8;