Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Draylar
Copy link

@Draylar Draylar commented Oct 7, 2022

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:

  1. I'm currently building off Fabric 1.16.5 w/Loom 0.6 to support Java 8. I suspect this will break on 1.19 due to LiteralText API changes impacting FabricPlayer#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.
  2. My configuration implementation relies on a budget YAML parser. I would be happy to switch this to GSON or another external library if needed - Fabric does not ship a default configuration system.

Let me know if you have any questions or change requests. Thank you!

Demo Images

Without RealIP jar on server:

image

With RealIP jar on server:

image

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).
@DylanKeir DylanKeir self-requested a review October 8, 2022 17:41
@DylanKeir DylanKeir self-assigned this Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants