Commit Graph

33 Commits

Author SHA1 Message Date
Nassim Jahnke 4e844a0095
Small startup time improvements 2023-03-16 12:48:39 +01:00
Nassim Jahnke 7c9c602cec
Support Folia (leaf's region threaded Paper fork) 2023-03-10 12:20:02 +01:00
Nassim Jahnke 3ced95903a
Cache identifiers files 2023-03-05 15:20:16 +01:00
Nassim Jahnke 51d4e11b5f
Minimize/optimize mapping data files 2023-03-04 00:08:08 +01:00
Nassim Jahnke bf4e4d771f
Uncap mapping loader executor pool, less logging 2023-02-20 17:30:56 +01:00
Nassim Jahnke cb2165eb93
Greatly reduce the number of (anonymous) inner classes
Reduces code complexity, and much more importantly, reduces the number of classes loaded at runtime by *hundreds*
2023-02-12 11:46:48 +01:00
Nassim Jahnke 50adff90f2
23w03a 2023-01-18 16:49:05 +01:00
Nassim Jahnke 4fb95581ce
Update copyright headers 2023-01-12 12:45:53 +01:00
Nassim Jahnke 14b11bdd10
Start working on 22w42a 2022-10-19 21:58:08 +02:00
Nassim Jahnke e194d27bea
Allow for more control over max path distance delta increase 2022-07-28 11:29:02 +02:00
Nassim Jahnke e3e85db02a
1.19.1-pre1 2022-06-21 21:01:24 +02:00
Nassim Jahnke 365b3a8a38
22w11a 2022-03-16 19:48:17 +01:00
Nassim Jahnke a12dfa405f
1.19 Experimental Snapshot 1 2022-03-16 18:21:41 +01:00
Nassim Jahnke 60eda447b4
22w03a 2022-01-19 18:05:36 +01:00
Nassim Jahnke d5a568b3fc
Update copyright header 2022-01-09 22:36:07 +01:00
Nassim Jahnke b4301adb3b
WIP 21w37a 2021-09-15 23:00:14 +02:00
Nassim Jahnke 32a84f24ef
Nicer getters in Pair and Triple 2021-09-14 11:13:39 +02:00
Nassim Jahnke f2147179c2
Small fixes, add majorVersion method, nicer getter names in some classes
None of the deprecated methods will be removed anytime soon.
2021-08-28 22:15:28 +02:00
kennytv 2094397bca
Allow bypassing of packet type restriction in Protocol, amend packet creator 2021-08-01 12:05:04 +02:00
kennytv b81109f512
Semi force packet types in PacketWrapper at creation and transformation 2021-07-31 15:08:45 +02:00
kennytv 874dbafe26
More packet sending API
Allows for easy packet sending from a specific version to or from any client version supported by Via.
For example, you can send packets in the 1.17.1 format to both client and server, and it will be transformed accordingly if executed on another server version or sent to a different client version.
2021-07-30 12:26:15 +02:00
KennyTV d32a4541a9
1.17.1-pre1 2021-06-20 16:16:07 +02:00
KennyTV 24efb48004
Add method to load extra tags from diff files 2021-06-06 17:17:51 +02:00
KennyTV fc1450fe38
Slightly more OOP, move registerPackets out of Protocol constructor
registerPackets being called within the constructor made it impossible to create instance objects then used in registerPackets (vs. having to then create the objects in registerPackets).
2021-06-03 17:28:02 +02:00
KennyTV 104fa4e29f
Optimize protocol path finding
Not perfect, but better. This prevents the path checks from exponentially increasing (if it weren't for the maxProtocolPathSize fail safe).

By default, a path will never go to a protocol version that puts it farther from the desired server protocol version, even if a path existed.
Otherwise as well as previously, *all* possible paths will be checked until a fitting one is found.

Negative examples if the new boolean is set to true:
    A possible path from 3 to 5 in order of 3->10->5 will be dismissed.
    A possible path from 5 to 3 in order of 5->0->3 will be dismissed.

Negative examples if set to false:
    While searching for a path from 3 to 5, 3->2->1 could be checked first before 3->4->5 is found.
    While searching for a path from 5 to 3, 5->6->7 could be checked first before 5->4->3 is found.

Assuming custom platforms like Bedrock protocol use the normal registering methods, they will have to change the boolean to false to revert to previous behavior (tho still somewhat better optimized).
2021-06-01 18:54:36 +02:00
KennyTV 3618914ce9
Add method to get Protocol by supported versions, some cleanup 2021-05-29 22:21:29 +02:00
KennyTV 1538ff5201
Expand unsupported software checks 2021-05-14 16:59:12 +02:00
KennyTV cad358322d
Rename outgoing->clientbound, incoming->serverbound
Via can both be used on servers and clients, making a direction like "incoming" ambiguous
2021-04-28 16:30:34 +02:00
KennyTV cadb5ec64c
Rename abstract Protocol to AbstractProtocol
This prevents confusion around the previously equally named interface and abstract class
2021-04-27 18:21:51 +02:00
KennyTV f1c8d271b1
Reformat imports
The package rename wasn't done through refactoring but through simple replaces to not make git choke on diffs
2021-04-27 13:42:36 +02:00
KennyTV 318c49cf30
More interfaces, keep ProtocolRegistry.SERVER_PROTOCOL legacy api 2021-04-27 13:25:18 +02:00
KennyTV 30d122e7fa
Create some fancy interfaces 2021-04-26 23:01:55 +02:00
KennyTV deec4b521e
Move some packages and classes around 2021-04-26 21:27:59 +02:00