Skip to content

Commit

Permalink
bump versions + smaller fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Skidamek committed Sep 13, 2023
1 parent c8fb85e commit 900fbed
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private void loadConfigs() {
}

// Check modpack name and fix it if needed, because it will be used for naming a folder on client
if (FileInspection.isInValidFileName(serverConfig.modpackName)) {
if (!serverConfig.modpackName.isEmpty() && FileInspection.isInValidFileName(serverConfig.modpackName)) {
serverConfig.modpackName = FileInspection.fixFileName(serverConfig.modpackName);
LOGGER.info("Changed modpack name to {}", serverConfig.modpackName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,20 @@ private void finishModpackUpdate(Path modpackDir, Path modpackContentFile) throw
return;
}

// change loader and minecraft version in launchers like prism, multimc.
if (serverModpackContent.loader.equals(LOADER)) { // server may use different loader than client
MmcPackMagic.changeVersion(MmcPackMagic.modLoaderUIDs, serverModpackContent.loaderVersion); // update loader version
}
MmcPackMagic.changeVersion(MmcPackMagic.mcVerUIDs, serverModpackContent.mcVersion); // update minecraft version
if (serverModpackContent != null) {

// Change loader and minecraft version in launchers like prism, multimc.

if (serverModpackContent.loader != null && serverModpackContent.loaderVersion != null) {
if (serverModpackContent.loader.equals(LOADER)) { // Server may use different loader than client
MmcPackMagic.changeVersion(MmcPackMagic.modLoaderUIDs, serverModpackContent.loaderVersion); // Update loader version
}
}

if (serverModpackContent.mcVersion != null) {
MmcPackMagic.changeVersion(MmcPackMagic.mcVerUIDs, serverModpackContent.mcVersion); // Update minecraft version
}
}

checkAndRemoveDuplicateMods(modpackDir + File.separator + "mods");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ public void restartWindow(String text) {
if (inputStream == null) {
inputStream = Windows.class.getClassLoader().getResourceAsStream("icon.png");
}
icon = ImageIO.read(Objects.requireNonNull(inputStream));
inputStream.close();
if (inputStream != null) {
icon = ImageIO.read(inputStream);
inputStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ org.gradle.jvmargs=-Xmx8G

# https://fabricmc.net/versions.html
fabric_loader_version=0.14.22
quilt_loader_version=0.20.1
quilt_loader_version=0.20.2

# Mod Properties
mod_id=automodpack
mod_name=AutoModpack
mod_version=3.5.0
mod_version=3.5.1
maven_group=pl.skidam.automodpack
archives_base_name=automodpack

Expand Down
2 changes: 1 addition & 1 deletion versions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ dependencies {
"fabric-api-base:0.4.30+ef105b4977",
"fabric-networking-api-v1:1.3.10+46fcf87e77",
"fabric-registry-sync-v0:2.3.2+1c0ea72177", // is it needed?
"fabric-resource-loader-v0:0.11.9+b48e1c2b77", // is it needed?
"fabric-resource-loader-v0:0.11.9+65ee760177", // is it needed?
"fabric-command-api-v2:2.2.12+561530ec77"
]

Expand Down

0 comments on commit 900fbed

Please sign in to comment.