Add MCP packet names for Bukkit-Forge hybrid server#862
Add MCP packet names for Bukkit-Forge hybrid server#862dmulloy2 merged 6 commits intodmulloy2:masterfrom
Conversation
|
It seems that we cannot get reliable name on forge servers (which is expected). Adding PacketType lookup using packet id as a fallback will fix the issue. I think adding such a fallback will not hurt reliablity or performance. Any thoughts? |
|
it wouldn’t have that much of an impact on performance. my main consideration is that packet ids change just about every version, so the 1.15 packet ids aren’t the same as the forge/1.12 ids |
|
it might be worthwhile to generate a mapping of forge packet names |
|
I am looking into it and trying to figure out what could be done. |
cde32f1 to
4caada8
Compare
|
Hi @dmulloy2, I have added some forge packet names and helper functions. I have tested this with FastLogin and it works. Any thoughts? If you think this is doable, I will finish adding the rest of packet names. |
|
I have added all MCP & Forge packet names up to 1.12. |
|
Note that these names only works for minecraft 1.12. MC 1.13 and 1.14 both have different packet names. Considering that CatServer / Magma is still at 1.12 so far, this should be sufficient. |
|
I have tested this and it works flawlessly with CatServer. I suppose it should work for Magma too, but not tested. |
|
|
@NewbieOrange It seems still some problems |
|
The changes is not in the release version. Try the lastest snapshot (461+). @Luohuayu |
Fix ProtocolLib returning dynamic PacketType on forge servers, which breaks plugin using PacketType enums.
This PR will fix #858.