From 73030c7456e9aac626adb3413b63cd70e43608fd Mon Sep 17 00:00:00 2001 From: IThundxr Date: Fri, 17 Jan 2025 20:22:26 -0500 Subject: [PATCH] more fixes --- .github/workflows/build.yml | 2 +- README.md | 4 ++-- gradle.properties | 2 +- neoforge/build.gradle.kts | 6 ++--- .../resources/META-INF/neoforge.mods.toml | 2 +- settings.gradle.kts | 2 +- vanillinFabric/build.gradle.kts | 2 +- vanillinForge/gradle.properties | 1 - .../engine_room/vanillin/VanillinForge.java | 23 ------------------- .../build.gradle.kts | 20 ++++++++-------- vanillinNeoForge/gradle.properties | 1 + .../vanillin/VanillinNeoForgeClient.java | 15 ++++++++++++ .../src/main/resources/META-INF/mods.toml | 4 ++-- .../src/main/resources/pack.mcmeta | 0 14 files changed, 39 insertions(+), 45 deletions(-) delete mode 100644 vanillinForge/gradle.properties delete mode 100644 vanillinForge/src/main/java/dev/engine_room/vanillin/VanillinForge.java rename {vanillinForge => vanillinNeoForge}/build.gradle.kts (69%) create mode 100644 vanillinNeoForge/gradle.properties create mode 100644 vanillinNeoForge/src/main/java/dev/engine_room/vanillin/VanillinNeoForgeClient.java rename {vanillinForge => vanillinNeoForge}/src/main/resources/META-INF/mods.toml (92%) rename {vanillinForge => vanillinNeoForge}/src/main/resources/pack.mcmeta (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 464b726f9..8f763ec82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: fabric/build/libs/ neoforge/build/libs/ vanillinFabric/build/libs/ - vanillinForge/build/libs/ + vanillinNeoForge/build/libs/ test: strategy: diff --git a/README.md b/README.md index 335367486..fa5194552 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ repositories { } dependencies { - compileOnly fg.deobf("dev.engine_room.flywheel:flywheel-forge-api-${minecraft_version}:${flywheel_version}") - runtimeOnly fg.deobf("dev.engine_room.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}") + compileOnly fg.deobf("dev.engine_room.flywheel:flywheel-neoforge-api-${minecraft_version}:${flywheel_version}") + runtimeOnly fg.deobf("dev.engine_room.flywheel:flywheel-neoforge-${minecraft_version}:${flywheel_version}") } ``` `${flywheel_version}` gets replaced by the version of Flywheel you want to use, eg. `1.0.0-beta` diff --git a/gradle.properties b/gradle.properties index adc7f701b..c150dc66e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -39,7 +39,7 @@ fabric_loader_version = 0.16.5 fabric_api_version = 0.105.0+1.21.1 # Build dependency mod versions -sodium_version = mc1.21.1-0.6.0-beta.4 +sodium_version = mc1.21.1-0.6.5 iris_version = 1.8.0-beta.8+1.21.1 # There is no oculus for 1.21.1 so we will only support iris embeddium_version = 1.0.11+mc1.21.1 diff --git a/neoforge/build.gradle.kts b/neoforge/build.gradle.kts index 6910b0641..04bb51466 100644 --- a/neoforge/build.gradle.kts +++ b/neoforge/build.gradle.kts @@ -10,7 +10,7 @@ plugins { val common = ":common" val commonProject = project(common) -subproject.init("flywheel-forge", "flywheel_group", "flywheel_version") +subproject.init("flywheel-neoforge", "flywheel_group", "flywheel_version") val api = sourceSets.create("api") val lib = sourceSets.create("lib") @@ -65,12 +65,12 @@ platform { } jarSets { - mainSet.publish("flywheel-forge-${project.property("artifact_minecraft_version")}") + mainSet.publish("flywheel-neoforge-${project.property("artifact_minecraft_version")}") mainSet.outgoing("flywheel") create("api", api, lib).apply { addToAssemble() - publish("flywheel-forge-api-${project.property("artifact_minecraft_version")}") + publish("flywheel-neoforge-api-${project.property("artifact_minecraft_version")}") configureJar { manifest { diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index 69cdd3737..fd8e8fa34 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -26,7 +26,7 @@ versionRange = "${minecraft_maven_version_range}" side = "CLIENT" [[dependencies.${ flywheel_id }]] -modId = "forge" +modId = "neoforge" mandatory = true versionRange = "${neoforge_version_range}" side = "CLIENT" diff --git a/settings.gradle.kts b/settings.gradle.kts index b954bc08e..cf387858e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -18,5 +18,5 @@ rootProject.name = "Flywheel" include("common") include("fabric") include("neoforge") -include("vanillinForge") +include("vanillinNeoForge") include("vanillinFabric") diff --git a/vanillinFabric/build.gradle.kts b/vanillinFabric/build.gradle.kts index 455da11d1..f7a2ec85e 100644 --- a/vanillinFabric/build.gradle.kts +++ b/vanillinFabric/build.gradle.kts @@ -45,7 +45,7 @@ dependencies { modImplementation("net.fabricmc:fabric-loader:${property("fabric_loader_version")}") modApi("net.fabricmc.fabric-api:fabric-api:${property("fabric_api_version")}") - modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}") + modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-fabric") compileOnly(project(path = common, configuration = "vanillinClasses")) compileOnly(project(path = common, configuration = "vanillinResources")) diff --git a/vanillinForge/gradle.properties b/vanillinForge/gradle.properties deleted file mode 100644 index 82425854e..000000000 --- a/vanillinForge/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -loom.platform=forge diff --git a/vanillinForge/src/main/java/dev/engine_room/vanillin/VanillinForge.java b/vanillinForge/src/main/java/dev/engine_room/vanillin/VanillinForge.java deleted file mode 100644 index 7bbe0651b..000000000 --- a/vanillinForge/src/main/java/dev/engine_room/vanillin/VanillinForge.java +++ /dev/null @@ -1,23 +0,0 @@ -package dev.engine_room.vanillin; - -import dev.engine_room.vanillin.visuals.VanillaVisuals; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.DistExecutor; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; - -@Mod(Vanillin.ID) -public class VanillinForge { - public VanillinForge() { - IEventBus forgeEventBus = MinecraftForge.EVENT_BUS; - IEventBus modEventBus = FMLJavaModLoadingContext.get() - .getModEventBus(); - DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> clientInit(forgeEventBus, modEventBus)); - } - - private static void clientInit(IEventBus forgeEventBus, IEventBus modEventBus) { - VanillaVisuals.init(); - } -} diff --git a/vanillinForge/build.gradle.kts b/vanillinNeoForge/build.gradle.kts similarity index 69% rename from vanillinForge/build.gradle.kts rename to vanillinNeoForge/build.gradle.kts index b7f1a8170..41a09c59e 100644 --- a/vanillinForge/build.gradle.kts +++ b/vanillinNeoForge/build.gradle.kts @@ -8,9 +8,9 @@ plugins { } val common = ":common" -val platform = ":forge" +val platform = ":neoforge" -subproject.init("vanillin-forge", "vanillin_group", "vanillin_version") +subproject.init("vanillin-neoforge", "vanillin_group", "vanillin_version") val main = sourceSets.getByName("main") @@ -27,7 +27,7 @@ transitiveSourceSets { } jarSets { - mainSet.publish("vanillin-forge-${project.property("artifact_minecraft_version")}") + mainSet.publish("vanillin-neoforge-${project.property("artifact_minecraft_version")}") } defaultPackageInfos { @@ -40,11 +40,6 @@ loom { add(main, "vanillin.refmap.json") } - forge { -// mixinConfig("flywheel.backend.mixins.json") -// mixinConfig("flywheel.impl.mixins.json") - } - runs { configureEach { property("forge.logging.markers", "") @@ -53,8 +48,15 @@ loom { } } +repositories { + maven("https://maven.neoforged.net/releases/") +} + dependencies { - forge("net.minecraftforge:forge:${property("minecraft_version")}-${property("forge_version")}") + neoForge("net.neoforged:neoforge:${property("neoforge_version")}") + + modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-neoforge") + modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge") modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}") diff --git a/vanillinNeoForge/gradle.properties b/vanillinNeoForge/gradle.properties new file mode 100644 index 000000000..2e6ed7676 --- /dev/null +++ b/vanillinNeoForge/gradle.properties @@ -0,0 +1 @@ +loom.platform = neoforge diff --git a/vanillinNeoForge/src/main/java/dev/engine_room/vanillin/VanillinNeoForgeClient.java b/vanillinNeoForge/src/main/java/dev/engine_room/vanillin/VanillinNeoForgeClient.java new file mode 100644 index 000000000..bb9ce2d47 --- /dev/null +++ b/vanillinNeoForge/src/main/java/dev/engine_room/vanillin/VanillinNeoForgeClient.java @@ -0,0 +1,15 @@ +package dev.engine_room.vanillin; + +import dev.engine_room.vanillin.visuals.VanillaVisuals; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.common.Mod; +import net.neoforged.neoforge.common.NeoForge; + +@Mod(value = Vanillin.ID, dist = Dist.CLIENT) +public class VanillinNeoForgeClient { + public VanillinNeoForgeClient(IEventBus modEventBus) { + IEventBus neoEventBus = NeoForge.EVENT_BUS; + VanillaVisuals.init(); + } +} diff --git a/vanillinForge/src/main/resources/META-INF/mods.toml b/vanillinNeoForge/src/main/resources/META-INF/mods.toml similarity index 92% rename from vanillinForge/src/main/resources/META-INF/mods.toml rename to vanillinNeoForge/src/main/resources/META-INF/mods.toml index dd213eb6b..68d7c6fee 100644 --- a/vanillinForge/src/main/resources/META-INF/mods.toml +++ b/vanillinNeoForge/src/main/resources/META-INF/mods.toml @@ -21,9 +21,9 @@ versionRange = "${minecraft_maven_version_range}" side = "CLIENT" [[dependencies.${ vanillin_id }]] -modId = "forge" +modId = "neoforge" mandatory = true -versionRange = "${forge_version_range}" +versionRange = "${neoforge_version_range}" side = "CLIENT" [[dependencies.${ vanillin_id }]] diff --git a/vanillinForge/src/main/resources/pack.mcmeta b/vanillinNeoForge/src/main/resources/pack.mcmeta similarity index 100% rename from vanillinForge/src/main/resources/pack.mcmeta rename to vanillinNeoForge/src/main/resources/pack.mcmeta