// Path: src/main/java/nightkosh/gravestone/core/logger/GSLogger.java
// public class GSLogger {
// 
//     private static Logger logger = LogManager.getLogger(ModInfo.ID);
//     private static Logger graveLogger = new GravesLogger();
// 
//     public static void log(Level logLevel, String message) {
//         logger.log(logLevel, message);
//     }
// 
//     public static void logInfo(String message) {
//         logger.log(Level.INFO, message);
//     }
// 
//     public static void logError(String message) {
//         logger.log(Level.ERROR, message);
//     }
// 
//     public static void logGrave(Level logLevel, String message) {
//         graveLogger.log(logLevel, message);
//     }
// 
//     public static void logInfoGrave(String message) {
//         graveLogger.log(Level.INFO, message);
//     }
// 
//     public static void logErrorGrave(String message) {
//         graveLogger.log(Level.ERROR, message);
//     }
// }


import com.google.common.io.Files;
import nightkosh.gravestone.core.logger.GSLogger;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
                if (file != null && file.exists()) {
                    try {
                        Files.copy(file, backup);
                    } catch (Exception e) {
                        GSLogger.logError("Could not backup old spawn time file");
                    }
                }
                try {
                    if (file != null) {
                        NBTTagCompound data = new NBTTagCompound();
                        for (Map.Entry<String, Long> entry : mobsSpawnTime.entrySet()) {
                            if (entry != null) {
                                data.setLong(entry.getKey(), entry.getValue());
                            }
                        }
                        FileOutputStream fileoutputstream = new FileOutputStream(file);
                        CompressedStreamTools.writeCompressed(data, fileoutputstream);
                        fileoutputstream.close();
                    }
                } catch (Exception e) {
                    GSLogger.logError("Could not save spawn time file");
                    e.printStackTrace();
                    if (file.exists()) {
                        try {
                            file.delete();
                        } catch (Exception e2) {
                        }
                    }
                }
            } catch (Exception e) {
// Path: src/main/java/nightkosh/gravestone/core/logger/GSLogger.java
// public class GSLogger {
// 
//     private static Logger logger = LogManager.getLogger(ModInfo.ID);
//     private static Logger graveLogger = new GravesLogger();
// 
//     public static void log(Level logLevel, String message) {
//         logger.log(logLevel, message);
//     }
// 
//     public static void logInfo(String message) {
//         logger.log(Level.INFO, message);
//     }
// 
//     public static void logError(String message) {
//         logger.log(Level.ERROR, message);
//     }
// 
//     public static void logGrave(Level logLevel, String message) {
//         graveLogger.log(logLevel, message);
//     }
// 
//     public static void logInfoGrave(String message) {
//         graveLogger.log(Level.INFO, message);
//     }
// 
//     public static void logErrorGrave(String message) {
//         graveLogger.log(Level.ERROR, message);
//     }
// }


// Path: src/main/java/nightkosh/gravestone/core/MobHandler.java
import com.google.common.io.Files;
import nightkosh.gravestone.core.logger.GSLogger;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

                if (file != null && file.exists()) {
                    try {
                        Files.copy(file, backup);
                    } catch (Exception e) {
                        GSLogger.logError("Could not backup old spawn time file");
                    }
                }
                try {
                    if (file != null) {
                        NBTTagCompound data = new NBTTagCompound();
                        for (Map.Entry<String, Long> entry : mobsSpawnTime.entrySet()) {
                            if (entry != null) {
                                data.setLong(entry.getKey(), entry.getValue());
                            }
                        }
                        FileOutputStream fileoutputstream = new FileOutputStream(file);
                        CompressedStreamTools.writeCompressed(data, fileoutputstream);
                        fileoutputstream.close();
                    }
                } catch (Exception e) {
                    GSLogger.logError("Could not save spawn time file");
                    e.printStackTrace();
                    if (file.exists()) {
                        try {
                            file.delete();
                        } catch (Exception e2) {
                        }
                    }
                }
            } catch (Exception e) {
                GSLogger.logError("Error saving mobs spawn time");