net.minecraftforge.fml.common.network.FMLEmbeddedChannel Java Examples

The following examples show how to use net.minecraftforge.fml.common.network.FMLEmbeddedChannel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SyncChannelHolder.java    From OpenModsLib with MIT License 5 votes vote down vote up
private SyncChannelHolder() {
	final EnumMap<Side, FMLEmbeddedChannel> channels = NetworkRegistry.INSTANCE.newChannel(CHANNEL_NAME, new InboundSyncHandler());

	for (Map.Entry<Side, FMLEmbeddedChannel> e : channels.entrySet()) {
		final FMLEmbeddedChannel channel = e.getValue();
		ExtendedOutboundHandler.install(channel);
		senders.put(e.getKey(), ExtPacketSenderFactory.createMultiplePlayersSender(channel));
	}
}
 
Example #2
Source File: RpcCallDispatcher.java    From OpenModsLib with MIT License 4 votes vote down vote up
@Override
protected FMLEmbeddedChannel getChannel(Side side) {
	return channels.get(side);
}
 
Example #3
Source File: NetworkEventDispatcher.java    From OpenModsLib with MIT License 4 votes vote down vote up
@Override
protected FMLEmbeddedChannel getChannel(Side side) {
	return channels.get(side);
}
 
Example #4
Source File: ExtendedOutboundHandler.java    From OpenModsLib with MIT License 4 votes vote down vote up
public static void install(Map<Side, FMLEmbeddedChannel> channels) {
	for (Side side : Side.values())
		install(channels.get(side));
}
 
Example #5
Source File: ExtendedOutboundHandler.java    From OpenModsLib with MIT License 4 votes vote down vote up
public static void install(FMLEmbeddedChannel fmlEmbeddedChannel) {
	fmlEmbeddedChannel.pipeline().addAfter("fml:outbound", "om:outbound", new ExtendedOutboundHandler());
}