Axeryok / CocoaInput

A best way to input characters with native mac IM in Minecraft
https://minecraft.curseforge.com/projects/cocoainput
Other
96 stars 40 forks source link

こんにちは~Could I take you some time to update the pre-1.13 branch to support native M1? #9

Open QianNangong opened 3 years ago

QianNangong commented 3 years ago

I'd like to play a private 1.12.2 mod server, and I'm using the wrapper provided by https://github.com/r58Playz/m1-multimc-hack to make Minecraft running natively on my M1 Mac. But I can not using any IME to input CJK characters without this mod, I recompile the cocoainput module and replace it inside the existing jar, and it block the further startup progress.

截屏2021-06-05 下午6 51 37

Click the game window does not work at all. Could you please make a fix? Thanks.

Axeryok commented 3 years ago

I cannot think of solution because I don't have M1 mac. If you would like to skip blocking process, recompile with following edit. 1.open cocoainput.m 2.delete this section.

while(1){
      [DataManager sharedManager].openglView=[[NSApp keyWindow] contentView];
      if([[[DataManager sharedManager].openglView className]isEqualToString:@"MacOSXOpenGLView"]==YES)break;
  }

And instead of above code, I recommend to keep minecraft window focusing on startup. (Above code exists for those who lose focus)

QianNangong commented 3 years ago

Hummmmm... It seems that it will crash the game...

nitian11 commented 1 year ago

请问解决了嘛 Have you resolved it?