Package mcp.mobius.waila.api
Interface IRegistryFilter<T>
Filters registry object based on set of string rules.
Rule Operators:
@namespace
- include objects based on their namespace location.#tag
- include objects based on data pack tags./regex/
- include objects based on regular expression.default
- include objects with specific ID.
An exclamation mark (!) prefix can be added which negates the pattern. Any entries matching previous rules will be removed from it. Can be combined with other rule to exclude what matches the rule.
Note: Instances of IRegistryFilter
should only be obtained once, unless the ruleset is changed.
Example
@aether
- include all block from the aether namespace#minecraft:planks
- include all blocks in the planks tag/.*_ore/
- include all blocks that ends with_ore
minecraft:iron_block
- include only the iron block!/.*:oak_.*$/
- exclude all blocks that its path start withoak_
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Comment to be used with as a file header.Returns read-only collection containing all objects that matches the filter.boolean
Returns whether the filter matches the object.static <T> IRegistryFilter.Builder
<T> of
(ResourceKey<? extends Registry<T>> registryKey)
-
Method Details
-
of
-
getHeader
Comment to be used with as a file header.Not a constant so it won't be inlined as it can change.
-
matches
Returns whether the filter matches the object.Note: When not in world, this will always return
false
. -
getMatches
Collection<T> getMatches()Returns read-only collection containing all objects that matches the filter.Note: When not in world, this will always return empty collection.
-