Class FileTree

java.lang.Object
mindustry.core.FileTree
All Implemented Interfaces:
arc.assets.loaders.FileHandleResolver

public class FileTree extends Object implements arc.assets.loaders.FileHandleResolver
Handles files in a modded context.
  • Constructor Details

    • FileTree

      public FileTree()
  • Method Details

    • addFile

      public void addFile(String path, arc.files.Fi f)
    • get

      public arc.files.Fi get(String path)
      Gets an asset file.
    • get

      public arc.files.Fi get(String path, boolean safe)
      Gets an asset file.
    • clear

      public void clear()
      Clears all mod files.
    • resolve

      public arc.files.Fi resolve(String fileName)
      Specified by:
      resolve in interface arc.assets.loaders.FileHandleResolver
    • loadSound

      public arc.audio.Sound loadSound(String soundName)
      Loads a sound by name from the sounds/ folder. OGG and MP3 are supported; the extension is automatically added to the end of the file name. Results are cached; consecutive calls to this method with the same name will return the same sound instance.
    • loadMusic

      public arc.audio.Music loadMusic(String musicName)
      Loads a music file by name from the music/ folder. OGG and MP3 are supported; the extension is automatically added to the end of the file name. Results are cached; consecutive calls to this method with the same name will return the same music instance.