// Path: src/main/java/wecui/exception/InitializationException.java
// public class InitializationException extends Exception {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public InitializationException(String string) {
//         super(string);
//     }
// 
//     public InitializationException() {
//     }
// }
// 
// Path: src/main/java/wecui/obfuscation/Obfuscation.java
// public class Obfuscation implements InitializationFactory {
// 
//     protected WorldEditCUI controller;
//     protected Minecraft minecraft;
// 
//     public Obfuscation(WorldEditCUI controller) {
//         this.controller = controller;
//     }
// 
//     @Override
//     public void initialize() {
//         this.minecraft = this.controller.getMinecraft();
//     }
// 
//     public boolean isMultiplayerWorld() {
//         return true; // TODO - Temprarily until I can figure out the new server thing
//         //return minecraft.l();
//     }
// 
//     /**
//      * Displays a chat message on the screen, if the player is currently playing
//      * @param chat 
//      */
//     public void showChatMessage(String chat) {
//         if (getPlayer() != null) {
//             getPlayer().b(chat);
//         }
//     }
// 
//     public EntityPlayerSP getPlayer() {
//         return getPlayer(minecraft);
//     }
// 
//     public WorldClient getWorld() {
//         return getWorld(minecraft);
//     }
// 
//     public Entity spawnEntity() {
//         Minecraft mc = this.controller.getMinecraft();
// 
//         Entity entity = new RenderEntity(this.controller, getWorld(mc));
//         setEntityPositionToPlayer(mc, entity);
//         getWorld(mc).d(entity);
//         setEntityPositionToPlayer(mc, entity);
//         controller.getDebugger().debug("RenderEntity spawned");
//         return entity;
//     }
// 
//     public static double getPlayerX(EntityPlayerSP player) {
//         return player.t;
//     }
// 
//     public static double getPlayerY(EntityPlayerSP player) {
//         return player.u;
//     }
// 
//     public static double getPlayerZ(EntityPlayerSP player) {
//         return player.v;
//     }
// 
//     public double getPlayerXGuess(float renderTick) {
//         EntityPlayerSP plyr = getPlayer();
//         return plyr.q + ((plyr.t - plyr.q) * renderTick);
//     }
// 
//     public double getPlayerYGuess(float renderTick) {
//         EntityPlayerSP plyr = getPlayer();
//         return plyr.r + ((plyr.u - plyr.r) * renderTick);
//     }
// 
//     public double getPlayerZGuess(float renderTick) {
//         EntityPlayerSP plyr = getPlayer();
//         return plyr.s + ((plyr.v - plyr.s) * renderTick);
//     }
// 
//     public static EntityPlayerSP getPlayer(Minecraft mc) {
//         return mc.g;
//     }
// 
//     public static WorldClient getWorld(Minecraft mc) {
//         return mc.e;
//     }
// 
//     public static void setEntityPositionToPlayer(Minecraft mc, Entity entity) {
//         entity.b(getPlayerX(mc.g), getPlayerY(mc.g), getPlayerZ(mc.g));
//     }
// 
//     public NetClientHandler getNetClientHandler(EntityClientPlayerMP player) {
//         return player.a;
//     }
// 
//     public static String getChatFromPacket(Packet3Chat packet) {
//         return packet.b;
//     }
// 
//     public static byte[] getBytesFromPacket(Packet250CustomPayload packet) {
//         return packet.c;
//     }
// 
//     public static Packet250CustomPayload newPayloadPacket(String name, int len, byte[] data) {
//         Packet250CustomPayload packet = new Packet250CustomPayload();
//         packet.a = name;
//         packet.b = len;
//         packet.c = data;
//         return packet;
//     }
// 
//     public static File getMinecraftDir() {
//         return Minecraft.b();
//     }
// 
//     public static File getWorldEditCUIDir() {
//         return new File(getMinecraftDir(), "mods" + File.separator + "WorldEditCUI");
//     }
// }
// 
// Path: src/main/java/wecui/util/ConsoleLogFormatter.java
// public class ConsoleLogFormatter extends Formatter {
// 
//     private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 
//     public String format(LogRecord logrecord) {
//         StringBuilder stringbuilder = new StringBuilder();
// 
//         stringbuilder.append(this.format.format(Long.valueOf(logrecord.getMillis())));
//         Level level = logrecord.getLevel();
// 
//         if (level == Level.FINEST) {
//             stringbuilder.append(" [FINEST] ");
//         } else if (level == Level.FINER) {
//             stringbuilder.append(" [FINER] ");
//         } else if (level == Level.FINE) {
//             stringbuilder.append(" [FINE] ");
//         } else if (level == Level.INFO) {
//             stringbuilder.append(" [INFO] ");
//         } else if (level == Level.WARNING) {
//             stringbuilder.append(" [WARNING] ");
//         } else if (level == Level.SEVERE) {
//             stringbuilder.append(" [SEVERE] ");
//         } else {
//             stringbuilder.append(" [").append(level.getLocalizedName()).append("] ");
//         }
// 
//         stringbuilder.append(logrecord.getMessage());
//         stringbuilder.append('\n');
//         Throwable throwable = logrecord.getThrown();
// 
//         if (throwable != null) {
//             StringWriter stringwriter = new StringWriter();
// 
//             throwable.printStackTrace(new PrintWriter(stringwriter));
//             stringbuilder.append(stringwriter.toString());
//         }
// 
//         return stringbuilder.toString();
//     }
// }


import java.io.File;
import java.io.IOException;
import java.util.logging.ConsoleHandler;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import wecui.exception.InitializationException;
import wecui.obfuscation.Obfuscation;
import wecui.util.ConsoleLogFormatter;
package wecui;


/**
 * Debugging helper class
 * 
 * @author yetanotherx
 * 
 */
public class CUIDebug implements InitializationFactory {

    protected WorldEditCUI controller;
    protected File debugFile;
    protected boolean debugMode = false;
    protected final static Logger logger = Logger.getLogger("WorldEditCUI");

    public CUIDebug(WorldEditCUI controller) {
        this.controller = controller;
    }

    @Override
    public void initialize() throws InitializationException {

// Path: src/main/java/wecui/exception/InitializationException.java
// public class InitializationException extends Exception {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public InitializationException(String string) {
//         super(string);
//     }
// 
//     public InitializationException() {
//     }
// }
// 
// Path: src/main/java/wecui/obfuscation/Obfuscation.java
// public class Obfuscation implements InitializationFactory {
// 
//     protected WorldEditCUI controller;
//     protected Minecraft minecraft;
// 
//     public Obfuscation(WorldEditCUI controller) {
//         this.controller = controller;
//     }
// 
//     @Override
//     public void initialize() {
//         this.minecraft = this.controller.getMinecraft();
//     }
// 
//     public boolean isMultiplayerWorld() {
//         return true; // TODO - Temprarily until I can figure out the new server thing
//         //return minecraft.l();
//     }
// 
//     /**
//      * Displays a chat message on the screen, if the player is currently playing
//      * @param chat 
//      */
//     public void showChatMessage(String chat) {
//         if (getPlayer() != null) {
//             getPlayer().b(chat);
//         }
//     }
// 
//     public EntityPlayerSP getPlayer() {
//         return getPlayer(minecraft);
//     }
// 
//     public WorldClient getWorld() {
//         return getWorld(minecraft);
//     }
// 
//     public Entity spawnEntity() {
//         Minecraft mc = this.controller.getMinecraft();
// 
//         Entity entity = new RenderEntity(this.controller, getWorld(mc));
//         setEntityPositionToPlayer(mc, entity);
//         getWorld(mc).d(entity);
//         setEntityPositionToPlayer(mc, entity);
//         controller.getDebugger().debug("RenderEntity spawned");
//         return entity;
//     }
// 
//     public static double getPlayerX(EntityPlayerSP player) {
//         return player.t;
//     }
// 
//     public static double getPlayerY(EntityPlayerSP player) {
//         return player.u;
//     }
// 
//     public static double getPlayerZ(EntityPlayerSP player) {
//         return player.v;
//     }
// 
//     public double getPlayerXGuess(float renderTick) {
//         EntityPlayerSP plyr = getPlayer();
//         return plyr.q + ((plyr.t - plyr.q) * renderTick);
//     }
// 
//     public double getPlayerYGuess(float renderTick) {
//         EntityPlayerSP plyr = getPlayer();
//         return plyr.r + ((plyr.u - plyr.r) * renderTick);
//     }
// 
//     public double getPlayerZGuess(float renderTick) {
//         EntityPlayerSP plyr = getPlayer();
//         return plyr.s + ((plyr.v - plyr.s) * renderTick);
//     }
// 
//     public static EntityPlayerSP getPlayer(Minecraft mc) {
//         return mc.g;
//     }
// 
//     public static WorldClient getWorld(Minecraft mc) {
//         return mc.e;
//     }
// 
//     public static void setEntityPositionToPlayer(Minecraft mc, Entity entity) {
//         entity.b(getPlayerX(mc.g), getPlayerY(mc.g), getPlayerZ(mc.g));
//     }
// 
//     public NetClientHandler getNetClientHandler(EntityClientPlayerMP player) {
//         return player.a;
//     }
// 
//     public static String getChatFromPacket(Packet3Chat packet) {
//         return packet.b;
//     }
// 
//     public static byte[] getBytesFromPacket(Packet250CustomPayload packet) {
//         return packet.c;
//     }
// 
//     public static Packet250CustomPayload newPayloadPacket(String name, int len, byte[] data) {
//         Packet250CustomPayload packet = new Packet250CustomPayload();
//         packet.a = name;
//         packet.b = len;
//         packet.c = data;
//         return packet;
//     }
// 
//     public static File getMinecraftDir() {
//         return Minecraft.b();
//     }
// 
//     public static File getWorldEditCUIDir() {
//         return new File(getMinecraftDir(), "mods" + File.separator + "WorldEditCUI");
//     }
// }
// 
// Path: src/main/java/wecui/util/ConsoleLogFormatter.java
// public class ConsoleLogFormatter extends Formatter {
// 
//     private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 
//     public String format(LogRecord logrecord) {
//         StringBuilder stringbuilder = new StringBuilder();
// 
//         stringbuilder.append(this.format.format(Long.valueOf(logrecord.getMillis())));
//         Level level = logrecord.getLevel();
// 
//         if (level == Level.FINEST) {
//             stringbuilder.append(" [FINEST] ");
//         } else if (level == Level.FINER) {
//             stringbuilder.append(" [FINER] ");
//         } else if (level == Level.FINE) {
//             stringbuilder.append(" [FINE] ");
//         } else if (level == Level.INFO) {
//             stringbuilder.append(" [INFO] ");
//         } else if (level == Level.WARNING) {
//             stringbuilder.append(" [WARNING] ");
//         } else if (level == Level.SEVERE) {
//             stringbuilder.append(" [SEVERE] ");
//         } else {
//             stringbuilder.append(" [").append(level.getLocalizedName()).append("] ");
//         }
// 
//         stringbuilder.append(logrecord.getMessage());
//         stringbuilder.append('\n');
//         Throwable throwable = logrecord.getThrown();
// 
//         if (throwable != null) {
//             StringWriter stringwriter = new StringWriter();
// 
//             throwable.printStackTrace(new PrintWriter(stringwriter));
//             stringbuilder.append(stringwriter.toString());
//         }
// 
//         return stringbuilder.toString();
//     }
// }


// Path: src/main/java/wecui/CUIDebug.java
import java.io.File;
import java.io.IOException;
import java.util.logging.ConsoleHandler;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import wecui.exception.InitializationException;
import wecui.obfuscation.Obfuscation;
import wecui.util.ConsoleLogFormatter;

package wecui;


/**
 * Debugging helper class
 * 
 * @author yetanotherx
 * 
 */
public class CUIDebug implements InitializationFactory {

    protected WorldEditCUI controller;
    protected File debugFile;
    protected boolean debugMode = false;
    protected final static Logger logger = Logger.getLogger("WorldEditCUI");

    public CUIDebug(WorldEditCUI controller) {
        this.controller = controller;
    }

    @Override
    public void initialize() throws InitializationException {

        ConsoleLogFormatter formatter = new ConsoleLogFormatter();