Class IdentifierUtil

java.lang.Object
com.supermartijn642.fusion.util.IdentifierUtil

public class IdentifierUtil extends Object
Created 28/04/2023 by SuperMartijn642
  • Constructor Details

    • IdentifierUtil

      public IdentifierUtil()
  • Method Details

    • isValidNamespace

      public static boolean isValidNamespace(String namespace)
      Checks whether the given namespace contains illegal characters
      Parameters:
      namespace - namespace to be checked
      Returns:
      true if the namespace is valid
    • isValidPath

      public static boolean isValidPath(String path)
      Checks whether the given path contains illegal characters
      Parameters:
      path - identifier path to be checked
      Returns:
      true if the path is valid
    • isValidIdentifier

      public static boolean isValidIdentifier(String namespace, String path)
      Checks whether given identifier contains illegal characters
      Parameters:
      namespace - identifier namespace to be checked
      path - identifier path to be checked
      Returns:
      true if the identifier is valid
    • isValidIdentifier

      public static boolean isValidIdentifier(String identifier)
      Checks whether given identifier contains illegal characters
      Parameters:
      identifier - identifier to be checked
      Returns:
      true if the identifier is valid
    • withFusionNamespace

      public static net.minecraft.resources.ResourceLocation withFusionNamespace(String identifier)
      Converts the given string into a ResourceLocation instance. If no namespace is specified, the 'fusion' namespace will be used