Java 类net.minecraftforge.fml.common.network.FMLEventChannel 实例源码

项目:Battlegear2    文件:BattlegearPacketHandeler.java   
public void register(){
    FMLEventChannel eventChannel;
    for(String channel:map.keySet()){
        eventChannel = NetworkRegistry.INSTANCE.newEventDrivenChannel(channel);
        eventChannel.register(this);
        channels.put(channel, eventChannel);
    }
}
项目:CustomOreGen    文件:CustomPacketPayload.java   
private static void registerChannel(Object mod, String name) {
    FMLEventChannel channel = NetworkRegistry.INSTANCE.newEventDrivenChannel(name);
    channels.put(name, channel);
    channel.register(mod);
}