Skip to content

Commit

Permalink
Update to 1.18
Browse files Browse the repository at this point in the history
 - Bumped major version to 5
 - Updated workspace dependencies
 - Updated mod metadata requirements
 - Migrated to new Forge API changes
  • Loading branch information
ChloeDawn committed Dec 11, 2021
1 parent 56bcf87 commit 730d99d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ plugins {
}

group = "dev.sapphic"
version = "4.0.1"
version = "5.0.0"

java {
withSourcesJar()
}

minecraft {
mappings("official", "1.17.1")
mappings("official", "1.18.1")

runs {
listOf("client", "server").forEach {
Expand Down Expand Up @@ -51,20 +51,20 @@ repositories {
}

dependencies {
minecraft("net.minecraftforge:forge:1.17.1-37.1.1")
minecraft("net.minecraftforge:forge:1.18.1-39.0.0")
implementation("org.checkerframework:checker-qual:3.20.0")
implementation(fg.deobf("me.shedaniel.cloth:cloth-config-forge:5.2.47"))
runtimeOnly(fg.deobf("top.theillusivec4.curios:curios-forge:1.17.1-5.0.2.4"))
compileOnly(fg.deobf("top.theillusivec4.curios:curios-forge:1.17.1-5.0.2.4:api"))
implementation(fg.deobf("me.shedaniel.cloth:cloth-config-forge:6.1.48"))
runtimeOnly(fg.deobf("top.theillusivec4.curios:curios-forge:1.18-5.0.2.4"))
compileOnly(fg.deobf("top.theillusivec4.curios:curios-forge:1.18-5.0.2.4:api"))

// Curios' debug items were removed in 1.17 so we use this for testing
runtimeOnly(fg.deobf("curse.maven:curio-of-undying-316873:3475293")) // 1.17.1-5.3.0.0
runtimeOnly(fg.deobf("curse.maven:curio-of-undying-316873:3553486")) // 1.18-5.3.0.0
}

tasks {
compileJava {
with(options) {
release.set(16)
release.set(17)
isFork = true
isDeprecation = true
encoding = "UTF-8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fmllegacy.network.FMLNetworkConstants;
import net.minecraftforge.network.NetworkConstants;

import java.util.function.Supplier;

Expand All @@ -19,7 +19,7 @@ public final class ArmorSoundTweak {

public ArmorSoundTweak() {
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> {
return new IExtensionPoint.DisplayTest(() -> FMLNetworkConstants.IGNORESERVERONLY, (s, v) -> true);
return new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (s, v) -> true);
});

DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> ArmorTicker::register);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraftforge.client.ConfigGuiHandler;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fmlclient.ConfigGuiHandler;

import java.util.function.BiFunction;
import java.util.function.Supplier;
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[28,)"
loaderVersion = "[38,)"
license = "Apache-2.0"

[[mods]]
Expand All @@ -12,17 +12,17 @@ description = """Plays the respective equip sound when (un)equipping armor in a
[[dependencies.armorsoundtweak]]
modId = "minecraft"
mandatory = true
versionRange = "[1.17,1.18)"
versionRange = "[1.18,1.19)"
side = "CLIENT"

[[dependencies.armorsoundtweak]]
modId = "forge"
mandatory = true
versionRange = "[37,)"
versionRange = "[38,)"
side = "CLIENT"

[[dependencies.armorsoundtweak]]
modId = "curios"
mandatory = false
versionRange = "[1.17.1-5,)"
versionRange = "[1.18-5,)"
side = "CLIENT"
2 changes: 1 addition & 1 deletion src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 7,
"pack_format": 8,
"description": "The default data for Armor Sound Tweak"
}
}

0 comments on commit 730d99d

Please sign in to comment.