Class ExternalTexture

java.lang.Object
net.mcreator.workspace.resources.Texture
net.mcreator.workspace.resources.ExternalTexture

public final class ExternalTexture extends Texture
A texture loaded from vanilla MC asset archives or from mods downloaded by API plugins.
  • Method Details

    • getTextureIcon

      public ImageIcon getTextureIcon(Workspace workspace)
      Specified by:
      getTextureIcon in class Texture
    • getTexture

      public static ExternalTexture getTexture(Workspace workspace, TextureType textureType, String textureName)
      Searches in the provided workspace for an externally loaded texture with matching name and type.
      Parameters:
      workspace - The workspace to search in.
      textureType - The type of the textures to check.
      textureName - The name of the texture to look for.
      Returns:
      The vanilla/external texture with the provided name of the specified type.
    • getTexturesOfType

      public static List<Texture> getTexturesOfType(Workspace workspace, TextureType type)
      Scans the workspace and collects all the available externally loaded textures of a certain type.
      Parameters:
      workspace - The workspace to collect icons for.
      type - The type of the textures to collect.
      Returns:
      The list of textures from vanilla MC and API mods available in the provided workspace.
    • invalidateCache

      public static void invalidateCache(Workspace workspace)