This commit is contained in:
Piegames 2018-11-13 18:20:19 +01:00
parent cb1f309031
commit dd331c3f3f
4 changed files with 7 additions and 240 deletions

View File

@ -1,61 +0,0 @@
/*
#######################################################################
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE #
# Version 2, December 2004 #
# #
# Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> #
# #
# Everyone is permitted to copy and distribute verbatim or modified #
# copies of this license document, and changing it is allowed as long #
# as the name is changed. #
# #
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE #
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION #
# #
# 0. You just DO WHAT THE FUCK YOU WANT TO. #
# #
#######################################################################
*//*
*/
/**
*
*//*
package morlok8k.MinecraftLandGenerator;
import java.util.ArrayList;
*/
/**
* @author morlok8k
*
*//*
public class Arraylist {
*/
/**
*
* @param list
* @param remove
* @return
*//*
public static ArrayList<Coordinates> arrayListRemove(final ArrayList<Coordinates> list,
final ArrayList<Coordinates> remove) {
boolean changed = list.removeAll(remove);
if (var.verbose) {
System.out.println("ArrayList changed: " + changed);
}
return list;
}
}
*/

View File

@ -45,6 +45,7 @@ public class DownloadFile {
* @return true if download was successful, false if not
* @author piegames
*/
@Deprecated
public static boolean downloadFile(final String url, final boolean Output) {
try {
URL download = new URL(url);

View File

@ -24,11 +24,11 @@ import org.apache.commons.logging.LogFactory;
import org.joml.Vector3i;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
*
@ -37,35 +37,10 @@ import java.io.OutputStream;
public class Misc {
private static Log log = LogFactory.getLog(Main.class);
/**
* I'd love to use nio, but it requires Java 7.<br>
* I could use Apache Commons, but i don't want to include a library for one little thing.<br>
* Copies src file to dst file.<br>
* If the dst file does not exist, it is created<br>
*
* @author Corrodias
* @param src
* @param dst
* @throws IOException
*/
// TODO replace with Java Copy Path
@Deprecated
public static void copyFile(final File src, final File dst) throws IOException {
final InputStream copyIn = new FileInputStream(src);
final OutputStream copyOut = new FileOutputStream(dst);
// Transfer bytes from in to out
final byte[] buf = new byte[1024];
int len;
while ((len = copyIn.read(buf)) >= 0) {
if (len > 0) {
copyOut.write(buf, 0, len);
}
}
copyIn.close();
copyOut.flush();
copyOut.close();
FileUtils.copyFile(src, dst);
}
//TODO: add description

View File

@ -1,148 +0,0 @@
/*
#######################################################################
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE #
# Version 2, December 2004 #
# #
# Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> #
# #
# Everyone is permitted to copy and distribute verbatim or modified #
# copies of this license document, and changing it is allowed as long #
# as the name is changed. #
# #
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE #
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION #
# #
# 0. You just DO WHAT THE FUCK YOU WANT TO. #
# #
#######################################################################
*//*
package morlok8k.MinecraftLandGenerator;
import javax.swing.JOptionPane;
import morlok8k.MinecraftLandGenerator.GUI.MLG_GUI;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
*/
/**
*
* @author morlok8k
*//*
public class Out {
private static Log log = LogFactory.getLog(Main.class);
*/
/**
* Outputs a formatted string to System.err as a line.
*
* @param str
* String to display and format
* @author Morlok8k
*//*
public static void err(final String str) {
System.err.println(var.MLGe + str);
}
*/
/**
* Outputs a formatted string to System.out as a line.
*
* @param str
* String to display and format
* @author Morlok8k
*//*
public static void out(final String str) {
System.out.println(var.MLG + str); // is there a better/easier way to do this? I just wanted a lazier way to write "System.out.println(MLG + blah..."
}
*/
/**
* Outputs a formatted string to System.out as a line.
*
* @param str
* String to display and format
* @author Morlok8k
*//*
public static void outD(final String str) {
System.out.println(var.MLG + "[DEBUG] " + str);
}
*/
/**
* Outputs a string to System.out without a newline.
*
* @param str
* String to display and format
* @author Morlok8k
*//*
public static void outP(final String str) {
System.out.print(str);
}
*/
/**
* Outputs a formatted string to System.out as a line.
*
* @param str
* String to display and format
* @author Morlok8k
*//*
static void outS(final String str) {
System.out.println("[Server] " + str);
}
*/
/**
* Makes a dialog box, and outputs a formatted string to System.out as a line.
*
* @param msg
* Message
* @param title
* title
* @param messageType
* JOptionPane messageType
*
* @author Morlok8k
*//*
public static void msg(final String msg, final String title, final int messageType) {
String msgType = "";
switch (messageType) {
case JOptionPane.ERROR_MESSAGE:
msgType = "Error Message";
break;
case JOptionPane.INFORMATION_MESSAGE:
msgType = "Information Message";
break;
case JOptionPane.WARNING_MESSAGE:
msgType = "Warning Message";
break;
case JOptionPane.QUESTION_MESSAGE:
msgType = "Question Message";
break;
case JOptionPane.PLAIN_MESSAGE:
msgType = "Message";
break;
default:
msgType = "Message";
break;
}
System.out.println("[" + msgType + "] Title: " + title + var.newLine + msg);
JOptionPane.showMessageDialog(MLG_GUI.frmMLG_GUI, msg, title, messageType);
}
}
*/