Rebase translation work for easier rebasing

This commit is contained in:
Matthew Miller
2019-10-13 21:47:26 +10:00
parent 77ef0ae417
commit 96e56bdd0c
80 changed files with 1155 additions and 359 deletions

View File

@ -55,6 +55,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;
import javax.annotation.Nullable;
@ -153,7 +154,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) {
@ -203,6 +204,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();

View File

@ -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