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

Store whitelist conditions as predicate functions #137

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Dec 28, 2023

This small refactor enables the collision whitelist to be more flexible.

The predicate builder now supports:

  • Matching on block class (existing behavior).
  • Matching on block ID string.
  • Regex matching on block ID string.
  • Matching using an arbitrary predicate function.

This PR could be expanded or followed up with:

  • More explicit whitelists using block ID matching.
  • User-configurable whitelists/blacklists edited vla a cloth-config.

@hashalite
Copy link
Collaborator

Looks good, thank you!

@hashalite hashalite merged commit 94c8481 into MinecraftFreecam:main Jan 4, 2024
@MattSturgeon MattSturgeon deleted the whitelist-cleanup branch January 4, 2024 07:30
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.

2 participants