From 5608fb71917c12f065c1dd5ce319d08ec6850382 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 27 Mar 2021 02:11:17 +0900 Subject: fix bannables --- .../features/impl/boss/terminal/FeatureSimonSaysSolver.java | 4 +--- .../features/impl/boss/terminal/FeatureTerminalSolvers.java | 4 ---- .../syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java | 2 ++ .../dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java | 1 + .../dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java | 3 ++- 5 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java index 6840788f..6e7ef176 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java @@ -79,9 +79,7 @@ public class FeatureSimonSaysSolver extends SimpleFeature implements WorldRender BlockPos pos = event.pos.add(1,0,0); if (120 <= pos.getY() && pos.getY() <= 123 && pos.getX() == 310 && 291 <= pos.getZ() && pos.getZ() <= 294) { if (w.getBlockState(event.pos).getBlock() != Blocks.stone_button) return; - if (!pos.equals(orderclick.peek())) { - if (isEnabled()) event.setCanceled(true); - } else { + if (pos.equals(orderclick.peek())) { orderclick.poll(); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java index d792a07c..d069c84d 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java @@ -119,15 +119,11 @@ public class FeatureTerminalSolvers extends SimpleFeature implements GuiOpenList if (solutionProvider == null) return; if (solution == null) return; if (solution.getCurrSlots() == null) { - mouseInputEvent.setCanceled(true); return; } - mouseInputEvent.setCanceled(true); Slot s = ((GuiChest) Minecraft.getMinecraft().currentScreen).getSlotUnderMouse(); if (solution.getCurrSlots().contains(s)) { clicked.add(s); - Minecraft.getMinecraft().playerController.windowClick(((GuiChest)Minecraft.getMinecraft().currentScreen).inventorySlots.windowId, s.getSlotIndex(), - 2, 0, Minecraft.getMinecraft().thePlayer); return; } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java index a36a6f03..92df3989 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java @@ -39,11 +39,13 @@ public class FeatureBoxBats extends SimpleFeature implements WorldRenderListener List skeletonList = Minecraft.getMinecraft().theWorld.getEntities(EntityBat.class, new Predicate() { @Override public boolean apply(@Nullable EntityBat input) { + if (input != null && input.isInvisible()) return false; return input != null && input.getDistanceSq(player) < sq; } }); AColor c = this.getParameter("color").getValue(); for (EntityBat entitySkeleton : skeletonList) { + if (!entitySkeleton.isInvisible()) RenderUtils.highlightBox(entitySkeleton, c, partialTicks, true); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java index 1786e7cf..545a5449 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java @@ -40,6 +40,7 @@ public class FeatureBoxSkelemaster extends SimpleFeature implements WorldRenderL @Override public boolean apply(@Nullable EntityArmorStand input) { if (player.distanceSq(input.getPosition()) > sq) return false; + if (input.isInvisible() || !input.getAlwaysRenderNameTag()) return false; return input.getName().contains("Skeleton Master"); } }); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java index 670ad077..e647e0de 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java @@ -39,12 +39,13 @@ public class FeatureBoxStarMobs extends SimpleFeature implements WorldRenderList @Override public boolean apply(@Nullable EntityArmorStand input) { if (player.distanceSq(input.getPosition()) > sq) return false; + if (input.isInvisible() || !input.getAlwaysRenderNameTag()) return false; return input.getName().contains("✯"); } }); AColor c = this.getParameter("color").getValue(); for (EntityArmorStand entitySkeleton : skeletonList) { - RenderUtils.highlightBox(entitySkeleton, c, partialTicks, true); + RenderUtils.highlightBox(entitySkeleton, c, partialTicks, true); } } } -- cgit