Skip to content

Commit 36568df

Browse files
authored
rename NEO_FORGED to NEO_FORGE (#6008)
1 parent b4ac42d commit 36568df

10 files changed

Lines changed: 17 additions & 17 deletions

File tree

HMCL/src/main/java/org/jackhuang/hmcl/setting/VersionIconType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public enum VersionIconType {
4545
public static VersionIconType getIconType(ModLoaderType modLoaderType) {
4646
return switch (modLoaderType) {
4747
case FORGE -> VersionIconType.FORGE;
48-
case NEO_FORGED -> VersionIconType.NEO_FORGE;
48+
case NEO_FORGE -> VersionIconType.NEO_FORGE;
4949
case FABRIC -> VersionIconType.FABRIC;
5050
case QUILT -> VersionIconType.QUILT;
5151
case LITE_LOADER -> VersionIconType.CHICKEN;

HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ private static final class ModItem extends StackPane {
441441
case CLEANROOM:
442442
content.addTag(i18n("install.installer.cleanroom"));
443443
break;
444-
case NEO_FORGED:
444+
case NEO_FORGE:
445445
content.addTag(i18n("install.installer.neoforge"));
446446
break;
447447
case FABRIC:

HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ private void updateSupportedLoaders(ModManager modManager) {
160160

161161
if (analyzer.has(LibraryAnalyzer.LibraryType.FABRIC) && modManager.hasMod("kilt", ModLoaderType.FABRIC)) {
162162
supportedLoaders.add(ModLoaderType.FORGE);
163-
supportedLoaders.add(ModLoaderType.NEO_FORGED);
163+
supportedLoaders.add(ModLoaderType.NEO_FORGE);
164164
}
165165

166166
// Sinytra Connector
167-
if (analyzer.has(LibraryAnalyzer.LibraryType.NEO_FORGE) && modManager.hasMod("connectormod", ModLoaderType.NEO_FORGED)
167+
if (analyzer.has(LibraryAnalyzer.LibraryType.NEO_FORGE) && modManager.hasMod("connectormod", ModLoaderType.NEO_FORGE)
168168
|| "1.20.1".equals(gameVersion) && analyzer.has(LibraryAnalyzer.LibraryType.FORGE) && modManager.hasMod("connectormod", ModLoaderType.FORGE)) {
169169
supportedLoaders.add(ModLoaderType.FABRIC);
170170
}

HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ final class ModInfoDialog extends JFXDialogLayout {
487487
case FORGE -> i18n("install.installer.forge");
488488
case CLEANROOM -> i18n("install.installer.cleanroom");
489489
case LEGACY_FABRIC -> i18n("install.installer.legacyfabric");
490-
case NEO_FORGED -> i18n("install.installer.neoforge");
490+
case NEO_FORGE -> i18n("install.installer.neoforge");
491491
case FABRIC -> i18n("install.installer.fabric");
492492
case LITE_LOADER -> i18n("install.installer.liteloader");
493493
case QUILT -> i18n("install.installer.quilt");
@@ -657,7 +657,7 @@ protected void updateControl(ModInfoObject dataItem, boolean empty) {
657657
case FORGE -> content.addTagWarning(i18n("install.installer.forge"));
658658
case LEGACY_FABRIC -> content.addTagWarning(i18n("install.installer.legacyfabric"));
659659
case CLEANROOM -> content.addTagWarning(i18n("install.installer.cleanroom"));
660-
case NEO_FORGED -> content.addTagWarning(i18n("install.installer.neoforge"));
660+
case NEO_FORGE -> content.addTagWarning(i18n("install.installer.neoforge"));
661661
case FABRIC -> content.addTagWarning(i18n("install.installer.fabric"));
662662
case LITE_LOADER -> content.addTagWarning(i18n("install.installer.liteloader"));
663663
case QUILT -> content.addTagWarning(i18n("install.installer.quilt"));

HMCLCore/src/main/java/org/jackhuang/hmcl/download/LibraryAnalyzer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected boolean matchLibrary(Library library, List<Library> libraries) {
242242
}
243243
},
244244
CLEANROOM(true, "cleanroom", "com\\.cleanroommc", "cleanroom", ModLoaderType.CLEANROOM),
245-
NEO_FORGE(true, "neoforge", "net\\.neoforged\\.fancymodloader", "(core|loader)", ModLoaderType.NEO_FORGED) {
245+
NEO_FORGE(true, "neoforge", "net\\.neoforged\\.fancymodloader", "(core|loader)", ModLoaderType.NEO_FORGE) {
246246
private final Pattern NEO_FORGE_VERSION_MATCHER = Pattern.compile("^([0-9.]+)-(?<forge>[0-9.]+)(-([0-9.]+))?$");
247247

248248
@Override
@@ -390,15 +390,15 @@ public LibraryStatus getStatus() {
390390
public static final String MOD_LAUNCHER_MAIN = "cpw.mods.modlauncher.Launcher";
391391
public static final String BOOTSTRAP_LAUNCHER_MAIN = "cpw.mods.bootstraplauncher.BootstrapLauncher";
392392
public static final String FORGE_BOOTSTRAP_MAIN = "net.minecraftforge.bootstrap.ForgeBootstrap";
393-
public static final String NEO_FORGED_BOOTSTRAP_MAIN = "net.neoforged.fml.startup.Client";
393+
public static final String NEO_FORGE_BOOTSTRAP_MAIN = "net.neoforged.fml.startup.Client";
394394

395395
public static final Set<String> FORGE_OPTIFINE_MAIN = Set.of(
396396
LibraryAnalyzer.VANILLA_MAIN,
397397
LibraryAnalyzer.LAUNCH_WRAPPER_MAIN,
398398
LibraryAnalyzer.MOD_LAUNCHER_MAIN,
399399
LibraryAnalyzer.BOOTSTRAP_LAUNCHER_MAIN,
400400
LibraryAnalyzer.FORGE_BOOTSTRAP_MAIN,
401-
LibraryAnalyzer.NEO_FORGED_BOOTSTRAP_MAIN
401+
LibraryAnalyzer.NEO_FORGE_BOOTSTRAP_MAIN
402402
);
403403

404404
public static final VersionRange<VersionNumber> FORGE_OPTIFINE_BROKEN_RANGE = VersionNumber.between("48.0.0", "49.0.50");

HMCLCore/src/main/java/org/jackhuang/hmcl/mod/ModLoaderType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public enum ModLoaderType {
2121
UNKNOWN,
2222
FORGE,
2323
CLEANROOM,
24-
NEO_FORGED,
24+
NEO_FORGE,
2525
FABRIC,
2626
QUILT,
2727
LITE_LOADER,

HMCLCore/src/main/java/org/jackhuang/hmcl/mod/ModManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private interface ModMetadataReader {
4747
var map = new HashMap<String, List<Pair<ModMetadataReader, ModLoaderType>>>();
4848
var zipReaders = List.<Pair<ModMetadataReader, ModLoaderType>>of(
4949
pair(ForgeNewModMetadata::fromForgeFile, ModLoaderType.FORGE),
50-
pair(ForgeNewModMetadata::fromNeoForgeFile, ModLoaderType.NEO_FORGED),
50+
pair(ForgeNewModMetadata::fromNeoForgeFile, ModLoaderType.NEO_FORGE),
5151
pair(ForgeOldModMetadata::fromFile, ModLoaderType.FORGE),
5252
pair(FabricModMetadata::fromFile, ModLoaderType.FABRIC),
5353
pair(QuiltModMetadata::fromFile, ModLoaderType.QUILT),

HMCLCore/src/main/java/org/jackhuang/hmcl/mod/curse/CurseAddon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ public RemoteMod.Version toVersion() {
598598
if ("fabric".equalsIgnoreCase(version)) return Stream.of(ModLoaderType.FABRIC);
599599
else if ("forge".equalsIgnoreCase(version)) return Stream.of(ModLoaderType.FORGE);
600600
else if ("quilt".equalsIgnoreCase(version)) return Stream.of(ModLoaderType.QUILT);
601-
else if ("neoforge".equalsIgnoreCase(version)) return Stream.of(ModLoaderType.NEO_FORGED);
601+
else if ("neoforge".equalsIgnoreCase(version)) return Stream.of(ModLoaderType.NEO_FORGE);
602602
else return Stream.empty();
603603
}).collect(Collectors.toList())
604604
);

HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/ForgeNewModMetadata.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ public static LocalModFile fromForgeFile(ModManager modManager, Path modFile, Zi
174174
}
175175

176176
public static LocalModFile fromNeoForgeFile(ModManager modManager, Path modFile, ZipFileTree tree) throws IOException {
177-
return fromFile(modManager, modFile, tree, ModLoaderType.NEO_FORGED);
177+
return fromFile(modManager, modFile, tree, ModLoaderType.NEO_FORGE);
178178
}
179179

180180
private static LocalModFile fromFile(ModManager modManager, Path modFile, ZipFileTree tree, ModLoaderType modLoaderType) throws IOException {
181-
if (modLoaderType != ModLoaderType.FORGE && modLoaderType != ModLoaderType.NEO_FORGED) {
181+
if (modLoaderType != ModLoaderType.FORGE && modLoaderType != ModLoaderType.NEO_FORGE) {
182182
throw new IOException("Invalid mod loader: " + modLoaderType);
183183
}
184184

185-
if (modLoaderType == ModLoaderType.NEO_FORGED) {
185+
if (modLoaderType == ModLoaderType.NEO_FORGE) {
186186
try {
187187
return fromFile0("META-INF/neoforge.mods.toml", modLoaderType, modManager, modFile, tree);
188188
} catch (Exception ignored) {
@@ -344,7 +344,7 @@ private static ModLoaderType analyzeLoader(TomlParseResult toml, String modID, M
344344
result = ModLoaderType.FORGE;
345345
break loop;
346346
case "neoforge":
347-
result = ModLoaderType.NEO_FORGED;
347+
result = ModLoaderType.NEO_FORGE;
348348
break loop;
349349
}
350350
}

HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modrinth/ModrinthRemoteModRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ public Optional<RemoteMod.Version> toVersion() {
668668
loaders.stream().flatMap(loader -> {
669669
if ("fabric".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.FABRIC);
670670
else if ("forge".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.FORGE);
671-
else if ("neoforge".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.NEO_FORGED);
671+
else if ("neoforge".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.NEO_FORGE);
672672
else if ("quilt".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.QUILT);
673673
else if ("liteloader".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.LITE_LOADER);
674674
else return Stream.empty();

0 commit comments

Comments
 (0)