Skip to content

Commit

Permalink
Update Forge version for language fix
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Jun 27, 2020
1 parent 66047ad commit 89b3d91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public static Component join(List<Component> components, Component joiner) {
* @return A Java locale
*/
public static Locale getLocaleByMinecraftTag(String locale) {
if (locale == null) {
return Locale.US;
}
return Locale.forLanguageTag(locale.replace('_', '-'));
}
}
2 changes: 1 addition & 1 deletion worldedit-forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ val nextMajorMinecraftVersion: String = minecraftVersion.split('.').let { (usele
"$useless.${major.toInt() + 1}"
}
val mappingsMinecraftVersion = "1.16"
val forgeVersion = "32.0.6"
val forgeVersion = "32.0.23"

configurations.all {
resolutionStrategy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.sk89q.worldedit.util.HandSide;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.formatting.WorldEditText;
import com.sk89q.worldedit.util.formatting.component.TextUtils;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.serializer.gson.GsonComponentSerializer;
import com.sk89q.worldedit.world.World;
Expand Down Expand Up @@ -212,8 +213,7 @@ public void setFlying(boolean flying) {

@Override
public Locale getLocale() {
// TODO wait for upstream fix
return Locale.ENGLISH; //TextUtils.getLocaleByMinecraftTag(player.language);
return TextUtils.getLocaleByMinecraftTag(player.getLanguage());
}

@Override
Expand Down

0 comments on commit 89b3d91

Please sign in to comment.