-.- Read more carefully, OP wants to change the packet C00Handshake, which is sent before ModList packet is sent. OP doesn't want to change the entire handshake.
Edit: It seems that you have confused C00Handshake with the handshake process. C00Handshake is a packet sent to the server to initiate a handshake process, or just simply get the server's information, i.e motd, online player counts, maximum players count, and the server's information.
The handshake process is different from C00Handshake. C00Handshake is only a packet, while the handshake process is a process where client and server establish connection and exchange information, e.g. encryption key, client version, player game profile, and of course, modlist.
What OP hopes to achieve is to change the content of C00Handshake, which doesn't interfere with the exchange of modlist packet.
If OP has knowledge of ASM than he probably wouldn't have needed help on this forum. So I'm guessing that he doesn't really have an idea of how ASM work.
From your statement I am guessing that you don't know how to use ASM to edit vanilla class either, so I'm just gonna let you know that using ASM to edit vanilla class is very specific to what class you are trying to modify. The code that I linked in my previous comment can't really be used on the ModList packet without basically rewriting the entire class.
Edit: To illustrate more clearly why changing C00Handshake and changing the content of ModList with ASM is two completely different process, here is a better explanation.
As you can see from my code linked in my previous comment, all I did was changing whatever CST Node I can find with the string '\0FML\0' to a different string. If you want to change the content of a ModList packet, you can either add a custom ChannelHandler to intercept the packet, or add a function call in the ModList packet, which modifies the list of the packet using ASM.
Let's focus on the method that uses ASM because it is similar to what I did with C00Handshake, and you are cocerned that my code would let OP knows how to change the ModList packet. If OP doesn't have a clue on how Java bytecode works, he will simply have no idea on what my code is doing. Even if he does know, that won't do anything either because changing a string in a class and adding a method call is two different things. So your concern is invalid and there is nothing to worry about.
No concern is ever invalid, but at least you make the effort to not hide what is possible, unlike the OP who strictly refused to explain, and requested a mod that was simple to understand and edit.
Rollback Post to RevisionRollBack
WARNING:
My output of snark depends on your output of stupidity.
-.- Read more carefully, OP wants to change the packet C00Handshake, which is sent before ModList packet is sent. OP doesn't want to change the entire handshake.
Edit: It seems that you have confused C00Handshake with the handshake process. C00Handshake is a packet sent to the server to initiate a handshake process, or just simply get the server's information, i.e motd, online player counts, maximum players count, and the server's information.
The handshake process is different from C00Handshake. C00Handshake is only a packet, while the handshake process is a process where client and server establish connection and exchange information, e.g. encryption key, client version, player game profile, and of course, modlist.
What OP hopes to achieve is to change the content of C00Handshake, which doesn't interfere with the exchange of modlist packet.
Never mind the fact that one would be able to determine how to edit any of the packets from the editing of the one.
WARNING:
My output of snark depends on your output of stupidity.
My patience wears thin on strawmen and lies.
If OP has knowledge of ASM than he probably wouldn't have needed help on this forum. So I'm guessing that he doesn't really have an idea of how ASM work.
From your statement I am guessing that you don't know how to use ASM to edit vanilla class either, so I'm just gonna let you know that using ASM to edit vanilla class is very specific to what class you are trying to modify. The code that I linked in my previous comment can't really be used on the ModList packet without basically rewriting the entire class.
Edit: To illustrate more clearly why changing C00Handshake and changing the content of ModList with ASM is two completely different process, here is a better explanation.
As you can see from my code linked in my previous comment, all I did was changing whatever CST Node I can find with the string '\0FML\0' to a different string. If you want to change the content of a ModList packet, you can either add a custom ChannelHandler to intercept the packet, or add a function call in the ModList packet, which modifies the list of the packet using ASM.
Let's focus on the method that uses ASM because it is similar to what I did with C00Handshake, and you are cocerned that my code would let OP knows how to change the ModList packet. If OP doesn't have a clue on how Java bytecode works, he will simply have no idea on what my code is doing. Even if he does know, that won't do anything either because changing a string in a class and adding a method call is two different things. So your concern is invalid and there is nothing to worry about.
No concern is ever invalid, but at least you make the effort to not hide what is possible, unlike the OP who strictly refused to explain, and requested a mod that was simple to understand and edit.
WARNING:
My output of snark depends on your output of stupidity.
My patience wears thin on strawmen and lies.