-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Allow users to define their own item/entity lists #6865
base: master
Are you sure you want to change the base?
Conversation
85da3e2
to
466dcf7
Compare
7546db6
to
e3f16c6
Compare
e3f16c6
to
3de76da
Compare
Running the version compiled from newest commit appears to have changed my townblocktypes section to this
|
"# This section of the config allows you to specify custom lists of blocks or entities, that can then be used elsewhere in the config.", | ||
"# A custom syntax is used to specify whether to include or exclude certain patterns from the resulting set.", | ||
"#", | ||
"# Format:", | ||
"# *string: Includes all elements that end with 'string'", | ||
"# string*: Includes all elements that start with 'string'", | ||
"# !*string: Excludes all elements that don't end with 'string'", | ||
"# !string*: Excludes all elements that don't start with 'string'", | ||
"# #tag: Includes all elements that are contained in the given tag, valid tags can be found here: https://github.com/misode/mcmeta/tree/data/data/minecraft/tags in the blocks or entity_type folders.", | ||
"# !#tag: Excludes all elements that are contained in the given tag", | ||
"# +string: Includes the element with name 'string'", | ||
"# -string: Excludes the element with name 'string'", | ||
"# ~string: Includes all elements that contain 'string' in the name", | ||
"# !~string: Excludes all elements that contain 'string' in the name", | ||
"# c:class: Includes all elements that are instances of the given class"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ought to be boxed in with a header like the other config sections, if the header is a bit wider than they are normally that's fine.
@@ -705,10 +712,10 @@ private static void setDefaults(String version, Path configPath) { | |||
} else if (root.getRoot().equals(ConfigNodes.LAST_RUN_VERSION.getRoot())) { | |||
setNewProperty(root.getRoot(), getLastRunVersion(version)); | |||
} else if (root.getRoot().equals(ConfigNodes.TOWNBLOCKTYPES_TYPES.getRoot())) { | |||
setNewProperty(root.getRoot(), root.getDefault()); | |||
setNewProperty(root.getRoot(), root.defaultValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience handling maps gets a bit weird, this is likely the point where townblocktypes stopped working. I ran into something similar in TownyChat when changing the channels.yml over to commented config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because setNewProperty used to always toString the value, but this is removed here
e74d5ed
to
d074fa8
Compare
Description:
New Nodes/Commands/ConfigOptions:
Relevant Towny Issue ticket:
By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.