-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Regex Support for Block/Tool Lists #100
Comments
lol, I appreciate the emoji. I have a few issues with regular expression or wildcard syntax (exception to just
I think to some extent I would like to at the very least support tags. It's something that's been brewing in my mind for years now, just being able to add all logs with TL;DR: I want to support tags, I'm iffy on RegEx due to unpredictability and unreadability for most users, and VeinMiner's block list loading needs to be ripped out and redesigned if I want to do anything other than 1:1 mappings of block list entries. |
Tag<Material> logsTag = plugin.getServer().getTag(Tag.REGISTRY_BLOCKS, NamespacedKey.fromString("minecraft:logs"), Material.class); Something like this would work, right? Could even integrate that into the current system as far as I can tell (Get Materials by |
Yes it would work and that was my original approach, but my largest issue with it is that values need to get saved to the config from memory as well and if individual block instances are created for all values in a Tag, we then lose the ability to re-save it as a tag if the list is changed via command. I may revisit the block list handling myself after 2.1.1 is released and focus efforts on cleaning things up for a 2.2.0 release. EDIT: Worth noting also that I am improving Bukkit's |
Coming back to further clarify that while I do not plan on adding RegEx support (due to its complex nature and overall user-unfriendliness), I do plan on adding support for Minecraft tags in a future update, which should address your primary concern of adding all logs just with I will keep this issue open as a pseudo tracker for this task, but you may also refer to #109 instead for the future update plans. |
I still think this feature should wait until Bukkit's Tag API is improved and BlockType and ItemType are better integrated into the API. But for now this should at least work as expected.
Manually adding each block/tool ID to the config is a cruel form of torture and I demand you implement some sort of regular expression support (e.g. "_log" selects every block in the game that has the word "log" at the end of it).
I beg of you. My life depends on this feature.
ಥ⌓ಢ
The text was updated successfully, but these errors were encountered: