Package com.supermartijn642.fusion.util
Class IdentifierUtil
java.lang.Object
com.supermartijn642.fusion.util.IdentifierUtil
Created 28/04/2023 by SuperMartijn642
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidIdentifier(String identifier) Checks whether given identifier contains illegal charactersstatic booleanisValidIdentifier(String namespace, String path) Checks whether given identifier contains illegal charactersstatic booleanisValidNamespace(String namespace) Checks whether the given namespace contains illegal charactersstatic booleanisValidPath(String path) Checks whether the given path contains illegal charactersstatic net.minecraft.resources.ResourceLocationwithFusionNamespace(String identifier) Converts the given string into aResourceLocationinstance.
-
Constructor Details
-
IdentifierUtil
public IdentifierUtil()
-
-
Method Details
-
isValidNamespace
Checks whether the given namespace contains illegal characters- Parameters:
namespace- namespace to be checked- Returns:
trueif the namespace is valid
-
isValidPath
Checks whether the given path contains illegal characters- Parameters:
path- identifier path to be checked- Returns:
trueif the path is valid
-
isValidIdentifier
Checks whether given identifier contains illegal characters- Parameters:
namespace- identifier namespace to be checkedpath- identifier path to be checked- Returns:
trueif the identifier is valid
-
isValidIdentifier
Checks whether given identifier contains illegal characters- Parameters:
identifier- identifier to be checked- Returns:
trueif the identifier is valid
-
withFusionNamespace
Converts the given string into aResourceLocationinstance. If no namespace is specified, the 'fusion' namespace will be used
-