Skip to content

[1.21.1] Allow the use of linear-time, threadsafe regex-based matching as an alternative to globs #8281

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

Open
wants to merge 8 commits into
base: mc1.21.1/dev
Choose a base branch
from

Conversation

meawplex-plus
Copy link

This PR

  • Adds a game setting, enableAdvancedRegex, which requires a world reload to enable.
  • Adds buttons to several UIs of logistics-related devices to allow regex-based package and station address matching
  • Adds a utility class LogisticParser and some utility methods to allow matching either globs or regex depending on the setting

I playtested this and it seemed to be functional, but if I missed anything important (or minor, really), feel free to change or just let me know ASAP.

@meawplex-plus meawplex-plus changed the title Allow the use of linear-time, threadsafe regex-based matching as an alternative to globs [1.21.1] Allow the use of linear-time, threadsafe regex-based matching as an alternative to globs Apr 16, 2025
@meawplex-plus
Copy link
Author

meawplex-plus commented Apr 16, 2025

Note: The regex library in question is RE2/J. Also, it seems that I still excluded the FTB libraries, but I noticed that change; fixing rn.

@VoidLeech VoidLeech added the pr type: feature PR adds a new feature or changes an existing feature label Apr 17, 2025
@VoidLeech
Copy link
Collaborator

Is there a technical reason this isn't on 1.20.1? If so, that's probably fine but you should otherwise aim to PR to the earliest still supported version.
Since this PR would have Create shipping that regex library this PR should make sure its license is adhered to, which doesn't appear to be the case yet.

@meawplex-plus
Copy link
Author

Is there a technical reason this isn't on 1.20.1? If so, that's probably fine but you should otherwise aim to PR to the earliest still supported version.

Since this PR would have Create shipping that regex library this PR should make sure its license is adhered to, which doesn't appear to be the case yet.

In terms of 1.20.1 not being supported, there's no technical issue that I can tell, and I would be happy to backport!

In terms of the license, it would seem that all I need do is include the license file in the PR. Is that right, or am I missing something here?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr type: feature PR adds a new feature or changes an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants