Package org.moddingx.libx.util.data
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 resource location matches a regex.voidAdds a rule that checks that a resource location matches a regex.voidsimple(boolean allow, net.minecraft.resources.ResourceLocation rl) Adds a simple rule that only matches the givenResourceLocation.voidsimple(net.minecraft.resources.ResourceLocation rl) Adds a simple rule that only matches the givenResourceLocation.
-
Method Details
-
simple
public void simple(net.minecraft.resources.ResourceLocation rl) Adds a simple rule that only matches the givenResourceLocation. 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.ResourceLocation rl) Adds a simple rule that only matches the givenResourceLocation. When this rule matches it will return the value ofallowas result. -
parse
Parses a simple rule. This allows for aResourceLocationstring where asterisks (*) can match any amount of characters in theResourceLocation. However an asterisk can never match a colon. The special case '*' matches everyResourceLocation. 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
Adds a rule that checks that a resource location matches a regex. When this rule matches it will return the allow list state of the resource list as result. -
regex
Adds a rule that checks that a resource location matches a regex. When this rule matches it will return the value ofallowas result.
-