From a85cde380c6aa6447f8abfb105d2cc55cf7dc149 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 8 Jan 2021 10:58:13 +0900 Subject: colours! --- .../syeyoung/dungeonsguide/features/impl/FeatureBoxSkelemaster.java | 6 +++--- .../kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java | 1 + .../syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureBoxSkelemaster.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureBoxSkelemaster.java index 962e9350..3165f462 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureBoxSkelemaster.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureBoxSkelemaster.java @@ -2,6 +2,7 @@ package kr.syeyoung.dungeonsguide.features.impl; 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; @@ -21,7 +22,7 @@ public class FeatureBoxSkelemaster extends SimpleFeature implements WorldRenderL public FeatureBoxSkelemaster() { super("Dungeon", "Box Skeleton Masters", "Box skeleton masters in dungeons", "dungeon.skeletonmasterbox", true); parameters.put("radius", new FeatureParameter("radius", "Highlight Radius", "The maximum distance between player and skeletonmaster to be boxed", 20, "integer")); - parameters.put("color", new FeatureParameter("color", "Highlight Color", "Highlight Color of Skeleton master", Color.red, "color")); + parameters.put("color", new FeatureParameter("color", "Highlight Color", "Highlight Color of Skeleton master", new AColor(255,0,0,50), "acolor")); } @@ -43,9 +44,8 @@ public class FeatureBoxSkelemaster extends SimpleFeature implements WorldRenderL } }); Color c = this.getParameter("color").getValue(); - Color real = new Color(c.getRGB() & 0xFFFFFF | 0x44000000, true); for (EntityArmorStand entitySkeleton : skeletonList) { - RenderUtils.highlightBox(entitySkeleton, real, partialTicks, false); + RenderUtils.highlightBox(entitySkeleton, c, partialTicks, false); } } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java index 517b668b..d3792e77 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java @@ -39,6 +39,7 @@ public class FeatureChestPrice extends SimpleFeature implements GuiBackgroundRen GlStateManager.disableLighting(); ContainerChest chest = (ContainerChest) ((GuiChest) rendered.gui).inventorySlots; + if (!chest.getLowerChestInventory().getName().endsWith("Chest")) return; IInventory actualChest = chest.getLowerChestInventory(); int chestPrice = 0; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java index a95ed5d2..444cd85a 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java @@ -29,6 +29,7 @@ public class FeatureDungeonScore extends GuiFeature { if (!skyblockStatus.isOnDungeon()) return; FontRenderer fr = getFontRenderer(); ScoreCalculation score = calculateScore(); + if (score == null) return; int sum = score.time + score.skill + score.explorer + score.bonus; if (this.getParameter("verbose").getValue()) { String req = buildRequirement(score); -- cgit