aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-27 02:11:17 +0900
committersyeyoung <cyong06@naver.com>2021-03-27 02:11:53 +0900
commit5608fb71917c12f065c1dd5ce319d08ec6850382 (patch)
tree76eeed4bc6a85503234e64261a8aae8c3040243f /src/main/java/kr
parent51588fa8f845e0d6b1b420d1546d820850e3e0f5 (diff)
downloadSkyblock-Dungeons-Guide-5608fb71917c12f065c1dd5ce319d08ec6850382.tar.gz
Skyblock-Dungeons-Guide-5608fb71917c12f065c1dd5ce319d08ec6850382.tar.bz2
Skyblock-Dungeons-Guide-5608fb71917c12f065c1dd5ce319d08ec6850382.zip
fix bannables
Diffstat (limited to 'src/main/java/kr')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java3
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java13
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java16
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java12
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java11
9 files changed, 10 insertions, 56 deletions
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<EntityBat> skeletonList = Minecraft.getMinecraft().theWorld.getEntities(EntityBat.class, new Predicate<EntityBat>() {
@Override
public boolean apply(@Nullable EntityBat input) {
+ if (input != null && input.isInvisible()) return false;
return input != null && input.getDistanceSq(player) < sq;
}
});
AColor c = this.<AColor>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.<AColor>getParameter("color").getValue();
for (EntityArmorStand entitySkeleton : skeletonList) {
- RenderUtils.highlightBox(entitySkeleton, c, partialTicks, true);
+ RenderUtils.highlightBox(entitySkeleton, c, partialTicks, true);
}
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java
index f3def5a7..1203e7b4 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java
@@ -75,19 +75,6 @@ public class ArrowRightProcessor extends GeneralDefuseChamberProcessor {
}
}
- @Override
- public void onInteract(PlayerInteractEntityEvent event) {
- if (answer == -1) return;
- if (event.getEntity() instanceof EntityArmorStand) {
-// BlockPos pos = event.getEntity().getPosition();
-// for (int i = 0; i < 9; i++) {
-// if (currentAnswers[i] == correctAnswers[i] && pos.equals(grid[i].add(0, -1, 0))) event.setCanceled(true);
-// }
-//
-// System.out.println(" block ? "+event.isCanceled());
- }
- }
-
private int match(EntityArmorStand armorStand) {
if (armorStand == null) return -1;
ItemStack item = armorStand.getInventory()[4];
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java
index 1abac165..42726479 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java
@@ -49,22 +49,6 @@ public class CreeperRightProcessor extends GeneralDefuseChamberProcessor {
}
}
}
-
- @Override
- public void onInteractBlock(PlayerInteractEvent event) {
- BlockPos pos = event.pos;
- World w = event.world;
-
- if (answer == -1) return;
-
- if (w.getBlockState(pos).getBlock() == Blocks.wooden_button) {
- for (int i = 0; i < 9; i++) {
- if (poses[answer] == pos && ((answer >> i) & 0x01) == 0) {
- event.setCanceled(true);
- }
- }
- }
- }
@Override
public void onDataRecieve(NBTTagCompound compound) {
if (2 == compound.getByte("a")) {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java
index fd0f40ec..a764b1d8 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java
@@ -58,18 +58,6 @@ public class NumberRightProcessor extends GeneralDefuseChamberProcessor {
}
@Override
- public void onInteract(PlayerInteractEntityEvent event) {
- if (answer == -1) return;
- if (event.getEntity() instanceof EntityArmorStand) {
- BlockPos pos = event.getEntity().getPosition();
- if (a1 == d1 && pos.equals(d1p)) event.setCanceled(true);
- if (a2 == d2 && pos.equals(d2p)) event.setCanceled(true);
- if (a3 == d3 && pos.equals(d3p)) event.setCanceled(true);
- if (a4 == d4 && pos.equals(d4p)) event.setCanceled(true);
- }
- }
-
- @Override
public void onDataRecieve(NBTTagCompound compound) {
if (1 == compound.getByte("a")) {
answer = compound.getInteger("b");
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java
index c3e00de7..19dd4ac1 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java
@@ -5,9 +5,7 @@ import lombok.Data;
import lombok.Singular;
import lombok.experimental.Accessors;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Scanner;
+import java.util.*;
@Data
@Accessors(chain = true, fluent = true)
@@ -59,12 +57,11 @@ public class StompPayload {
stompPayload.headers.put(name, value);
}
- StringBuilder payloadBuilder = new StringBuilder();
+ List<String> lines = new ArrayList<String>();
while (scanner.hasNextLine() && !(line = scanner.nextLine()).equals("\0")) {
- payloadBuilder.append(line);
- payloadBuilder.append("\n");
+ lines.add(line);
}
- stompPayload.payload = payloadBuilder.toString();
+ stompPayload.payload = String.join("\n", lines);
return stompPayload;
}
}