Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Packet API #18

Open
PizzaCrust opened this issue Jun 15, 2016 · 14 comments
Open

Packet API #18

PizzaCrust opened this issue Jun 15, 2016 · 14 comments

Comments

@PizzaCrust
Copy link
Contributor

No description provided.

@wgaylord
Copy link

This is a great idea. (I wanted to do this for Dimensions.)

@PizzaCrust
Copy link
Contributor Author

Its a core feature if forge mods are supported to enable plugins to interact with mods via packets.

@Techcable
Copy link
Member

Techcable commented Jun 15, 2016

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

@PizzaCrust
Copy link
Contributor Author

just put it into a .internal.* package

@Techcable
Copy link
Member

yes, and no reflection utilities or anything, just PacketMagic.registerPacketListener(Consumer<Object>) and PacketMagic.sendPacket(Player, Object)

@minecrafter
Copy link
Contributor

Oppose, for portability's sake. Fountain can provide a few things to help, but in general I feel this is best handled outside Fountain.

@wgaylord
Copy link

We need to have it on foutain other wise people will be digging around with asm and reflection which is not good.

@phase
Copy link
Member

phase commented Jun 15, 2016

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.

@Techcable
Copy link
Member

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.

@PizzaCrust
Copy link
Contributor Author

Sponge has this already implemented. (Custom Payload Packet), SpongePowered/SpongeAPI@e9f96b7

@minecrafter
Copy link
Contributor

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 SpongePowered/SpongeAPI@e9f96b7

You are receiving this because you commented.
Reply to this email directly, view it on GitHub #18 (comment), or mute the thread https://github.com/notifications/unsubscribe/AA7z9EE_Vsj6LboepBpiiqoGuq67joaPks5qMMyCgaJpZM4I2Wl3.

@PizzaCrust
Copy link
Contributor Author

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.

@minecrafter
Copy link
Contributor

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 #18 (comment), or mute the thread https://github.com/notifications/unsubscribe/AA7z9Cy6UiqOPEwfaELoB-Qm5pxX2a5sks5qMM3lgaJpZM4I2Wl3.

@PizzaCrust
Copy link
Contributor Author

Oh, good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants