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.18") public static final Manifest DEFAULTMANIFEST
      Deprecated, for removal: This API element is subject to removal in a future version.
    • LOGGER

      private static final org.slf4j.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
    • provider

      private final net.minecraftforge.forgespi.locating.IModProvider provider
    • 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

      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.IModProvider provider, net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser)
    • ModFile

      public ModFile(cpw.mods.jarhandling.SecureJar jar, net.minecraftforge.forgespi.locating.IModProvider provider, net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser, String type)
  • 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
    • getProvider

      public net.minecraftforge.forgespi.locating.IModProvider getProvider()
      Specified by:
      getProvider 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
    • setSecurityStatus

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

      public cpw.mods.jarhandling.SecureJar.Status getSecurityStatus()
    • getJarVersion

      public org.apache.maven.artifact.versioning.ArtifactVersion getJarVersion()
    • parseType

      private static String parseType(cpw.mods.jarhandling.SecureJar jar)