From 8cd3bed0597cd6c452371630d93f4d58b0602bd3 Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Sun, 29 Nov 2020 17:47:57 +0900 Subject: pouzles --- src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java index a88c0e43..32124452 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java @@ -40,6 +40,7 @@ public class MapProcessor { private static final Set directions = Sets.newHashSet(new Vector2d(0,1), new Vector2d(0, -1), new Vector2d(1, 0), new Vector2d(-1 , 0)); + private int waitCnt = 0; private void buildMap(final byte[] mapData) { final Point startroom = MapUtils.findFirstColorWithIn(mapData, (byte) 30, new Rectangle(0,0,128,128)); if (startroom == null){ @@ -243,10 +244,14 @@ public class MapProcessor { pt.translate(xOff, yOff); byte unit3 = MapUtils.getMapColorAt(mapData, pt.x, pt.y); - return unit1 == unit2 && unit2 == unit3; + return unit1 == unit2 && unit2 == unit3 && unit1 != 0; } public void tick() { + if (waitCnt < 5) { + waitCnt++; + return; + } if (bugged) return; ItemStack stack = Minecraft.getMinecraft().thePlayer.inventory.getStackInSlot(8); byte[] mapData; -- cgit