NameStrictLevel

Restriction level for recipe name duplication, applied during recipe registration.

Introduced to prevent confusion when multiple recipes are displayed simultaneously.

  • NOTHING: No restriction.

  • WEAK: A recipe cannot be registered if an existing recipe has an exactly matching name.

  • STRICT: A recipe cannot be registered if its name, with all whitespace removed, matches an existing recipe name.

Since

5.2.0

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun contains(targets: Set<String>, sources: Set<String>): Boolean

Returns whether targets contains any element from sources, evaluated at the level on which this method is called.

Link copied to clipboard

Returns whether target contains duplicate names according to this level.

Link copied to clipboard
fun matches(target: String, pattern: String): Boolean

Returns whether pattern matches target, evaluated at the level on which this method is called.

Link copied to clipboard

Used by CustomCrafterAPI.setRecipeNameStrictLevel to determine whether the level can be changed from the current level to tryValue. The level can only move in the stricter direction; loosening is not allowed.

Link copied to clipboard
Link copied to clipboard