mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Merge remote-tracking branch 'upstream/feature/translatable-text' into i18n-merge
This commit is contained in:
@ -57,6 +57,7 @@ import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@ -156,7 +157,7 @@ public class ForgePlayer extends AbstractPlayerActor {
|
||||
|
||||
@Override
|
||||
public void print(Component component) {
|
||||
this.player.sendMessage(ITextComponent.Serializer.fromJson(GsonComponentSerializer.INSTANCE.serialize(WorldEditText.format(component))));
|
||||
this.player.sendMessage(ITextComponent.Serializer.fromJson(GsonComponentSerializer.INSTANCE.serialize(WorldEditText.format(component, getLocale()))));
|
||||
}
|
||||
|
||||
private void sendColorized(String msg, TextFormatting formatting) {
|
||||
@ -206,6 +207,11 @@ public class ForgePlayer extends AbstractPlayerActor {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Locale getLocale() {
|
||||
return Locale.forLanguageTag(player.language.replace('_', '-'));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <B extends BlockStateHolder<B>> void sendFakeBlock(BlockVector3 pos, B block) {
|
||||
World world = getWorld();
|
||||
|
@ -1 +1,2 @@
|
||||
public net.minecraft.server.MinecraftServer field_211151_aa # serverTime
|
||||
public net.minecraft.server.MinecraftServer field_211151_aa # serverTime
|
||||
public net.minecraft.entity.player.ServerPlayerEntity field_71148_cg # language
|
||||
|
Reference in New Issue
Block a user