in the current version of delivery the DeliveryPacketVault functions like this:
It stores all DeliveryPacket's which were registered by the developer in an ArrayList and takes the index of this list as the id of the DeliveryPacket. So currently, there is no way to interfere with the id and mess something up but this means also that the id can not be manually set.
It might be a better plan to actually have a HashMap instead of the list a which holds the id's and the DeliveryPacket. If it would be changed to a HashMapthere has to be some algorithm which automatically gives the DeliveryPacket an id. Problem is that the id of the DeliveryPacket has to be the same on the server and client. Otherwise, there will be a with recognizing the DeliveryPacket.
Maybe it is an idea to send a 'simplePacketName' at the beginning of the DeliveryPacket which will be broken down from the real class name? Then there won't be the problem with the id 😏
in the current version of delivery the
DeliveryPacketVaultfunctions like this:It might be a better plan to actually have a
HashMapinstead of the list a which holds theid's and theDeliveryPacket. If it would be changed to aHashMapthere has to be some algorithm which automatically gives theDeliveryPacketanid. Problem is that theidof theDeliveryPackethas to be the same on the server and client. Otherwise, there will be a with recognizing theDeliveryPacket.Maybe it is an idea to send a 'simplePacketName' at the beginning of the
DeliveryPacketwhich will be broken down from the real class name? Then there won't be the problem with theid😏