Skip to content

Commit

Permalink
Patch out last vestiges of forgeGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
cpw committed Jul 11, 2023
1 parent 0042f18 commit b6daf98
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class FMLServiceProvider implements ITransformationService
private ArgumentAcceptingOptionSpec<String> fmlOption;
private ArgumentAcceptingOptionSpec<String> forgeOption;
private ArgumentAcceptingOptionSpec<String> mcOption;
private ArgumentAcceptingOptionSpec<String> forgeGroupOption;
private ArgumentAcceptingOptionSpec<String> mcpOption;
private ArgumentAcceptingOptionSpec<String> mappingsOption;
private List<String> modsArgumentList;
Expand All @@ -44,7 +43,6 @@ public class FMLServiceProvider implements ITransformationService
private String targetMcVersion;
private String targetMcpVersion;
private String targetMcpMappings;
private String targetForgeGroup;
private Map<String, Object> arguments;

public FMLServiceProvider()
Expand Down Expand Up @@ -73,7 +71,6 @@ public void initialize(IEnvironment environment) {
arguments.put("mavenRoots", mavenRootsArgumentList);
arguments.put("forgeVersion", targetForgeVersion);
arguments.put("fmlVersion", targetFMLVersion);
arguments.put("forgeGroup", targetForgeGroup);
arguments.put("mcVersion", targetMcVersion);
arguments.put("mcpVersion", targetMcpVersion);
arguments.put("mcpMappings", targetMcpMappings);
Expand Down Expand Up @@ -108,7 +105,6 @@ public void arguments(BiFunction<String, String, OptionSpecBuilder> argumentBuil
{
forgeOption = argumentBuilder.apply("forgeVersion", "Forge Version number").withRequiredArg().ofType(String.class).required();
fmlOption = argumentBuilder.apply("fmlVersion", "FML Version number").withRequiredArg().ofType(String.class).required();
forgeGroupOption = argumentBuilder.apply("forgeGroup", "Forge Group (for testing)").withRequiredArg().ofType(String.class).defaultsTo("net.minecraftforge");
mcOption = argumentBuilder.apply("mcVersion", "Minecraft Version number").withRequiredArg().ofType(String.class).required();
mcpOption = argumentBuilder.apply("mcpVersion", "MCP Version number").withRequiredArg().ofType(String.class).required();
mappingsOption = argumentBuilder.apply("mcpMappings", "MCP Mappings Channel and Version").withRequiredArg().ofType(String.class);
Expand All @@ -125,7 +121,6 @@ public void argumentValues(OptionResult option)
mavenRootsArgumentList = option.values(mavenRootsOption);
targetFMLVersion = option.value(fmlOption);
targetForgeVersion = option.value(forgeOption);
targetForgeGroup = option.value(forgeGroupOption);
targetMcVersion = option.value(mcOption);
targetMcpVersion = option.value(mcpOption);
targetMcpMappings = option.value(mappingsOption);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import java.util.Map;

public record VersionInfo(String forgeVersion, String fmlVersion, String mcVersion, String mcpVersion, String forgeGroup) {
public record VersionInfo(String forgeVersion, String fmlVersion, String mcVersion, String mcpVersion) {
VersionInfo(Map<String, ?> arguments) {
this((String) arguments.get("forgeVersion"), (String) arguments.get("fmlVersion"), (String) arguments.get("mcVersion"), (String) arguments.get("mcpVersion"), (String) arguments.get("forgeGroup"));
this((String) arguments.get("forgeVersion"), (String) arguments.get("fmlVersion"), (String) arguments.get("mcVersion"), (String) arguments.get("mcpVersion"));
}

public String mcAndForgeVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class FMLClientLaunchHandler extends CommonClientLaunchHandler {

@Override
protected void processMCStream(VersionInfo versionInfo, Stream.Builder<Path> mc, Stream.Builder<List<Path>> mods) {
var fmlonly = LibraryFinder.findPathForMaven(versionInfo.forgeGroup(), "fmlonly", "", "universal", versionInfo.mcAndFmlVersion());
var fmlonly = LibraryFinder.findPathForMaven("net.neoforged.fml", "fmlonly", "", "universal", versionInfo.mcAndFmlVersion());
mods.add(List.of(fmlonly));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class FMLServerLaunchHandler extends CommonServerLaunchHandler implements

@Override
protected BiPredicate<String, String> processMCStream(VersionInfo versionInfo, Stream.Builder<Path> mc, BiPredicate<String, String> filter, Stream.Builder<List<Path>> mods) {
var fmlonly = LibraryFinder.findPathForMaven(versionInfo.forgeGroup(), "fmlonly", "", "universal", versionInfo.mcAndFmlVersion());
var fmlonly = LibraryFinder.findPathForMaven("net.neoforged.fml", "fmlonly", "", "universal", versionInfo.mcAndFmlVersion());
mods.add(List.of(fmlonly));
return filter;
}
Expand Down

0 comments on commit b6daf98

Please sign in to comment.