// Path: src/main/java/net/darkhax/darkutils/addons/AddonManager.java
// public class AddonManager {
//     
//     private ICurioAddon curio;
//     
//     public AddonManager() {
//         
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onCommonSetup);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueIMC);
//     }
//     
//     private void onCommonSetup (FMLCommonSetupEvent event) {
//         
//         this.curio = ModUtils.callIfPresent("curios", () -> () -> new CurioAddon(), () -> () -> ICurioAddon.DEFAULT);
//     }
//     
//     private void enqueIMC (InterModEnqueueEvent event) {
//         
//         this.curio.enqueCommunication();
//     }
//     
//     public ICurioAddon curios () {
//         
//         return this.curio;
//     }
// }
// 
// Path: src/main/java/net/darkhax/darkutils/features/slimecrucible/MessageSyncCrucibleType.java
// public class MessageSyncCrucibleType {
//     
//     /**
//      * The Id of the crucible to sync.
//      */
//     private final ResourceLocation crucibleId;
//     
//     public MessageSyncCrucibleType(ResourceLocation crucibleId) {
//         
//         this.crucibleId = crucibleId;
//     }
//     
//     /**
//      * Gets the type of slime crucible being synced to the client.
//      * 
//      * @return The Id of the slime crucible type being synced.
//      */
//     public ResourceLocation getCrucibleId () {
//         
//         return this.crucibleId;
//     }
// }
// 
// Path: src/main/java/net/darkhax/darkutils/network/NetworkHandlerClient.java
// public class NetworkHandlerClient {
//     
//     public static MessageSyncCrucibleType decodeStageMessage (PacketBuffer buffer) {
//         
//         return new MessageSyncCrucibleType(buffer.readResourceLocation());
//     }
//     
//     public static void processSyncStagesMessage (MessageSyncCrucibleType message, Supplier<Context> context) {
//         
//         final Container openedContainer = Minecraft.getInstance().player.openContainer;
//         final SlimeCrucibleType type = SlimeCrucibleType.getType(message.getCrucibleId());
//         
//         if (openedContainer instanceof ContainerSlimeCrucible && type != null) {
//             
//             ((ContainerSlimeCrucible) openedContainer).setCrucibleType(type);
//         }
//     }
// }
// 
// Path: src/main/java/net/darkhax/darkutils/network/NetworkHandlerServer.java
// public class NetworkHandlerServer {
//     
//     public static void encodeStageMessage (MessageSyncCrucibleType packet, PacketBuffer buffer) {
//         
//         buffer.writeResourceLocation(packet.getCrucibleId());
//     }
// }


import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.darkhax.bookshelf.item.ItemGroupBase;
import net.darkhax.bookshelf.network.NetworkHelper;
import net.darkhax.bookshelf.registry.RegistryHelper;
import net.darkhax.bookshelf.registry.RegistryHelperClient;
import net.darkhax.darkutils.addons.AddonManager;
import net.darkhax.darkutils.features.slimecrucible.MessageSyncCrucibleType;
import net.darkhax.darkutils.network.NetworkHandlerClient;
import net.darkhax.darkutils.network.NetworkHandlerServer;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
package net.darkhax.darkutils;



@Mod(DarkUtils.MOD_ID)
public class DarkUtils {
    
    public static final String MOD_ID = "darkutils";
    
    public static final String MOD_NAME = "Dark Utilities";
    
    public static final Logger LOG = LogManager.getLogger(MOD_NAME);
    
    public static final ItemGroup ITEM_GROUP = new ItemGroupBase(MOD_ID, () -> new ItemStack(DarkUtils.content.vectorPlate));
    
    public static final NetworkHelper NETWORK = new NetworkHelper(new ResourceLocation(MOD_ID, "main"), "2.0.X");
    
    public static RegistryHelper registry;
    
    public static Content content;
    
    public static AddonManager addons;
    
