java.lang.Object
net.minecraftforge.fml.loading.moddiscovery.ModFile
All Implemented Interfaces:
net.minecraftforge.forgespi.locating.IModFile

public class ModFile extends Object implements net.minecraftforge.forgespi.locating.IModFile
  • Field Details

    • DEFAULTMANIFEST

      @Deprecated(forRemoval=true, since="1.17.1") public static final Manifest DEFAULTMANIFEST
      Deprecated, for removal: This API element is subject to removal in a future version.
    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • jarVersion

      private final String jarVersion
    • parser

      private final net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser
    • fileProperties

      private Map<String,​Object> fileProperties
    • loaders

      private List<net.minecraftforge.forgespi.language.IModLanguageProvider> loaders
    • scanError

      private Throwable scanError
    • jar

      private final cpw.mods.jarhandling.SecureJar jar
    • modFileType

      private final net.minecraftforge.forgespi.locating.IModFile.Type modFileType
    • manifest

      private final Manifest manifest
    • locator

      private final net.minecraftforge.forgespi.locating.IModLocator locator
    • modFileInfo

      private net.minecraftforge.forgespi.language.IModFileInfo modFileInfo
    • fileModFileScanData

      private net.minecraftforge.forgespi.language.ModFileScanData fileModFileScanData
    • futureScanResult

      private CompletableFuture<net.minecraftforge.forgespi.language.ModFileScanData> futureScanResult
    • coreMods

      private List<CoreModFile> coreMods
    • accessTransformer

      private Path accessTransformer
    • TYPE

      public static final Attributes.Name TYPE
    • securityStatus

      private cpw.mods.jarhandling.SecureJar.Status securityStatus
  • Constructor Details

    • ModFile

      public ModFile(cpw.mods.jarhandling.SecureJar jar, net.minecraftforge.forgespi.locating.IModLocator locator, net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser)
  • Method Details

    • getSubstitutionMap

      public Supplier<Map<String,​Object>> getSubstitutionMap()
      Specified by:
      getSubstitutionMap in interface net.minecraftforge.forgespi.locating.IModFile
    • getType

      public net.minecraftforge.forgespi.locating.IModFile.Type getType()
      Specified by:
      getType in interface net.minecraftforge.forgespi.locating.IModFile
    • getFilePath

      public Path getFilePath()
      Specified by:
      getFilePath in interface net.minecraftforge.forgespi.locating.IModFile
    • getSecureJar

      public cpw.mods.jarhandling.SecureJar getSecureJar()
      Specified by:
      getSecureJar in interface net.minecraftforge.forgespi.locating.IModFile
    • getModInfos

      public List<net.minecraftforge.forgespi.language.IModInfo> getModInfos()
      Specified by:
      getModInfos in interface net.minecraftforge.forgespi.locating.IModFile
    • getAccessTransformer

      public Optional<Path> getAccessTransformer()
    • identifyMods

      public boolean identifyMods()
    • getCoreMods

      public List<CoreModFile> getCoreMods()
    • compileContent

      public net.minecraftforge.forgespi.language.ModFileScanData compileContent()
      Run in an executor thread to harvest the class and annotation list
    • scanFile

      public void scanFile(Consumer<Path> pathConsumer)
    • setFutureScanResult

      public void setFutureScanResult(CompletableFuture<net.minecraftforge.forgespi.language.ModFileScanData> future)
    • getScanResult

      public net.minecraftforge.forgespi.language.ModFileScanData getScanResult()
      Specified by:
      getScanResult in interface net.minecraftforge.forgespi.locating.IModFile
    • setScanResult

      public void setScanResult(net.minecraftforge.forgespi.language.ModFileScanData modFileScanData, Throwable throwable)
    • setFileProperties

      public void setFileProperties(Map<String,​Object> fileProperties)
    • getLoaders

      public List<net.minecraftforge.forgespi.language.IModLanguageProvider> getLoaders()
      Specified by:
      getLoaders in interface net.minecraftforge.forgespi.locating.IModFile
    • findResource

      public Path findResource(String... path)
      Specified by:
      findResource in interface net.minecraftforge.forgespi.locating.IModFile
    • identifyLanguage

      public void identifyLanguage()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFileName

      public String getFileName()
      Specified by:
      getFileName in interface net.minecraftforge.forgespi.locating.IModFile
    • getLocator

      public net.minecraftforge.forgespi.locating.IModLocator getLocator()
      Specified by:
      getLocator in interface net.minecraftforge.forgespi.locating.IModFile
    • getModFileInfo

      public net.minecraftforge.forgespi.language.IModFileInfo getModFileInfo()
      Specified by:
      getModFileInfo in interface net.minecraftforge.forgespi.locating.IModFile
    • buildFactory

      @Deprecated(forRemoval=true, since="1.17.1") public static net.minecraftforge.forgespi.locating.ModFileFactory buildFactory()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • newFMLInstance

      @Deprecated(forRemoval=true, since="1.17.1") public static ModFile newFMLInstance(net.minecraftforge.forgespi.locating.IModLocator locator, cpw.mods.jarhandling.SecureJar jar)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • newFMLInstance

      @Deprecated(forRemoval=true, since="1.17.1") public static ModFile newFMLInstance(net.minecraftforge.forgespi.locating.IModLocator locator, Path... paths)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setSecurityStatus

      public void setSecurityStatus(cpw.mods.jarhandling.SecureJar.Status status)
      Specified by:
      setSecurityStatus in interface net.minecraftforge.forgespi.locating.IModFile