-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCPShield Fabric support (1.16.5 through 1.18.2) #91
base: master
Are you sure you want to change the base?
Conversation
This commit introduces Fabric support for the TCPShield RealIP plugin. We use Loom version 0.6 and Minecraft version 1.16.5 to support building with Java 8 alongside the other plugin loader implementations. Configuration loading is done with simple YAML parsing, as Fabric does not ship a default configuration library. For information on FabricPacket#setPacketHostname no-op, visit TCPShield#40 (comment).
Hi, I've made a PR to this PR for 1.21 support if anyone wants it. Note there are a few improvements to be still made, but it works:
Logging example
Instead of...
You can build it from my fork: https://github.com/he3als/RealIP/tree/fabric |
Hey there, this slipped through the cracks a couple years back, I'm definitely interested in getting this merged if you can get yours merged into the original PR. Worse cast scenario, you can fork their fork and we can merge from there if the original author isn't looking to continue with this. |
I'm not sure if it should be merged yet due to its limited range of support:
As the original author said, implementing reflection for LiteralText and making the HandshakeC2SPacketAccessor conditional would be ideal. However, I don't know Java, so I'm likely unable to implement this myself. :/ I mostly made my PR as a temporary solution for people wanting to use TCPShield on modern Fabric versions and to spark some activity to finish the pull request. However, I presume there isn't too much work left, so if you or anyone else has the time to look, it would be helpful. :) |
Hi! This is an updated version of the Fabric Loader support introduced on the 2.5 branch of RealIP. We have been using the 2.5 Fabric version internally for a while (with success), and I have also verified the new 2.6 rendition works as well.
A few notes about the PR:
LiteralText
API changes impactingFabricPlayer#disconnect
(+ 1.19 requires JDK17), so I'll need to figure out a better way to support all versions in the future. This jar will support versions 1.16.5 through 1.18.2. I'll probably end up using reflection to call Text methods based on game version to allow for both to exist at the same time.Let me know if you have any questions or change requests. Thank you!
Demo Images
Without RealIP jar on server:
With RealIP jar on server: