Skip to content

Commit

Permalink
Allow to work with txloader (#24)
Browse files Browse the repository at this point in the history
* Cleanup build

* Allow to work with txloader
  • Loading branch information
miozune authored Mar 12, 2024
1 parent 3f4dba8 commit 035cc1f
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 47 deletions.
27 changes: 0 additions & 27 deletions .github/scripts/test-no-error-reports.sh

This file was deleted.

8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ whitelist.json
*.iml
*.ipr
*.iws
src/main/resources/mixins.*.json
src/main/resources/mixins.*([!.]).json
*.bat
*.DS_Store
!gradlew.bat
.factorypath
addon.local.gradle
addon.local.gradle.kts
addon.late.local.gradle
addon.late.local.gradle.kts
layout.json
18 changes: 5 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ channel = stable
mappingsVersion = 12

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

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

# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = GRADLETOKEN_VERSION

# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =

# [DEPRECATED] Mod name replacement token.
gradleTokenModName =
gradleTokenVersion = VERSION

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

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

# Maven repository to publish the mod to.
# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/

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

# Non-GTNH properties
gradleTokenGroupName =
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.16'
}


2 changes: 1 addition & 1 deletion src/main/java/alexiil/mods/load/BetterLoadingScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

@Mod(
modid = Lib.Mod.ID,
version = Lib.Mod.VERSION,
version = Tags.VERSION,
name = Lib.Mod.NAME,
acceptedMinecraftVersions = "[1.7.10]",
guiFactory = "alexiil.mods.load.gui.ConfigGuiFactory",
Expand Down
1 change: 0 additions & 1 deletion src/main/java/alexiil/mods/load/Lib.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ public static class Mod {

public static final String ID = "betterloadingscreen";
public static final String NAME = "Better Loading Screen GTNH";
public static final String VERSION = "GRADLETOKEN_VERSION";
}
}
10 changes: 7 additions & 3 deletions src/main/java/alexiil/mods/load/Translation.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;

import net.minecraft.util.StatCollector;

@Deprecated
public class Translation {

private static Map<String, Translation> translators = new HashMap<String, Translation>();
private static final Map<String, Translation> translators = new HashMap<>();
private static Translation currentTranslation = null;
private Map<String, String> translations = new HashMap<String, String>();
private final Map<String, String> translations = new HashMap<>();

public static String translate(String toTranslate) {
return translate(toTranslate, toTranslate);
}

public static String translate(String toTranslate, String failure) {
// return I18n.format(toTranslate);
if (StatCollector.canTranslate(toTranslate)) {
return StatCollector.translateToLocal(toTranslate);
}
if (currentTranslation != null) return currentTranslation.translateInternal(toTranslate, failure);
return failure;
}
Expand Down

0 comments on commit 035cc1f

Please sign in to comment.