aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuideMain.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/EventListener.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/NetworkClassLoader.java3
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDoorFinder.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java31
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java3
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java3
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java13
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java5
15 files changed, 28 insertions, 43 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuideMain.java b/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuideMain.java
index 336e41cb..91724399 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuideMain.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuideMain.java
@@ -44,7 +44,6 @@ public class DungeonsGuideMain
String token = null;
try {
token = authenticator.authenticate();
- System.out.println(token);
if (token != null) {
classLoader = new NetworkClassLoader(authenticator, DungeonsGuideMain.class.getClassLoader());
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java b/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java
index 136b3d55..72bafb25 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java
@@ -36,7 +36,6 @@ public class EventListener {
SkyblockStatus skyblockStatus = (SkyblockStatus) DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
{
boolean isOnDungeon = skyblockStatus.isOnDungeon();
- // System.out.println(isOnDungeon);
skyblockStatus.updateStatus();
if (!skyblockStatus.isOnDungeon()) {
skyblockStatus.setContext(null);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/NetworkClassLoader.java b/src/main/java/kr/syeyoung/dungeonsguide/NetworkClassLoader.java
index db8312eb..119dc27d 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/NetworkClassLoader.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/NetworkClassLoader.java
@@ -54,8 +54,6 @@ public class NetworkClassLoader extends ClassLoader {
((bytes[2] & 0xFF) << 8 ) |
((bytes[3] & 0xFF));
- System.out.println("Expecting "+length);
-
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
int totalLen = 0;
try {
@@ -70,6 +68,7 @@ public class NetworkClassLoader extends ClassLoader {
byte[] byte1 = byteStream.toByteArray();
byte[] byte2 = new byte[(int) length];
System.arraycopy(byte1, 0, byte2, 0, byte2.length);
+ inputStream.close();
return byte2;
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
index 5a333143..2fdfec96 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
@@ -40,7 +40,6 @@ public class OffsetPoint implements Cloneable, Serializable {
public BlockPos toRotatedRelBlockPos(DungeonRoom dungeonRoom) {
int rot = dungeonRoom.getRoomMatcher().getRotation();
Vector2d rot2 = new Vector2d(x,z);
-// System.out.println("Before rot " +rot2);
for (int i = 0; i < dungeonRoom.getRoomMatcher().getRotation(); i++) {
rot2 = VectorUtils.rotateCounterClockwise(rot2);
if (i % 2 == 0) {
@@ -49,7 +48,6 @@ public class OffsetPoint implements Cloneable, Serializable {
rot2.y += dungeonRoom.getMax().getZ() - dungeonRoom.getMin().getZ() + 1;
}
}
-// System.out.println("After rot "+rot+" / "+rot2);
return new BlockPos(rot2.x, y, rot2.y);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDoorFinder.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDoorFinder.java
index bb0a52a0..b73fa2aa 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDoorFinder.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDoorFinder.java
@@ -22,7 +22,6 @@ public class CatacombDoorFinder implements StartDoorFinder {
Collection<EntityArmorStand> armorStand = w.getEntities(EntityArmorStand.class, new Predicate<EntityArmorStand>() {
@Override
public boolean apply(EntityArmorStand input) {
- System.out.println(input.getName());
return input.getName().equals("§bMort");
}
});
@@ -48,7 +47,6 @@ public class CatacombDoorFinder implements StartDoorFinder {
Collection<EntityArmorStand> armorStand = w.getEntities(EntityArmorStand.class, new Predicate<EntityArmorStand>() {
@Override
public boolean apply(EntityArmorStand input) {
- System.out.println(input.getName());
return input.getName().equals("§bMort");
}
});
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java
index b96e4366..6f5ac4ce 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java
@@ -69,11 +69,32 @@ public class DungeonRoomInfoRegistry {
uuidMap.clear();
Authenticator authenticator = DungeonsGuideMain.getDungeonsGuideMain().getAuthenticator();
InputStream inputStream = authenticator.getInputStream("roomdata/datas.txt");
- inputStream.read(new byte[4]);
- BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
- String name;
- while ((name = br.readLine()) != null) {
- System.out.println("Trying to load "+name);
+ byte[] bytes = new byte[4];
+ inputStream.read(bytes);
+
+ int length = ((bytes[0] & 0xFF) << 24) |
+ ((bytes[1] & 0xFF) << 16) |
+ ((bytes[2] & 0xFF) << 8 ) |
+ ((bytes[3] & 0xFF));
+ ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+ int totalLen = 0;
+ try {
+ byte[] buffer = new byte[128];
+ int read = 0;
+ while ( (read = inputStream.read(buffer)) != -1 ) {
+ totalLen += read;
+ byteStream.write(buffer, 0, read);
+ if (totalLen >= length) break;;
+ }
+ } catch (Exception ignored) {}
+ byte[] byte1 = byteStream.toByteArray();
+ byte[] byte2 = new byte[(int) length];
+ System.arraycopy(byte1, 0, byte2, 0, byte2.length);
+ inputStream.close();
+
+ String names = new String(byte2);
+
+ for (String name : names.split("\n")) {
if (name.endsWith(".roomdata")) continue;
try {
InputStream fis = authenticator.getInputStream(name);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
index 46337480..ac713082 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java
@@ -49,15 +49,12 @@ public class RoomMatcher {
for (int i = 0; i < rotation; i++)
res = ArrayUtils.rotateCounterClockwise(res);
- System.out.println("Trying to match "+dungeonRoomInfo.getUuid().toString()+" / "+dungeonRoomInfo.getName()+"... at rotation "+rotation);
-
for (int z = 0; z < res.length; z ++) {
for (int x = 0; x < res[0].length; x++) {
int data = res[z][x];
if (data == -1) continue;
Block b = dungeonRoom.getRelativeBlockAt(x,0,z);
if (b == null || Block.getIdFromBlock(b) != data) {
- System.out.println("Match failed at offset X"+x+" / Z"+z+". expected "+data+" but found "+b +" ("+Block.getIdFromBlock(b)+")");
return false;
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java
index d571384f..39ed0b9f 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java
@@ -103,7 +103,6 @@ public class MTextField extends MPanel {
int relStartT = relMouseX-3;
int offseted = relStartT + xOffset;
- System.out.println("click!" +offseted);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java
index fb2b2160..8dbc9b3b 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java
@@ -27,7 +27,6 @@ public class GeneralEditPane extends MPanel {
public GeneralEditPane(final DungeonRoom dungeonRoom) {
this.dungeonRoom = dungeonRoom;
-System.out.println("building");
{
MLabel la;
uuid = new MLabelAndElement("Room UUID: ", la = new MLabel());
@@ -39,7 +38,6 @@ System.out.println("building");
MTextField la = new MTextField() {
@Override
public void edit(String str) {
- System.out.println(str);
dungeonRoom.getDungeonRoomInfo().setName(str);
}
};
@@ -112,7 +110,6 @@ System.out.println("building");
save.setBackgroundColor(Color.green);
save.setBounds(new Rectangle(0,140,bounds.width, 20));
add(save);
- System.out.println(save.getBounds());
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java
index 2890555c..cb3ef000 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java
@@ -98,7 +98,6 @@ public class RoomProcessorCreeperSolver extends GeneralRoomProcessor {
prismarines.add(otherPrismarine);
poses.add(new BlockPos[] {allInBox, otherPrismarine});
- System.out.println("Found Set :: "+allInBox + " / "+otherPrismarine + " / "+opposite+" / "+pos +" / "+position);
}
}
bugged = false;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java
index b347e409..c2572a32 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java
@@ -143,26 +143,16 @@ public class RoomProcessorIcePath extends GeneralRoomProcessor {
queue.addLast(new Point(startX, startY));
iceCaveColors[startY][startX] = startPoint;
- for (int y = 0; y < iceCave.length; y ++) {
- for (int x = 0; x < iceCave[y].length; x++) {
- System.out.print((startX == x && startY == y)? "S\t":iceCave[y][x]+"\t");
- }
- System.out.println();
- }
-
while (queue.size() != 0) {
Point currPos = queue.pollFirst();
-// System.out.println(currPos);
- // traverse adjacent nodes while sliding on the ice
for (Direction dir : Direction.values()) {
Point nextPos = move(iceCave, iceCaveColors, currPos, dir);
if (nextPos != null) {
queue.addLast(nextPos);
iceCaveColors[nextPos.getY()][nextPos.getX()] = new Point(currPos.getX(), currPos.getY());
if (isEnd.apply(nextPos)) {
- // we found the end point
List<Point> route = new ArrayList<Point>();
- Point tmp = currPos; // if we start from nextPos we will count one too many edges
+ Point tmp = currPos;
int count = 0;
route.add(nextPos);
route.add(currPos);
@@ -171,7 +161,6 @@ public class RoomProcessorIcePath extends GeneralRoomProcessor {
tmp = iceCaveColors[tmp.getY()][tmp.getX()];
route.add(tmp);
}
- System.out.println(route);
return route;
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java
index 35b32094..d73e4300 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java
@@ -43,7 +43,6 @@ public class RoomProcessorRiddle extends GeneralRoomProcessor {
return;
}
String watsaid = TextUtils.stripColor(ch2.split(":")[1]).trim();
- System.out.println(watsaid);
boolean foundMatch = false;
for (Pattern p:patternList) {
if (p.matcher(watsaid).matches()) {
@@ -57,7 +56,6 @@ public class RoomProcessorRiddle extends GeneralRoomProcessor {
final BlockPos low = getDungeonRoom().getMin();
final BlockPos high = getDungeonRoom().getMax();
World w = getDungeonRoom().getContext().getWorld();
- System.out.println(name);
List<EntityArmorStand> armor = w.getEntities(EntityArmorStand.class, new Predicate<EntityArmorStand>() {
@Override
public boolean apply(@Nullable EntityArmorStand input) {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java
index f81efb97..983ca771 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java
@@ -73,7 +73,6 @@ public class RoomProcessorTrivia extends GeneralRoomProcessor {
public void chatReceived(IChatComponent chat) {
super.chatReceived(chat);
String ch2 = chat.getUnformattedText();
- System.out.println(ch2 + " / "+chat.getFormattedText());
if (chat.getFormattedText().contains("§r§6§lQuestion ")) {
questionDialogStart = true;
questionDialog.clear();
@@ -93,7 +92,6 @@ public class RoomProcessorTrivia extends GeneralRoomProcessor {
String answerA = getAnswer(questionDialog.get(2));
String answerB = getAnswer(questionDialog.get(3));
String answerC = getAnswer(questionDialog.get(4));
- System.out.println("question ::"+question+" :: answerC"+answerC);
String theRealAnswer = match(question, answerA, answerB, answerC);
if (theRealAnswer == null)
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java
index 8c63694b..d08eb1ee 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java
@@ -23,7 +23,6 @@ public class BoxPuzzleSolvingThread extends Thread {
this.playerX = playerX;
this.playerY = playerY;
this.callback = onDone;
- System.out.println("new solving thread");
}
Route solution = null;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java
index 8f0b3ee5..009212a1 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java
@@ -171,7 +171,6 @@ public class WaterBoard {
int end = node.getX() + offset;
int y = node.getY() + 2;
int y2 = node.getY() + 1;
- System.out.println("Y Change detected :: offset: "+offset+" start: "+start+" end" + end + " detect X"+node.getX());
boolean visited_offsetPt = false;
for (int x = start; (start < end) ? (x <= end) : (x >= end); x += (start < end) ?1:-1){
@@ -191,21 +190,17 @@ public class WaterBoard {
break;
}
if (!isConditionContradicting) {
- System.out.println("Found midBlock, exiting check");
r.getConditionList().add(condition);
break;
}
}
}
node2 = getNodeAt(x, y);
- System.out.println("Checking "+x+","+y+"to me non water go throughable:: "+node2);
if ((node2.canWaterGoThrough() && node2.getCondition() == null)) {
- System.out.println("Contradiction found!");
r.getConditionList().add(new WaterConditionContradict());
return;
} else {
if (node2.getCondition() != null) {
- System.out.println("Adding Condition:: " + node2.getCondition().invert());
r.getConditionList().add(node2.getCondition().invert());
}
}