Commit Graph

452 Commits

Author SHA1 Message Date
Nassim Jahnke 4fb95581ce
Update copyright headers 2023-01-12 12:45:53 +01:00
Nassim Jahnke 0ae64203f5
Add player versions and sample pipelines to dump 2023-01-10 19:05:54 +01:00
Nassim Jahnke 6095128007
Remove javassist dependency, reduces file size by ~1mb 2022-10-25 17:31:13 +02:00
Nassim Jahnke ed196bdf99
Clean up proxy protocol detector service 2022-08-11 19:04:22 +02:00
_tomcraft b032a868bb
add flamecord warking message (#3079) 2022-08-04 16:19:08 +02:00
_tomcraft 2262681351
Reference command permission to filter root suggestions (/via<tab>) (#3018) 2022-07-13 10:24:14 +02:00
Nassim Jahnke 26af09f2a4
Update unsupported software list 2022-07-05 20:37:19 +02:00
Nassim Jahnke 7ab0c41be6
Fix villager trade offers
Fixes #2919
2022-06-08 10:07:47 +02:00
Nassim Jahnke 1308dcb8dd
No need to queue messages anymore
The client now uses the main registry instead of the level registry
2022-05-23 18:24:32 +02:00
Nassim Jahnke 9aa7f5e879
Fix data stored on join being lost on Bungee
Bungee doesn't resend a join game for old servers, so we will have to keep data stored there across server switches
This likely fixes other issues with chunk data writing after server switches on legacy servers as well
2022-05-19 12:37:04 +02:00
Nassim Jahnke d5a568b3fc
Update copyright header 2022-01-09 22:36:07 +01:00
Nassim Jahnke 2704d70c1f
Update Sponge module to API v8 2022-01-09 18:30:51 +01:00
Nassim Jahnke 25d74632c2
Update Bungee version warning 2021-11-15 11:00:18 +01:00
_tomcraft dfc77b6f84
Update BungeeCord support (#2731)
fixes #2730
2021-11-14 09:44:33 +01:00
MrMicky 8b4a57985b
Remove usage of `sun.misc.Unsafe` in `BungeeViaInjector` (#2698) 2021-10-05 14:20:18 +02:00
Nassim Jahnke 427b0a68d0
Cleanup Bukkit/Sponge injectors 2021-10-01 12:17:55 +02:00
Nassim Jahnke 12e2be40e8
Remove some old todos, don't send empty 1.14->1.15 meta packet 2021-09-22 11:15:36 +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 b81109f512
Semi force packet types in PacketWrapper at creation and transformation 2021-07-31 15:08:45 +02:00
creeper123123321 d14db9396b
Fix idle ticking in proxies (#2631) 2021-07-20 18:57:53 +02:00
kennytv d7966567e7
Lowercase gang 2021-07-07 20:43:27 +02:00
Myles 86278e837a Fix 1.17 BungeeCord support 2021-06-14 19:46:25 +01:00
KennyTV 204a81b0ea
Add 1.17 to legacy api package ProtocolVersion 2021-06-10 10:50:07 +02:00
KennyTV 48436e7caf
Go through the rest of the send usages 2021-06-01 23:27:33 +02:00
KennyTV 37fd69fa86
Make packet send methods use the current thread by default
Defaulting to submitting to the netty event loop caused issues more often than not - this also removes the `currentThread` flag and instead provides new scheduleSend methods so it is always obvious whether the packet is sent immediately.
2021-06-01 10:13:49 +02:00
KennyTV 703978e227
Don't require UserConnection holding class in stored objects 2021-05-26 21:35:28 +02:00
KennyTV 3a1e364d4a
Refactor entity tracking and meta handling
This essentially merges the two approaches to the metadata handling from ViaVersion and ViaBackwards and improves on both designs.

ViaVersion did not track every single entity, but only those needed (at least in theory) and can work with untracked entities' metadata. It had a very simple method overridden by metadata rewriter implementations, directly operating on the full metadata list and manually handling meta index changes as well as item/block/particle id changes.

ViaBackwards on the other hand had to track *every single* entity and threw warnings otherwise - while less prone to errors due to giving obvious warnings in the console, it unnecessarily tracks a lot of entities, and those warnings also annoys users when encountering virtual entity plugins (operating asynchronously and sending update packets while already untracked or not yet tracked). Dedicated MetaHandlers made id changes and filtering a lot easier to read and write. However, the actual metadata list handling and its distribution to handlers was not very well implemented and required a lot of list copying and creation as well as exception throws to cancel individual metadata entries.

This version has MetaFilters built with a Builder containing multiple helper functions, and the entity tracking is properly given its own map, hashed by a Protocol's class, to be easily and generically accessible from anywhere with only a Protocol class from the UserConnection, along with more optimized metadata list iteration. The entity tracking is largely unchanged, keeping ViaVersion's approach to not having to track *all* entities (and being able to handle null types in meta handlers).

All of this is by no means absolutely perfect, but is much less prone to errors than both previous systems and takes a lot less effort to actually write. A last possible change would be to use a primitive int to object map that is built to be concurrency save for the EntityTracker, tho that would have to be chosen carefully.
2021-05-25 15:37:07 +02:00
Juan Cruz Linsalata 096415cf8e
Don't inject if inactive (#2461) 2021-05-02 15:52:07 +02:00
KennyTV ab93e0877c
Rename platform task implementations 2021-04-29 17:46:29 +02:00
KennyTV 96b5051c75
Use primitive long in task methods 2021-04-29 17:31:16 +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 a2b3906c9e
Move bossbar to new legacy package, since it only works on <1.9
The newly created LegacyViaAPI is safe to use, but should hold methods that cannot be universally used on every version
2021-04-28 11:10:16 +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 d4bc31d11e
Always create ProtocolInfo, store mappings as int[] 2021-04-27 10:29:30 +02:00
KennyTV 30d122e7fa
Create some fancy interfaces 2021-04-26 23:01:55 +02:00
KennyTV 49d386063d
Add ProtocolVersion to legacy api 2021-04-26 21:45:27 +02:00
KennyTV deec4b521e
Move some packages and classes around 2021-04-26 21:27:59 +02:00
KennyTV a25a5634de
Change package/imports in classes and build configs 2021-04-26 20:52:34 +02:00
KennyTV a3b1ce817e
Repackage to com.viaversion
This process will be split into multiple commits for git not to choke on.
2021-04-26 20:46:30 +02:00
Juan Cruz Linsalata f18e2b3875
Cancel Bungee packet encoding when closed (#2448) 2021-04-24 18:30:08 +02:00
KennyTV d40ce9fc4a
Minor optimizations in pipeline filling 2021-04-21 11:58:19 +02:00
Mariell Hoversholm 2c884dc241
Feat (Bungee): Use only unsafe field modifications (#2440) 2021-04-17 09:59:24 +02:00
KennyTV d0882cf02c
Update GsonUtil, more javadoc 2021-04-16 23:05:31 +02:00
Jason 87d54f1103
Clean up build scripts using new Gradle features (#2436)
* Make use of `TYPESAFE_PROJECT_ACCESSORS` and `VERSION_CATALOGS` Gradle feature previews to clean up build scripts

* Bump setup-java action to v2, specify AdoptOpenJDK distribution
2021-04-14 14:16:48 +02:00
Mariell Hoversholm 458279d111
Fix (Bungee): Java 16 compatibility (#2433)
This has been tested on the following:
 - AdoptOpenJDK Java 1.8.0_282
 - GraalVM CE 21.0.0 OpenJDK 11.0.10
 - AdoptOpenJDK Java 15.0.2
 - AdoptOpenJDK Java 16 (also tested with BungeeCord b1556)
 - Amazon Corretto OpenJDK 16.0.0.36.1

... with Waterfall b406 on Linux 5.10.28.
2021-04-13 11:42:32 +02:00
KennyTV 7300a69817
Use Paper method to get server protocol version if possible 2021-04-12 20:11:13 +02:00
KennyTV 070c7f5808
Move to checker qual nullability annotations 2021-04-02 14:15:30 +02:00
KennyTV a63f2ab6fe
Improve server version API 2021-03-26 12:51:38 +01:00