// Path: src/main/java/cn/mccraft/chinacraft/common/ChinaCraft.java
// @Mod(modid = ChinaCraft.MODID, name = ChinaCraft.NAME, version = ChinaCraft.VERSION, dependencies = "required-after:biomesoplenty")
// public final class ChinaCraft {
//     public static final String MODID = "chinacraft";
//     public static final String NAME = "ChinaCraft 2";
//     public static final String VERSION = "0.0.1";
// 
//     @SidedProxy(clientSide = "cn.mccraft.chinacraft.client.ClientProxy", serverSide = "cn.mccraft.chinacraft.common.CommonProxy")
//     private static CommonProxy proxy;
// 
//     @Mod.Instance(ChinaCraft.MODID)
//     private static ChinaCraft instance;
// 
//     private CCEventHandler eventHandler;
// 
//     private static SimpleNetworkWrapper network;
// 
//     private static final Logger LOGGER = LogManager.getLogger(MODID);
// 
//     private JsonSettings settings;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent event) {
//         settings = new JsonSettings(event.getModConfigurationDirectory(), "config");
//         proxy.preInit(event);
//         eventHandler = new CCEventHandler();
//     }
// 
//     @EventHandler
//     public void init(FMLInitializationEvent event) {
//         network = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
//         network.registerMessage(new RedPacketMessage.Handler(), RedPacketMessage.class,0, Side.SERVER);
// 
//         NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
// 
//         proxy.init(event);
//     }
// 
//     @EventHandler
//     public void postInit(FMLPostInitializationEvent event) {
//         proxy.postInit(event);
//     }
// 
//     @EventHandler
//     public void loadComplete(FMLLoadCompleteEvent event) {
//         proxy.loadComplete(event);
//     }
// 
//     public JsonSettings getSettings() {
//         return settings;
//     }
// 
//     public CCEventHandler getEventHandler() {
//         return eventHandler;
//     }
// 
//     public static Logger getLogger() {
//         return LOGGER;
//     }
// 
//     public static ChinaCraft getInstance() {
//         return instance;
//     }
// 
//     public static SimpleNetworkWrapper getNetwork() {
//         return network;
//     }
// 
//     public static CommonProxy getProxy() {
//         return proxy;
//     }
// }
// 
// Path: src/main/java/cn/mccraft/chinacraft/init/CCCapabilities.java
// public interface CCCapabilities {
//     @RegCapability(storageClass = CapabilityCrusherStats.Storage.class, implClass = CapabilityCrusherStats.Implementation.class)
//     @CapabilityInject(CrusherStats.class)
//     Capability<CrusherStats> CRUSHER_STATS_CAPABILITY = null;
// 
//     @RegCapability(storageClass = CapabilityColor.Storage.class, implClass = CapabilityColor.Implementation.class)
//     @CapabilityInject(ItemStackColorable.class)
//     Capability<ItemStackColorable> ITEM_STACK_COLORABLE_CAPABILITY = null;
// 
//     @RegCapability(storageClass = CapabilitySilkworm.Storage.class, implClass = CapabilitySilkworm.Implementation.class)
//     @CapabilityInject(Silkworm.class)
//     Capability<Silkworm> SILKWORM_CAPABILITY = null;
// }


import cn.mccraft.chinacraft.common.ChinaCraft;
import cn.mccraft.chinacraft.init.CCCapabilities;
import cn.mccraft.util.loader.Load;
import cn.mccraft.chinacraft.util.loader.annotation.RegCapability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import java.lang.reflect.Field;
package cn.mccraft.chinacraft.capability;



