Posted February 29, 20169 yr Is there a way to change what the player types in the chat? For example, if the player types "Hello world", the chat shows "<Player> Nice to meet you" instead after the player pressed enter. I'm planning to make this mod client sided too.
February 29, 20169 yr Author You will have to do some serious hackery to achieve this. First of all, understand the structure of Minecraft's netty pipeline (if you don't know how netty works, learn it). It is set up in NetworkManager.createNetworkManagerAndConnect / provideLocalClient. You need to create an OutboundChannelHandler and insert it into the pipeline before Minecraft's encoders. That way you can intercept any outbound packets, in this case you need to listen for C01PacketChatMessage. Do not do this if you don't understand netty! Oh wow, that is surprisingly difficult(However, I will attempt to try it.). Thanks for telling me that!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.