From 246268a03f302bbcbe0dbf1c9c7f6042edb2bfd2 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Wed, 3 Feb 2021 01:39:29 +0900 Subject: bomb defuse solver complete --- .../bombdefuse/chambers/color/ColorRightProcessor.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java index 490ba593..303d553d 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java @@ -47,9 +47,9 @@ public class ColorRightProcessor extends GeneralDefuseChamberProcessor { @Override public void tick() { super.tick(); - c3b = match(getChamber().getEntityAt(EntityArmorStand.class,b1.add(0, -1, 0))); + c1b = match(getChamber().getEntityAt(EntityArmorStand.class,b1.add(0, -1, 0))); c2b = match(getChamber().getEntityAt(EntityArmorStand.class,b2.add(0, -1, 0))); - c1b = match(getChamber().getEntityAt(EntityArmorStand.class,b3.add(0, -1, 0))); + c3b = match(getChamber().getEntityAt(EntityArmorStand.class,b3.add(0, -1, 0))); } @Override @@ -80,9 +80,9 @@ public class ColorRightProcessor extends GeneralDefuseChamberProcessor { public void onDataRecieve(NBTTagCompound compound) { if (7 == compound.getByte("a")) { answer = compound.getInteger("b"); - b1b = (byte) (answer / 10000); + b3b = (byte) (answer / 10000); b2b = (byte) ((answer % 10000) / 100); - b3b = (byte) (answer % 100); + b1b = (byte) (answer % 100); } } @@ -94,6 +94,9 @@ public class ColorRightProcessor extends GeneralDefuseChamberProcessor { ItemStack item = armorStand.getInventory()[4]; NBTTagList list = item.getTagCompound().getCompoundTag("SkullOwner").getCompoundTag("Properties").getTagList("textures", 10); String str = ((NBTTagCompound)list.get(0)).getString("Value"); + if (!integers.containsKey(str)) { + System.out.println("Cant determine "+str); + } return (byte) (!integers.containsKey(str) ? 0 : integers.get(str)); } -- cgit