public class FMLEmbeddedChannel
extends EmbeddedChannel
EmbeddedChannel
. Provides some convenience methods
associated with the specific needs of FML network handling.Constructor and Description |
---|
FMLEmbeddedChannel(ModContainer container,
java.lang.String channelName,
Side source,
ChannelHandler... handlers) |
FMLEmbeddedChannel(java.lang.String channelName,
Side source,
ChannelHandler... handlers) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
findChannelHandlerNameForType(java.lang.Class<? extends ChannelHandler> type) |
Packet |
generatePacketFrom(java.lang.Object object)
Utility method to generate a regular packet from a custom packet.
|
public FMLEmbeddedChannel(java.lang.String channelName, Side source, ChannelHandler... handlers)
public FMLEmbeddedChannel(ModContainer container, java.lang.String channelName, Side source, ChannelHandler... handlers)
public Packet generatePacketFrom(java.lang.Object object)
FMLIndexedMessageToMessageCodec
,
transforming from mod packets to standard FMLProxyPacket
s.
This is mostly useful in cases where vanilla expects a packet, such as the TileEntity getDescriptionPacket.object
- The inbound packetpublic java.lang.String findChannelHandlerNameForType(java.lang.Class<? extends ChannelHandler> type)