Allow force-enabling Forge support for 1.13+ (#1184)

Skip login step and join even when forge info is missing in server info.
However, this only works for 1.13+. Server info retrieval is required
for enabling Forge support on older Minecraft versions.
This commit is contained in:
ORelio 2020-10-18 13:09:46 +02:00
parent 9df255dd29
commit d3f150ba12
7 changed files with 101 additions and 7 deletions

View file

@ -33,6 +33,24 @@ namespace MinecraftClient.Protocol.Handlers.Forge
public List<ForgeMod> Mods;
internal FMLVersion Version;
/// <summary>
/// Create a new ForgeInfo with the given version.
/// </summary>
/// <param name="fmlVersion">FML version to use</param>
internal ForgeInfo(FMLVersion fmlVersion)
{
switch (fmlVersion)
{
case FMLVersion.FML2:
this.Mods = new List<ForgeMod>();
this.Mods.Add(new ForgeMod("forge", "ANY"));
this.Version = fmlVersion;
break;
default:
throw new InvalidOperationException(Translations.Get("error.forgeforce"));
}
}
/// <summary>
/// Create a new ForgeInfo from the given data.
/// </summary>