Skip to content

Commit

Permalink
Actually set new locale on NeoForge
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Aug 2, 2024
1 parent 3ca091b commit e2cd1c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public abstract class ServerPlayerMixin implements ServerPlayerBridge {
final String language = information.language();
final @Nullable Locale locale = LocaleHolderBridge.toLocale(language);
if (!Objects.equals(((LocaleHolderBridge) this).adventure$locale(), locale)) {
((LocaleHolderBridge) this).adventure$locale(locale);
AdventureCommon.HOOKS.onLocaleChange((ServerPlayer) (Object) this, locale);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ default void collectPointers(Pointered pointered, Pointers.Builder builder) {
}

default void onLocaleChange(ServerPlayer player, Locale newLocale) {
((LocaleHolderBridge) player).adventure$locale(newLocale);
MinecraftServerAudiencesImpl.forEachInstance(instance -> {
instance.bossBars().refreshTitles(player);
});
Expand Down

0 comments on commit e2cd1c4

Please sign in to comment.