public abstract class AbstractForgeVersion extends java.lang.Object implements ICurseFeaturesUser, IModLoaderVersion
OldForgeVersion
and NewForgeVersion
IModLoaderVersion.ModLoaderLauncherEnvironment
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Object> |
allCurseMods |
protected IProgressCallback |
callback |
protected java.util.List<CurseFileInfos> |
curseMods |
protected DownloadInfos |
downloadInfos |
protected ModFileDeleter |
fileDeleter |
protected java.lang.String |
forgeVersion |
protected java.net.URL |
installerUrl |
protected fr.flowarg.flowlogger.ILogger |
logger |
protected CurseModPackInfos |
modPackInfos |
protected java.util.List<Mod> |
mods |
protected boolean |
old |
protected OptifineInfo |
optifine |
protected VanillaVersion |
vanilla |
Modifier | Constructor and Description |
---|---|
protected |
AbstractForgeVersion(fr.flowarg.flowlogger.ILogger logger,
java.util.List<Mod> mods,
java.util.List<CurseFileInfos> curseMods,
java.lang.String forgeVersion,
VanillaVersion vanilla,
ModFileDeleter fileDeleter,
OptifineInfo optifine,
CurseModPackInfos modPackInfos,
boolean old)
Use
ForgeVersionBuilder to instantiate this class. |
Modifier and Type | Method and Description |
---|---|
void |
appendCallback(IProgressCallback callback) |
void |
appendDownloadInfos(DownloadInfos infos) |
protected boolean |
checkForgeEnv(java.nio.file.Path dirToInstall)
Check if the minecraft installation already contains another forge installation not corresponding to this version.
|
protected abstract void |
cleanInstaller(java.nio.file.Path tempInstallerDir) |
protected void |
downloadForgeInstaller(java.io.InputStream stream,
java.nio.file.Path install,
java.nio.file.Path patches) |
java.util.List<java.lang.Object> |
getAllCurseMods() |
IProgressCallback |
getCallback() |
java.util.List<CurseFileInfos> |
getCurseMods() |
DownloadInfos |
getDownloadInfos() |
ModFileDeleter |
getFileDeleter() |
java.lang.String |
getForgeVersion() |
java.net.URL |
getInstallerUrl() |
fr.flowarg.flowlogger.ILogger |
getLogger() |
CurseModPackInfos |
getModPackInfos() |
java.util.List<Mod> |
getMods() |
OptifineInfo |
getOptifine() |
void |
install(java.nio.file.Path dirToInstall)
This function installs a Forge version at the specified directory.
|
void |
installMods(java.nio.file.Path modsDir,
PluginManager pluginManager)
This function installs mods at the specified directory.
|
boolean |
isModLoaderAlreadyInstalled(java.nio.file.Path installDir)
Check if forge is already installed.
|
protected IModLoaderVersion.ModLoaderLauncherEnvironment |
makeCommand(java.nio.file.Path patchedInstaller,
java.nio.file.Path dirToInstall,
java.nio.file.Path tempDir) |
protected void |
packPatchedInstaller(java.nio.file.Path tempDir,
java.nio.file.Path tempInstallerDir) |
protected void |
patchForgeInstaller(java.nio.file.Path install,
java.nio.file.Path patches,
java.nio.file.Path tempDir) |
IModLoaderVersion.ModLoaderLauncherEnvironment |
prepareModLoaderLauncher(java.nio.file.Path dirToInstall,
java.io.InputStream stream) |
void |
setAllCurseMods(java.util.List<java.lang.Object> allCurseMods) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
installAllMods
protected final fr.flowarg.flowlogger.ILogger logger
protected final java.util.List<Mod> mods
protected final VanillaVersion vanilla
protected final java.lang.String forgeVersion
protected final java.util.List<CurseFileInfos> curseMods
protected final ModFileDeleter fileDeleter
protected final OptifineInfo optifine
protected final CurseModPackInfos modPackInfos
protected final boolean old
protected java.util.List<java.lang.Object> allCurseMods
protected java.net.URL installerUrl
protected DownloadInfos downloadInfos
protected IProgressCallback callback
protected AbstractForgeVersion(fr.flowarg.flowlogger.ILogger logger, java.util.List<Mod> mods, java.util.List<CurseFileInfos> curseMods, java.lang.String forgeVersion, VanillaVersion vanilla, ModFileDeleter fileDeleter, OptifineInfo optifine, CurseModPackInfos modPackInfos, boolean old)
ForgeVersionBuilder
to instantiate this class.logger
- ILogger
used for logging.mods
- List
to install.curseMods
- List
to install.forgeVersion
- to install.vanilla
- VanillaVersion
.fileDeleter
- ModFileDeleter
used to cleanup mods dir.optifine
- Optifine version to install.modPackInfos
- modpack informations.old
- if the current version of forge is an old forge version.public boolean isModLoaderAlreadyInstalled(java.nio.file.Path installDir)
FlowUpdater
on update task.isModLoaderAlreadyInstalled
in interface IModLoaderVersion
installDir
- the minecraft installation dir.public void install(java.nio.file.Path dirToInstall) throws java.lang.Exception
install
in interface IModLoaderVersion
dirToInstall
- Specified directory.java.lang.Exception
public IModLoaderVersion.ModLoaderLauncherEnvironment prepareModLoaderLauncher(java.nio.file.Path dirToInstall, java.io.InputStream stream) throws java.lang.Exception
prepareModLoaderLauncher
in interface IModLoaderVersion
java.lang.Exception
protected void downloadForgeInstaller(java.io.InputStream stream, java.nio.file.Path install, java.nio.file.Path patches) throws java.lang.Exception
java.lang.Exception
protected void patchForgeInstaller(java.nio.file.Path install, java.nio.file.Path patches, java.nio.file.Path tempDir)
protected IModLoaderVersion.ModLoaderLauncherEnvironment makeCommand(java.nio.file.Path patchedInstaller, java.nio.file.Path dirToInstall, java.nio.file.Path tempDir)
protected abstract void cleanInstaller(java.nio.file.Path tempInstallerDir) throws java.lang.Exception
java.lang.Exception
protected boolean checkForgeEnv(java.nio.file.Path dirToInstall) throws java.lang.Exception
dirToInstall
- Forge installation directory.java.lang.Exception
- if an error occurred.public void installMods(java.nio.file.Path modsDir, PluginManager pluginManager) throws java.lang.Exception
installMods
in interface IModLoaderVersion
modsDir
- Specified mods directory.pluginManager
- PluginManager of FlowUpdaterjava.lang.Exception
- If the install fail.protected void packPatchedInstaller(java.nio.file.Path tempDir, java.nio.file.Path tempInstallerDir) throws java.lang.Exception
java.lang.Exception
public java.util.List<Mod> getMods()
getMods
in interface IModLoaderVersion
public void setAllCurseMods(java.util.List<java.lang.Object> allCurseMods)
setAllCurseMods
in interface ICurseFeaturesUser
public ModFileDeleter getFileDeleter()
public void appendDownloadInfos(DownloadInfos infos)
appendDownloadInfos
in interface IModLoaderVersion
public void appendCallback(IProgressCallback callback)
appendCallback
in interface IModLoaderVersion
public DownloadInfos getDownloadInfos()
getDownloadInfos
in interface IModLoaderVersion
public IProgressCallback getCallback()
getCallback
in interface IModLoaderVersion
public java.util.List<CurseFileInfos> getCurseMods()
getCurseMods
in interface ICurseFeaturesUser
public OptifineInfo getOptifine()
public CurseModPackInfos getModPackInfos()
getModPackInfos
in interface ICurseFeaturesUser
public fr.flowarg.flowlogger.ILogger getLogger()
getLogger
in interface IModLoaderVersion
public java.lang.String getForgeVersion()
public java.net.URL getInstallerUrl()
public java.util.List<java.lang.Object> getAllCurseMods()