Package net.minecraftforge.network
Class Channel<MSG>
java.lang.Object
net.minecraftforge.network.Channel<MSG>
- Direct Known Subclasses:
- EventNetworkChannel,- SimpleChannel
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetName()intbooleanisRemotePresent(Connection connection) Returns true if the channel is present in the given connection.voidreply(MSG msg, CustomPayloadEvent.Context context) voidsend(MSG msg, Connection connection) voidsend(MSG msg, PacketDistributor.PacketTarget target) Send a message to thePacketDistributor.PacketTargetfrom aPacketDistributorinstance.abstract FriendlyByteBuf(package private) Packet<?>toVanillaPacket(Connection connection, MSG message) 
- 
Field Details- 
instance
 
- 
- 
Constructor Details- 
Channel
 
- 
- 
Method Details- 
getName
- 
getProtocolVersionpublic int getProtocolVersion()
- 
isRemotePresentReturns true if the channel is present in the given connection.
- 
toBuffer
- 
toVanillaPacket
- 
send
- 
sendSend a message to thePacketDistributor.PacketTargetfrom aPacketDistributorinstance.channel.send(message, PacketDistributor.PLAYER.with(()->player))- Type Parameters:
- MSG- The type of the message
- Parameters:
- target- The curried target from a PacketDistributor
- message- The message to send
 
- 
reply
 
-