From 73adefdc7f5367c6961867d4b6696beb5a1a15d2 Mon Sep 17 00:00:00 2001 From: Harrison Date: Sat, 9 May 2020 22:01:30 -0500 Subject: [PATCH] Made highlight command update quicker. --- .../commands/runnables/HighlightIslandCommand.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/ca/recrown/islandsurvivalcraft/interaction/commands/runnables/HighlightIslandCommand.java b/src/main/java/ca/recrown/islandsurvivalcraft/interaction/commands/runnables/HighlightIslandCommand.java index 42c8480..b3a7982 100644 --- a/src/main/java/ca/recrown/islandsurvivalcraft/interaction/commands/runnables/HighlightIslandCommand.java +++ b/src/main/java/ca/recrown/islandsurvivalcraft/interaction/commands/runnables/HighlightIslandCommand.java @@ -80,7 +80,9 @@ public class HighlightIslandCommand implements CommandRunnable { int playerX = playerLocation.getBlockX(), playerY = playerLocation.getBlockY(), playerZ = playerLocation.getBlockZ(); IslandWorldMap map = worldInfo.getIslandMap(); - highlighter.update(new Point2(playerX, playerZ), map); + for (int i = 0; i < 8; i++) { + highlighter.update(new Point2(playerX, playerZ), map); + } LinkedList highlighted = highlighter.getHighlighted(); for (Point2 point2 : highlighted) { @@ -90,7 +92,7 @@ public class HighlightIslandCommand implements CommandRunnable { } waitingList.add(highlighter); } - }, 0, 4); + }, 0, 8); } @@ -105,8 +107,8 @@ public class HighlightIslandCommand implements CommandRunnable { private class PlayerIslandHighlighter { public final int TRAIL_LENGTH = 64; - private final int MAX_SEARCH = 24; - private final int MAX_SEARCH_DIST = 8; + private final int MAX_SEARCH = 20; + private final int MAX_SEARCH_DIST = 16; private final Player player; private final LinkedList highlighted = new LinkedList<>(); private DepthFirstSearch dfs;