-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from KatatsumuriPan/1.7.10/forge-dev
Update to v1.0.1(1.7.10Forge)
- Loading branch information
Showing
19 changed files
with
168 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Change Log | ||
|
||
### [1.7.10-forge-1.0.1](https://github.com/KatatsumuriPan/BetterLineBreak/releases/tag/1.7.10-forge-1.0.1) - 2024-02-20 | ||
|
||
- Fix resetting config bug. | ||
- Fix server crushing bug. | ||
|
||
### [1.7.10-forge-1.0.0](https://github.com/KatatsumuriPan/BetterLineBreak/releases/tag/1.7.10-forge-1.0.0) - 2024-02-15 | ||
|
||
- First release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/kpan/b_line_break/config/core/CommentLocalizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package kpan.b_line_break.config.core; | ||
|
||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import kpan.b_line_break.ModMain; | ||
import net.minecraft.client.resources.I18n; | ||
|
||
public class CommentLocalizer { | ||
|
||
public static String tryLocalize(String localizationKey, String defaultValue) { | ||
if (!ModMain.proxy.hasClientSide()) | ||
return defaultValue; | ||
|
||
String localized = format(localizationKey); | ||
if (localizationKey.equals(localized)) | ||
return defaultValue; | ||
else | ||
return localized; | ||
} | ||
|
||
@SideOnly(Side.CLIENT) | ||
private static String format(String localizationKey) { | ||
return I18n.format(localizationKey); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.