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

      private static final Manifest DEFAULTMANIFEST
    • 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
    • loader

      private net.minecraftforge.forgespi.language.IModLanguageProvider loader
    • scanError

      private Throwable scanError
    • filePath

      private final Path filePath
    • 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
  • Constructor Details

    • ModFile

      public ModFile(Path file, 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
    • 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)
    • getLoader

      public net.minecraftforge.forgespi.language.IModLanguageProvider getLoader()
      Specified by:
      getLoader in interface net.minecraftforge.forgespi.locating.IModFile
    • findResource

      public Path findResource(String className)
      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

      public static net.minecraftforge.forgespi.locating.ModFileFactory buildFactory()
    • newFMLInstance

      public static ModFile newFMLInstance(Path path, net.minecraftforge.forgespi.locating.IModLocator locator)