public class CapabilityLoader {
    @Load
    public void load(FMLPreInitializationEvent event) {
        for (Field field : CCCapabilities.class.getFields()) {
            try {
                register(field.getAnnotation(CapabilityInject.class).value(), field.getAnnotation(RegCapability.class));
            } catch (Exception e) {
// Path: src/main/java/cn/mccraft/chinacraft/common/ChinaCraft.java
// @Mod(modid = ChinaCraft.MODID, name = ChinaCraft.NAME, version = ChinaCraft.VERSION, dependencies = "required-after:biomesoplenty")
// public final class ChinaCraft {
//     public static final String MODID = "chinacraft";
//     public static final String NAME = "ChinaCraft 2";
//     public static final String VERSION = "0.0.1";
// 
//     @SidedProxy(clientSide = "cn.mccraft.chinacraft.client.ClientProxy", serverSide = "cn.mccraft.chinacraft.common.CommonProxy")
//     private static CommonProxy proxy;
// 
//     @Mod.Instance(ChinaCraft.MODID)
//     private static ChinaCraft instance;
// 
//     private CCEventHandler eventHandler;
// 
//     private static SimpleNetworkWrapper network;
// 
//     private static final Logger LOGGER = LogManager.getLogger(MODID);
// 
//     private JsonSettings settings;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent event) {
//         settings = new JsonSettings(event.getModConfigurationDirectory(), "config");
//         proxy.preInit(event);
//         eventHandler = new CCEventHandler();
//     }
// 
//     @EventHandler
//     public void init(FMLInitializationEvent event) {
//         network = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
//         network.registerMessage(new RedPacketMessage.Handler(), RedPacketMessage.class,0, Side.SERVER);
// 
//         NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
// 
//         proxy.init(event);
//     }
// 
//     @EventHandler
//     public void postInit(FMLPostInitializationEvent event) {
//         proxy.postInit(event);
//     }
// 
//     @EventHandler
//     public void loadComplete(FMLLoadCompleteEvent event) {
//         proxy.loadComplete(event);
//     }
// 
//     public JsonSettings getSettings() {
//         return settings;
//     }
// 
//     public CCEventHandler getEventHandler() {
//         return eventHandler;
//     }
// 
//     public static Logger getLogger() {
//         return LOGGER;
//     }
// 
//     public static ChinaCraft getInstance() {
//         return instance;
//     }
// 
//     public static SimpleNetworkWrapper getNetwork() {
//         return network;
//     }
// 
//     public static CommonProxy getProxy() {
//         return proxy;
//     }
// }
// 
// Path: src/main/java/cn/mccraft/chinacraft/init/CCCapabilities.java
// public interface CCCapabilities {
//     @RegCapability(storageClass = CapabilityCrusherStats.Storage.class, implClass = CapabilityCrusherStats.Implementation.class)
//     @CapabilityInject(CrusherStats.class)
//     Capability<CrusherStats> CRUSHER_STATS_CAPABILITY = null;
// 
//     @RegCapability(storageClass = CapabilityColor.Storage.class, implClass = CapabilityColor.Implementation.class)
//     @CapabilityInject(ItemStackColorable.class)
//     Capability<ItemStackColorable> ITEM_STACK_COLORABLE_CAPABILITY = null;
// 
//     @RegCapability(storageClass = CapabilitySilkworm.Storage.class, implClass = CapabilitySilkworm.Implementation.class)
//     @CapabilityInject(Silkworm.class)
//     Capability<Silkworm> SILKWORM_CAPABILITY = null;
// }


// Path: src/main/java/cn/mccraft/chinacraft/capability/CapabilityLoader.java
import cn.mccraft.chinacraft.common.ChinaCraft;
import cn.mccraft.chinacraft.init.CCCapabilities;
import cn.mccraft.util.loader.Load;
import cn.mccraft.chinacraft.util.loader.annotation.RegCapability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import java.lang.reflect.Field;

package cn.mccraft.chinacraft.capability;



public class CapabilityLoader {
    @Load
    public void load(FMLPreInitializationEvent event) {
        for (Field field : CCCapabilities.class.getFields()) {
            try {
                register(field.getAnnotation(CapabilityInject.class).value(), field.getAnnotation(RegCapability.class));
            } catch (Exception e) {
                ChinaCraft.getLogger().warn("Un-able to register capability " + field.toGenericString(), e);