Treetrain1 / Create

[Fabric Mod] Building Tools and Aesthetic Technology
MIT License
4 stars 9 forks source link

Pin version to `0.5.1-d-build.1161` #14

Closed solonovamax closed 6 months ago

solonovamax commented 9 months ago

Describe the Bug

Currently, the version that the mod uses is 0.5.1-d-build.5. However, some mods specifically depend on version 0.5.1-d-build.1161 (the latest release). It would be good if the build number could be pinned to 1161.

Reproduction Steps

  1. Install the fork
  2. Install a mod such as Create: SandPaper Overhaul
  3. Cannot launch game due to Create: SandPaper Overhaul requiring specifically create version 0.5.1-d-build.1161

Expected Result

Game launches.

Screenshots and Videos

N/A

Crash Report or Log

N/A

Operating System

Linux

Mod Version

0.5.1d

Minecraft Version

1.20.1

Other Mods

https://modrinth.com/mod/create-sandpaper-overhaul, N/A

Additional Context

N/A

solonovamax commented 9 months ago

I am temporary fixing this for myself, via the following patch:

diff --git a/build.gradle b/build.gradle
index a83006992..7d834c3ca 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,8 +13,9 @@ plugins {
 sourceCompatibility = JavaVersion.VERSION_17
 targetCompatibility = JavaVersion.VERSION_17

-String runNumber = System.getenv("GITHUB_RUN_NUMBER")
-String build = runNumber != null ? "build.$runNumber" : "local"
+// String runNumber = System.getenv("GITHUB_RUN_NUMBER")
+String build = "build.1161"
+// String build = runNumber != null ? "build.$runNumber" : "local"
 version = "$mod_version-$build+mc$minecraft_version"

 group = project.maven_group
raws commented 9 months ago

Looks like this affects Create Deco Fabric 2.0.0+1.20.1 as well. Confirmed that your patch fixes it. (Though instead of changing build.gradle, I just set GITHUB_RUN_NUMBER at build time, which works great locally, but wouldn't work with GitHub Actions due to default environment variable precedence.)

solonovamax commented 9 months ago

Yes, create deco is another one that I ran into which relied on the build number.

I set it in the buildscript, as that's technically the """better solution""", but whatever (tho the real better solution would be for mods to not depend on the build number lmao)

AsgerJon commented 9 months ago

Also Create Air Fabric has this error.

ahykono commented 8 months ago

Any news about a better fix yet (besides the earlier patch)? It's been over a month since this issue opened

corbinpenguin commented 8 months ago

Would it be too much trouble to provide an explanation as to how to implement this patch? @solonovamax I'd love to do this but I am not sure how.

I am temporary fixing this for myself, via the following patch:

diff --git a/build.gradle b/build.gradle
index a83006992..7d834c3ca 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,8 +13,9 @@ plugins {
 sourceCompatibility = JavaVersion.VERSION_17
 targetCompatibility = JavaVersion.VERSION_17

-String runNumber = System.getenv("GITHUB_RUN_NUMBER")
-String build = runNumber != null ? "build.$runNumber" : "local"
+// String runNumber = System.getenv("GITHUB_RUN_NUMBER")
+String build = "build.1161"
+// String build = runNumber != null ? "build.$runNumber" : "local"
 version = "$mod_version-$build+mc$minecraft_version"

 group = project.maven_group
Poopooracoocoo commented 8 months ago

@corbinpenguin I recommend just using a Fabric Dependency Override. Example: https://github.com/talrey/CreateDeco/issues/105#issuecomment-1860003640

solonovamax commented 8 months ago

Would it be too much trouble to provide an explanation as to how to implement this patch? @solonovamax I'd love to do this but I am not sure how.

I am temporary fixing this for myself, via the following patch:

diff --git a/build.gradle b/build.gradle
index a83006992..7d834c3ca 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,8 +13,9 @@ plugins {
 sourceCompatibility = JavaVersion.VERSION_17
 targetCompatibility = JavaVersion.VERSION_17

-String runNumber = System.getenv("GITHUB_RUN_NUMBER")
-String build = runNumber != null ? "build.$runNumber" : "local"
+// String runNumber = System.getenv("GITHUB_RUN_NUMBER")
+String build = "build.1161"
+// String build = runNumber != null ? "build.$runNumber" : "local"
 version = "$mod_version-$build+mc$minecraft_version"

 group = project.maven_group

either use the dependency override (as suggested by @Poopooracoocoo), or follow these instructions

Mukul1127 commented 7 months ago

I made a build of it: https://github.com/Mukul1127/Create-Sodium-Fix

Treetrain1 commented 6 months ago

fixed in latest update