Class FileToIdConverter

java.lang.Object
net.minecraft.resources.FileToIdConverter

public class FileToIdConverter extends Object
  • Field Details

    • prefix

      private final String prefix
    • extension

      private final String extension
  • Constructor Details

    • FileToIdConverter

      public FileToIdConverter(String prefix, String extension)
  • Method Details

    • json

      public static FileToIdConverter json(String name)
    • registry

      public static FileToIdConverter registry(ResourceKey<? extends Registry<?>> registryKey)
    • idToFile

      public Identifier idToFile(Identifier id)
    • fileToId

      public Identifier fileToId(Identifier file)
    • listMatchingResources

      public Map<Identifier,Resource> listMatchingResources(ResourceManager resourceManager)
    • listMatchingResourceStacks

      public Map<Identifier,List<Resource>> listMatchingResourceStacks(ResourceManager resourceManager)
    • listMatchingResourcesFromNamespace

      public Map<Identifier,Resource> listMatchingResourcesFromNamespace(ResourceManager manager, String namespace)
      List all resources under the given namespace which match this converter
      Parameters:
      manager - The resource manager to collect the resources from
      namespace - The namespace to search under
      Returns:
      All resources from the given namespace which match this converter
    • listMatchingResourceStacksFromNamespace

      public Map<Identifier,List<Resource>> listMatchingResourceStacksFromNamespace(ResourceManager manager, String namespace)
      List all resource stacks under the given namespace which match this converter
      Parameters:
      manager - The resource manager to collect the resources from
      namespace - The namespace to search under
      Returns:
      All resource stacks from the given namespace which match this converter