Class ResourceList.RuleBuilder
java.lang.Object
org.moddingx.libx.util.data.ResourceList.RuleBuilder
- Enclosing class:
ResourceList
A builder for rules.
-
Method Summary
Modifier and TypeMethodDescriptionvoidParses a simple rule.voidAdds a rule that checks that a identifier matches a regex.voidAdds a rule that checks that a identifier matches a regex.voidsimple(boolean allow, net.minecraft.resources.Identifier id) Adds a simple rule that only matches the givenIdentifier.voidsimple(net.minecraft.resources.Identifier id) Adds a simple rule that only matches the givenIdentifier.
-
Method Details
-
simple
public void simple(net.minecraft.resources.Identifier id) Adds a simple rule that only matches the givenIdentifier. When this rule matches it will return the allow list state of the resource list as result. -
simple
public void simple(boolean allow, net.minecraft.resources.Identifier id) Adds a simple rule that only matches the givenIdentifier. When this rule matches it will return the value ofallowas result. -
parse
Parses a simple rule. This allows for aIdentifierstring where asterisks (*) can match any amount of characters in theIdentifier. However an asterisk can never match a colon. The special case '*' matches everyIdentifier. By default this will return the allow list state of the resource list as result. To change this prepend a plus (+) to make it return true or a minus (-) to make it return false on a match. -
regex
-
regex
-