    public DarkUtils() {
        
        registry = DistExecutor.runForDist( () -> () -> new RegistryHelperClient(MOD_ID, LOG, ITEM_GROUP), () -> () -> new RegistryHelper(MOD_ID, LOG, ITEM_GROUP));
        content = DistExecutor.runForDist( () -> () -> new ContentClient(registry), () -> () -> new Content(registry));
// Path: src/main/java/net/darkhax/darkutils/addons/AddonManager.java
// public class AddonManager {
//     
//     private ICurioAddon curio;
//     
//     public AddonManager() {
//         
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onCommonSetup);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueIMC);
//     }
//     
//     private void onCommonSetup (FMLCommonSetupEvent event) {
//         
//         this.curio = ModUtils.callIfPresent("curios", () -> () -> new CurioAddon(), () -> () -> ICurioAddon.DEFAULT);
//     }
//     
//     private void enqueIMC (InterModEnqueueEvent event) {
//         
//         this.curio.enqueCommunication();
//     }
//     
//     public ICurioAddon curios () {
//         
//         return this.curio;
//     }
// }
// 
// Path: src/main/java/net/darkhax/darkutils/features/slimecrucible/MessageSyncCrucibleType.java
// public class MessageSyncCrucibleType {
//     
//     /**
//      * The Id of the crucible to sync.
//      */
//     private final ResourceLocation crucibleId;
//     
//     public MessageSyncCrucibleType(ResourceLocation crucibleId) {
//         
//         this.crucibleId = crucibleId;
//     }
//     
//     /**
//      * Gets the type of slime crucible being synced to the client.
//      * 
//      * @return The Id of the slime crucible type being synced.
//      */
//     public ResourceLocation getCrucibleId () {
//         
//         return this.crucibleId;
//     }
// }
// 
// Path: src/main/java/net/darkhax/darkutils/network/NetworkHandlerClient.java
// public class NetworkHandlerClient {
//     
//     public static MessageSyncCrucibleType decodeStageMessage (PacketBuffer buffer) {
//         
//         return new MessageSyncCrucibleType(buffer.readResourceLocation());
//     }
//     
//     public static void processSyncStagesMessage (MessageSyncCrucibleType message, Supplier<Context> context) {
//         
//         final Container openedContainer = Minecraft.getInstance().player.openContainer;
//         final SlimeCrucibleType type = SlimeCrucibleType.getType(message.getCrucibleId());
//         
//         if (openedContainer instanceof ContainerSlimeCrucible && type != null) {
//             
//             ((ContainerSlimeCrucible) openedContainer).setCrucibleType(type);
//         }
//     }
// }
// 
// Path: src/main/java/net/darkhax/darkutils/network/NetworkHandlerServer.java
// public class NetworkHandlerServer {
//     
//     public static void encodeStageMessage (MessageSyncCrucibleType packet, PacketBuffer buffer) {
//         
//         buffer.writeResourceLocation(packet.getCrucibleId());
//     }
// }


// Path: src/main/java/net/darkhax/darkutils/DarkUtils.java
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.darkhax.bookshelf.item.ItemGroupBase;
import net.darkhax.bookshelf.network.NetworkHelper;
import net.darkhax.bookshelf.registry.RegistryHelper;
import net.darkhax.bookshelf.registry.RegistryHelperClient;
import net.darkhax.darkutils.addons.AddonManager;
import net.darkhax.darkutils.features.slimecrucible.MessageSyncCrucibleType;
import net.darkhax.darkutils.network.NetworkHandlerClient;
import net.darkhax.darkutils.network.NetworkHandlerServer;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

package net.darkhax.darkutils;



@Mod(DarkUtils.MOD_ID)
public class DarkUtils {
    
    public static final String MOD_ID = "darkutils";
    
    public static final String MOD_NAME = "Dark Utilities";
    
    public static final Logger LOG = LogManager.getLogger(MOD_NAME);
    
    public static final ItemGroup ITEM_GROUP = new ItemGroupBase(MOD_ID, () -> new ItemStack(DarkUtils.content.vectorPlate));
    
    public static final NetworkHelper NETWORK = new NetworkHelper(new ResourceLocation(MOD_ID, "main"), "2.0.X");
    
    public static RegistryHelper registry;
    
    public static Content content;
    
    public static AddonManager addons;
    
    public DarkUtils() {
        
        registry = DistExecutor.runForDist( () -> () -> new RegistryHelperClient(MOD_ID, LOG, ITEM_GROUP), () -> () -> new RegistryHelper(MOD_ID, LOG, ITEM_GROUP));
        content = DistExecutor.runForDist( () -> () -> new ContentClient(registry), () -> () -> new Content(registry));
        NETWORK.registerEnqueuedMessage(MessageSyncCrucibleType.class, NetworkHandlerServer::encodeStageMessage, t -> NetworkHandlerClient.decodeStageMessage(t), (t, u) -> NetworkHandlerClient.processSyncStagesMessage(t, u));