Skip to content

Commit 035cc1f

Browse files
authored
Allow to work with txloader (#24)
* Cleanup build * Allow to work with txloader
1 parent 3f4dba8 commit 035cc1f

7 files changed

Lines changed: 21 additions & 47 deletions

File tree

.github/scripts/test-no-error-reports.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ whitelist.json
2626
*.iml
2727
*.ipr
2828
*.iws
29-
src/main/resources/mixins.*.json
29+
src/main/resources/mixins.*([!.]).json
3030
*.bat
3131
*.DS_Store
3232
!gradlew.bat
33+
.factorypath
34+
addon.local.gradle
35+
addon.local.gradle.kts
36+
addon.late.local.gradle
37+
addon.late.local.gradle.kts
38+
layout.json

gradle.properties

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ channel = stable
3333
mappingsVersion = 12
3434

3535
# Defines other MCP mappings for dependency deobfuscation.
36-
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
36+
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
3737

3838
# Select a default username for testing your mod. You can always override this per-run by running
3939
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
@@ -50,24 +50,18 @@ enableGenericInjection = false
5050
# Generate a class with a String field for the mod version named as defined below.
5151
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
5252
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
53-
generateGradleTokenClass =
53+
generateGradleTokenClass = alexiil.mods.load.Tags
5454

5555
# Name of the token containing the project's current version to generate/replace.
56-
gradleTokenVersion = GRADLETOKEN_VERSION
57-
58-
# [DEPRECATED] Mod ID replacement token.
59-
gradleTokenModId =
60-
61-
# [DEPRECATED] Mod name replacement token.
62-
gradleTokenModName =
56+
gradleTokenVersion = VERSION
6357

6458
# [DEPRECATED]
6559
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
6660
# public static final String VERSION = "GRADLETOKEN_VERSION";
6761
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
6862
# version in @Mod([...], version = VERSION, [...]).
6963
# Leave these properties empty to skip individual token replacements.
70-
replaceGradleTokenInFile = Lib.java
64+
# replaceGradleTokenInFile =
7165

7266
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
7367
# leave this property empty.
@@ -123,7 +117,7 @@ includeWellKnownRepositories = true
123117
usesMavenPublishing = true
124118

125119
# Maven repository to publish the mod to.
126-
# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/
120+
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
127121

128122
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
129123
#
@@ -187,5 +181,3 @@ curseForgeRelations =
187181
# This is meant to be set in $HOME/.gradle/gradle.properties.
188182
# ideaCheckSpotlessOnBuild = true
189183

190-
# Non-GTNH properties
191-
gradleTokenGroupName =

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pluginManagement {
1717
}
1818

1919
plugins {
20-
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8'
20+
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.16'
2121
}
2222

2323

src/main/java/alexiil/mods/load/BetterLoadingScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
@Mod(
3737
modid = Lib.Mod.ID,
38-
version = Lib.Mod.VERSION,
38+
version = Tags.VERSION,
3939
name = Lib.Mod.NAME,
4040
acceptedMinecraftVersions = "[1.7.10]",
4141
guiFactory = "alexiil.mods.load.gui.ConfigGuiFactory",

src/main/java/alexiil/mods/load/Lib.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ public static class Mod {
66

77
public static final String ID = "betterloadingscreen";
88
public static final String NAME = "Better Loading Screen GTNH";
9-
public static final String VERSION = "GRADLETOKEN_VERSION";
109
}
1110
}

src/main/java/alexiil/mods/load/Translation.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,23 @@
1313
import java.util.jar.JarEntry;
1414
import java.util.jar.JarFile;
1515

16+
import net.minecraft.util.StatCollector;
17+
1618
@Deprecated
1719
public class Translation {
1820

19-
private static Map<String, Translation> translators = new HashMap<String, Translation>();
21+
private static final Map<String, Translation> translators = new HashMap<>();
2022
private static Translation currentTranslation = null;
21-
private Map<String, String> translations = new HashMap<String, String>();
23+
private final Map<String, String> translations = new HashMap<>();
2224

2325
public static String translate(String toTranslate) {
2426
return translate(toTranslate, toTranslate);
2527
}
2628

2729
public static String translate(String toTranslate, String failure) {
28-
// return I18n.format(toTranslate);
30+
if (StatCollector.canTranslate(toTranslate)) {
31+
return StatCollector.translateToLocal(toTranslate);
32+
}
2933
if (currentTranslation != null) return currentTranslation.translateInternal(toTranslate, failure);
3034
return failure;
3135
}

0 commit comments

Comments
 (0)