Skip to content

Commit

Permalink
Added a new footer
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiYueCommentary committed Aug 5, 2024
1 parent eff1565 commit dc54395
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 3 deletions.
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "java"
id "de.undercouch.download" version "4.1.2"
id "io.github.pacifistmc.forgix" version "1.+"
}

Expand Down Expand Up @@ -77,3 +78,21 @@ subprojects {
build.finalizedBy(mergeJars)
assemble.finalizedBy(mergeJars)
}

afterEvaluate {
download {
src "https://weblate.ziyuesinicization.site/api/components/tianjin-metro/en_us-json/file/"
dest "lang.zip"
overwrite true
retries - 1
}
copy {
from(zipTree("lang.zip"))
into "temp_lang"
}
copy {
from "temp_lang/tianjin-metro/en_us-json/fabric/src/main/resources/assets/tjmetro/lang"
into "fabric/src/main/resources/assets/tjmetro/lang"
}
delete("lang.zip", "temp_lang")
}
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ java {
languageVersion.set(JavaLanguageVersion.of(buildTools.javaLanguageVersion))
}
withSourcesJar()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public FallingBlockMixin(Settings settings) {
}

@Inject(at = @At("HEAD"), method = "scheduledTick", cancellable = true)
#if MC_VERSION < "11904"
#if MC_VERSION <= "11802"
private void beforeScheduledTick(BlockState state, ServerWorld world, BlockPos pos, java.util.Random random, CallbackInfo ci)
#else
private void beforeScheduledTick(BlockState state, ServerWorld world, BlockPos pos, net.minecraft.util.math.random.Random random, CallbackInfo ci)
Expand Down
1 change: 1 addition & 0 deletions fabric/src/main/java/ziyue/tjmetro/mod/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public interface Reference
String FORUM = "https://forum.ziyuesinicization.site/t/tianjin-metro";
String WEBLATE = "https://weblate.ziyuesinicization.site/engage/tianjin-metro/";
String DISCORD = "https://discord.gg/mEvEjPnVXe";
String PREVENT_BLOCK_FALLING = "https://github.com/ZiYueCommentary/Tianjin-Metro/wiki/Prevent-block-falling";
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class ConfigClient
new Footer(() -> TextHelper.translatable("footer.tjmetro.forum"), Reference.FORUM),
new Footer(() -> TextHelper.translatable("footer.tjmetro.contributors"), Reference.CONTRIBUTORS),
new Footer(() -> TextHelper.translatable("footer.tjmetro.weblate"), Reference.WEBLATE),
new Footer(() -> TextHelper.translatable("footer.tjmetro.discord"), Reference.DISCORD)
new Footer(() -> TextHelper.translatable("footer.tjmetro.discord"), Reference.DISCORD),
new Footer(() -> TextHelper.translatable("footer.tjmetro.prevent_block_falling"), Reference.PREVENT_BLOCK_FALLING)
);

/**
Expand Down
2 changes: 2 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ java {
}

tasks.register("setupFiles") {
println("Copying resources from Fabric to Forge")

delete fileTree("src/main/java/ziyue/tjmetro/mod")
delete fileTree("src/main/resources/assets")
delete fileTree("src/main/resources/data")
Expand Down

0 comments on commit dc54395

Please sign in to comment.