// Path: src/main/java/myessentials/MyEssentialsCore.java
// @Mod(modid = "MyEssentials-Core", name = "MyEssentials-Core", version = "@VERSION@", dependencies = "required-after:Forge", acceptableRemoteVersions = "*")
// public class MyEssentialsCore {
//     @Instance("MyEssentials-Core")
//     public static MyEssentialsCore instance;
// 
//     public Local LOCAL;
//     public Logger LOG;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent ev) {
// 
//         LOG = ev.getModLog();
//         Constants.CONFIG_FOLDER = ev.getModConfigurationDirectory().getPath() + "/MyEssentials-Core/";
//         Constants.DATABASE_FOLDER = ev.getModConfigurationDirectory().getParent() + "/databases/";
//         // Load Configs
//         Config.instance.init(Constants.CONFIG_FOLDER + "/Core.cfg", "MyEssentials-Core");
//         // REF: The localization can simply take the whole config instance to get the localization needed.
//         LOCAL = new Local(Constants.CONFIG_FOLDER + "/localization/", Config.instance.localization.get(), "/myessentials/localization/", MyEssentialsCore.class);
//         LocalManager.register(LOCAL, "myessentials");
// 
//         // Register handlers/trackers
//         FMLCommonHandler.instance().bus().register(PlayerTracker.instance);
//         MinecraftForge.EVENT_BUS.register(PlayerTracker.instance);
// 
//         FMLCommonHandler.instance().bus().register(ToolManager.instance);
//         MinecraftForge.EVENT_BUS.register(ToolManager.instance);
// 
//         FMLCommonHandler.instance().bus().register(SignManager.instance);
//         MinecraftForge.EVENT_BUS.register(SignManager.instance);
//     }
// }
// 
// Path: src/main/java/myessentials/chat/api/IChatFormat.java
// public interface IChatFormat {
// 
//     IChatComponent toChatMessage();
// 
// }


import myessentials.MyEssentialsCore;
import myessentials.chat.api.IChatFormat;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IChatComponent;
package myessentials.entities.api;


/**
 * Helper class for storing position of a chunk
 */
public class ChunkPos implements IChatFormat {
    private final int dim;
    private final int x;
    private final int z;

    public ChunkPos(int dim, int x, int z) {
        this.dim = dim;
        this.x = x;
        this.z = z;
    }

    public int getX() {
        return x;
    }

    public int getZ() {
        return z;
    }

    public int getDim() {
        return dim;
    }

    @Override
    public String toString() {
        return toChatMessage().getUnformattedText();
    }

    @Override
    public IChatComponent toChatMessage() {
// Path: src/main/java/myessentials/MyEssentialsCore.java
// @Mod(modid = "MyEssentials-Core", name = "MyEssentials-Core", version = "@VERSION@", dependencies = "required-after:Forge", acceptableRemoteVersions = "*")
// public class MyEssentialsCore {
//     @Instance("MyEssentials-Core")
//     public static MyEssentialsCore instance;
// 
//     public Local LOCAL;
//     public Logger LOG;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent ev) {
// 
//         LOG = ev.getModLog();
//         Constants.CONFIG_FOLDER = ev.getModConfigurationDirectory().getPath() + "/MyEssentials-Core/";
//         Constants.DATABASE_FOLDER = ev.getModConfigurationDirectory().getParent() + "/databases/";
//         // Load Configs
//         Config.instance.init(Constants.CONFIG_FOLDER + "/Core.cfg", "MyEssentials-Core");
//         // REF: The localization can simply take the whole config instance to get the localization needed.
//         LOCAL = new Local(Constants.CONFIG_FOLDER + "/localization/", Config.instance.localization.get(), "/myessentials/localization/", MyEssentialsCore.class);
//         LocalManager.register(LOCAL, "myessentials");
// 
//         // Register handlers/trackers
//         FMLCommonHandler.instance().bus().register(PlayerTracker.instance);
//         MinecraftForge.EVENT_BUS.register(PlayerTracker.instance);
// 
//         FMLCommonHandler.instance().bus().register(ToolManager.instance);
//         MinecraftForge.EVENT_BUS.register(ToolManager.instance);
// 
//         FMLCommonHandler.instance().bus().register(SignManager.instance);
//         MinecraftForge.EVENT_BUS.register(SignManager.instance);
//     }
// }
// 
// Path: src/main/java/myessentials/chat/api/IChatFormat.java
// public interface IChatFormat {
// 
//     IChatComponent toChatMessage();
// 
// }


// Path: src/main/java/myessentials/entities/api/ChunkPos.java
import myessentials.MyEssentialsCore;
import myessentials.chat.api.IChatFormat;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IChatComponent;

package myessentials.entities.api;


/**
 * Helper class for storing position of a chunk
 */
public class ChunkPos implements IChatFormat {
    private final int dim;
    private final int x;
    private final int z;

    public ChunkPos(int dim, int x, int z) {
        this.dim = dim;
        this.x = x;
        this.z = z;
    }

    public int getX() {
        return x;
    }

    public int getZ() {
        return z;
    }

    public int getDim() {
        return dim;
    }

    @Override
    public String toString() {
        return toChatMessage().getUnformattedText();
    }

    @Override
    public IChatComponent toChatMessage() {
        return MyEssentialsCore.instance.LOCAL.getLocalization("myessentials.format.chunkpos", x, z, dim);