Skip to content

Commit

Permalink
v1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
StupidRepo committed Jul 19, 2023
1 parent a56ade3 commit 483d654
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
*.txt
gradlew
gradlew.bat
.resumescan
offset.mcscan
.mcscanner

# Directories
.gradle
Expand Down
12 changes: 6 additions & 6 deletions src/com/stupidrepo/mcscanner/MCScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ public void windowClosing(java.awt.event.WindowEvent windowEvent) {
// Timeout or something idk
}
}
logger.log(Level.INFO, "Making an '.resumescan'...");
logger.log(Level.INFO, "Making an '.mcscanner'...");
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(".resumescan"));
BufferedWriter writer = new BufferedWriter(new FileWriter(".mcscanner"));
writer.write(String.valueOf(offsetI + "\n" + offsetJ + "\n" + offsetK + "\n" + offsetL));
writer.close();
} catch (IOException e) {
logger.log(Level.SEVERE, "Failed to write '.resumescan'!");
logger.log(Level.SEVERE, "Failed to write '.mcscanner'!");
}
logger.log(Level.INFO, "Exiting...");
System.exit(0);
Expand All @@ -112,10 +112,10 @@ public void windowClosing(java.awt.event.WindowEvent windowEvent) {

frame.setVisible(true);

File offsetFile = new File(".resumescan");
File offsetFile = new File(".mcscanner");
if (offsetFile.exists()) {
try {
logger.log(Level.INFO, "Found '.resumescan'!");
logger.log(Level.INFO, "Found '.mcscanner'!");
BufferedReader reader = new BufferedReader(new FileReader(offsetFile));
offsetI = Integer.parseInt(reader.readLine());
offsetJ = Integer.parseInt(reader.readLine());
Expand All @@ -124,7 +124,7 @@ public void windowClosing(java.awt.event.WindowEvent windowEvent) {
logger.log(Level.INFO, "Continuing from " + offsetI + "." + offsetJ + "." + offsetK + "." + offsetL + "...");
reader.close();
} catch (IOException e) {
logger.log(Level.SEVERE, "Failed to read '.resumescan'!");
logger.log(Level.SEVERE, "Failed to read '.mcscanner'!");
}
}

Expand Down

0 comments on commit 483d654

Please sign in to comment.