Open PizzaCrust opened 8 years ago
Its a core feature if forge mods are supported to enable plugins to interact with mods via packets.
I say we keep the packet API as a unsafe API in a special package and as a separate maven dependency if we're going to do it at all. Sort of like sun.mic.Unsafe
just put it into a .internal.* package
yes, and no reflection utilities or anything, just PacketMagic.registerPacketListener(Consumer<Object>)
and PacketMagic.sendPacket(Player, Object)
Oppose, for portability's sake. Fountain can provide a few things to help, but in general I feel this is best handled outside Fountain.
We need to have it on foutain other wise people will be digging around with asm and reflection which is not good.
Putting in the API is a bad idea. We could have it in the the implementation, so if people want to build off a specific version they get that version's Packets.
Unless we're going to wrap all packets in a version-safe manner, plugins will have to access packet fields with reflection.
Therefore we should put the PacketMagic
class in the implementation, and then plugins like ProtocolLib can provide a safer and more advanced wrapper, but will have to hook into our internals to do so.
Sponge has this already implemented. (Custom Payload Packet), https://github.com/SpongePowered/SpongeAPI/pull/363/commits/e9f96b70c943d267de6756fe91dcc180a843fcdf
Nope. That Sponge PR refers to plugin messaging.
On Jun 16, 2016, at 12:09 AM, PizzaCrust notifications@github.com wrote:
Sponge has this already implemented. (Custom Payload Packet), SpongePowered/SpongeAPI@e9f96b7 https://github.com/SpongePowered/SpongeAPI/pull/363/commits/e9f96b70c943d267de6756fe91dcc180a843fcdf — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FountainMC/FountainAPI/issues/18#issuecomment-226383672, or mute the thread https://github.com/notifications/unsubscribe/AA7z9EE_Vsj6LboepBpiiqoGuq67joaPks5qMMyCgaJpZM4I2Wl3.
Add ChannelBuf. ChannelBuf is an abstract interface to represent a ByteBuffer to allow plugins and the server to read and write data without depending on a specific networking library.
That are packets. Packets = Messages.
I have worked with this specific Sponge API. This is the standard Plugin Message packet in Minecraft. Fountain will support listening and sending messages with this specific packet.
On Jun 16, 2016, at 12:15 AM, PizzaCrust notifications@github.com wrote:
Add ChannelBuf. ChannelBuf is an abstract interface to represent a ByteBuffer to allow plugins and the server to read and write data without depending on a specific networking library.
That are packets. Packets = Messages.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FountainMC/FountainAPI/issues/18#issuecomment-226384296, or mute the thread https://github.com/notifications/unsubscribe/AA7z9Cy6UiqOPEwfaELoB-Qm5pxX2a5sks5qMM3lgaJpZM4I2Wl3.
Oh, good.
This is a great idea. (I wanted to do this for Dimensions.)