Just as the title queries, how do you get the list of all/total packets available in MCPE and how would you see the order in which you encode/decode the packet? If you're wondering the reason of why i want to do this; this is for plugin having to do with packets, but I need to find out how to get the packets first. As you may know, pocketmine does not have all the possibilities of an MCPE server implemented, so while they implement them I can approach them first. I know not everything has to do with packets but I still wanna know how to get them. Thanks.
Read the classes in pocketmine\network\protocol namespace. All standard packets from MCPE should have already been added in this namespace. If they are not added, blame @dktapps (I can see @dktapps excusing that they are not being used hence no need to add them)
Oh, but I still wanna know how to get them and the order of encode/decode. Also, is there a chance to create one's own packets?
They're right there in pocketmine\network\protocol. Look at the encode() and decode() functions to see the order of the fields. Creating packets that don't already exist in MCPE (that the client would be able to parse) is impossible, if that's what you meant by "creating one's own packets". If you wanted to add packets that didn't exist in PM yet to PM, look at how the Network class does it. Have fun! EDIT: if you want to get ALL the packets in MCPE, you've to delve into MCPE disassembly. Isn't very fun.
I know that they're already in pocketmine\network\protocol but I wanna know how they found those packets. I read before that they're in "libminecraftpe.so" before.
They are in libminecraftpe.so. You've to extract it from the APK and use objdump or some other tool to dump the assembly. Then you've to find the packets in the assembly and reverse engineer what the encode and decode functions are doing.
In addition to the fun of disassembly reverse-engineering, the time that it costs makes me believe that we don't want more than a few people in the community responsible for doing it. Such work just stops all development every time there is an update.