Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Find the proper Method signature for dispatchPacket?

Recommended Posts

Im looking at the method dispatchPacket in NetworkManager. Its parameters are a packet and a io.netty.util.concurrent.GenericFutureListener. Now depending on the versions the mappings are different, for 1.15 mcp says its func_150732_b.

Now what I need is the proper signature with parameters(idk if theres a name for this and/or a lookup). Ik that a packet is like this: Lnet/minecraft/network/Packet; but Idk how to get the io.netty.util.concurrent.GenericFutureListener.

I would like it to look like this:

func_150732_b(Lnet/minecraft/network/Packet;<whatever the GenericFutureListener thing is>)V


I need this for an access transformer, ik reflection blabla pls dont kill me

Link to post
Share on other sites

Many methods import weird stuff so I just want to know how to get a proper method signature from that. Ik that its not bound to primitives and minecraft classes since u can also do stuff like Ljava/util/List. Id just like to know what it is for io.netty.util.concurrent.GenericFutureListener cause I imagined it to be like Lio/netty/util/concurrent/GenericFutureListener wich isnt right

Link to post
Share on other sites

drawString(Ljava/lang/String;FFIZ)I  <- this is what a method signature for drawString in FontRenderer would look like just an example.
ALL I want to know is how the signature for func_150732_b, "dispatchPacket" would look like.

Its takes a packet and a io.netty.util.concurrent.GenericFutureListener as arguments.

So Ik it would look something like this func_150732_b(Lnet/minecraft/network/Packet;<whatever the GenericFutureListener thing is>)V

I just want to know what the GenericFutureListener would look like here.

Link to post
Share on other sites

Thx, yeah thats why I came here: what I did was Lio/netty/util/concurrent/GenericFutureListener; wich doesnt work.

This is how it is in my access transformer:


public net.minecraft.network.NetworkManager func_150733_h()V

public net.minecraft.network.NetworkManager func_150732_b(Lnet/minecraft/network/Packet;Lio/netty/util/concurrent/GenericFutureListener;)V


The first one worked fine and am able to access it(its flushOutboundQueue) I only added the second today and that one doesnt.


1 Broken Access Transformer lines:
 ---  net.minecraft.network.NetworkManager func_150732_b(Lnet/minecraft/network/Packet;io/netty/util/concurrent/GenericFutureListen


this is the error message when I do gradlew setupDecompWorkspace. I dont know why cause i checked it, func_150732_b is the correct mapping.



Link to post
Share on other sites

I want to write my own sendPacket method:


```public void sendAPacket(Packet<?> packet) { if(packet != null) { NetworkManager manager = mc.player.connection.getNetworkManager(); if(manager.isChannelOpen()) { manager.flushOutboundQueue(); manager.dispatchPacket(packet, (GenericFutureListener[]) null); } else { manager.readWriteLock.writeLock().lock(); try { manager.outboundPacketsQueue.add(new NetworkManager.InboundHandlerTuplePacketListener(packet, new GenericFutureListener[0])); } finally { manager.readWriteLock.writeLock().unlock(); } } } }```


If this information is so horrible that u dont want it out in the internet dm me it(?) but I came here with a question.

Link to post
Share on other sites
This topic is now closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.