How to remap the reflect params? Help Wanted
See original GitHub issueeverything was remaped but the reflect params.
I have search on the fabric wiki(zh-cn) but got little message about that.
//反射
Field packetHandlers = NetworkState.class.getDeclaredField("packetHandlers");
Field HANDLER_STATE_MAP = NetworkState.class.getDeclaredField("HANDLER_STATE_MAP");
Class<?> PacketHandler = Class.forName("net.minecraft.network.NetworkState$PacketHandler");
Method register = PacketHandler.getMethod("register", Class.class, Supplier.class);
I want to make it remaped, but dont know how to do. I know I can got the remaped name on the “yarn”, but I guess that if I remap it by myself, it would not work in the idea’s “runClient”. But I dont remap it, it cannot work but in the idea’s “runClient” and “runServer”.
Sorry for my poor English, Can anyone help me, please? Thanks. 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:56 (19 by maintainers)
Top Results From Across the Web
Remap Extending G code - LinuxCNC
The recommended way to call an NGC procedure with a standard argspec parameter conversion. Used if argspec is good enough. Note it's not...
Read more >How to show method parameter tooltip in C#? - Stack Overflow
Ctrl + Shift + Space will do what you want. You might want to check out a poster of key bindings.
Read more >Reflection Terminal Reference Manual for VT Hosts - Attachmate
Remap your keyboard using a graphical keyboard interface. This lets you assign any keystroke to a Reflection or host function.
Read more >MigrationWiz - Advanced Options & General Options
We do not support recipient mapping for the actual MIME content, so email mime content-based migrations, such as Zimbra, won't have remapping ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
你的意思是指只保留一个“把NetworkState的map放到PacketRegister里面”的部分吗? 大概了解你的意思了,确实这样搞的话编译器也很烦恼要怎么做。
成功了!真的是太感谢你了! 按照着上面你们三位指导我的做法,我将注入NetworkState部分的代码全删了,用Accessor代替获取Handlers。 成功的代码 总感觉对这方面的理解稍为更进一步了,真的十分感谢你们!😃 (学到和认识了好多新东西,Accessor,access widener,以及Ctrl + Shift + F全局搜索原来要下载源码文件才能搜到…之前不会注入的时候,就靠这个搜例子…但因为没有下载源码的原因,几乎搜不到几个)
哦,你这个循环呼叫了 加载NetworkState的时候呼叫了你的PacketRegister,而你的PacketRegister以为NetworkState已经跑完
<clinit>
了。你只要在两个地方中间的一个把NetworkState的map放到你PacketRegister里面应该就行了