我的世界中文输入1.8.8

简介

很多人在跟他人在服务器游玩时,交流却不方便
无法通过打字中文来与他人交流
这就十分的麻烦,需要复制粘贴
我最近在开发PVP客户端,发现要搞一个中文输入
我在百度上搜了很多内容都没搜到
发现都是替换原版核心的class文件和添加MOD
我这个是自己改编过的客户端无法按照此方法修改
我便把class文件编译了一下找到了修改的地方

方法

1.懒的人就直接下载下方我给出的链接
打开反编译后MC的src/net/minecraft/client/gui
替换你下载的文件,打开源码,测试即可
2.如果修改过GuiScreen.java这个文件的话
找到约621行的代码,按照下方替换:
原代码:

public void handleKeyboardInput() throws IOException
    {
        if (Keyboard.getEventKeyState())
        {
            this.keyTyped(Keyboard.getEventCharacter(), Keyboard.getEventKey());
        }

        this.mc.dispatchKeypresses();
    }

替换后代码:

public void handleKeyboardInput() throws IOException
    {
        int i = Keyboard.getEventKey();
        char c0 = Keyboard.getEventCharacter();

        if (Keyboard.getEventKeyState() || i == 0 && Character.isDefined(c0))
        {
            this.keyTyped(c0, i);
        }

        this.mc.dispatchKeypresses();
    }

保存,运行测试即可!

下载地址

此处内容需要评论回复后(审核通过)方可阅读。

图片展示

Last modification:April 11th, 2020 at 03:10 pm
If you think my article is useful to you, please feel free to appreciate