3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 00:22:51 +01:00
Datei suchen
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
.github Build script improvements 2021-05-25 09:07:06 +02:00
adventure Build script improvements 2021-05-25 09:07:06 +02:00
api Refactor entity tracking and meta handling 2021-05-25 15:37:07 +02:00
api-legacy Move bossbar to new legacy package, since it only works on <1.9 2021-04-28 11:10:16 +02:00
build-logic Silence doclint 2021-05-25 09:07:06 +02:00
bukkit Don't cast ChannelInitializer type to SocketChannel 2021-05-22 19:41:07 +02:00
bukkit-legacy Refactor entity tracking and meta handling 2021-05-25 15:37:07 +02:00
bungee Refactor entity tracking and meta handling 2021-05-25 15:37:07 +02:00
common Refactor entity tracking and meta handling 2021-05-25 15:37:07 +02:00
fabric Run some optipng (#2482) 2021-05-18 20:46:35 +02:00
gradle 21w20a 2021-05-19 18:54:38 +02:00
java-compat Build script improvements 2021-05-25 09:07:06 +02:00
licenses Split parts of common into api; We are now GPL, api is MIT 2021-03-24 14:02:37 +01:00
sponge Refactor entity tracking and meta handling 2021-05-25 15:37:07 +02:00
sponge-legacy Create some fancy interfaces 2021-04-26 23:01:55 +02:00
universal Make proper sources jar (#2495) 2021-05-25 09:44:57 +02:00
velocity Rename platform task implementations 2021-04-29 17:46:29 +02:00
.gitignore Prepare for 1.0.0 2016-11-13 14:04:56 +00:00
build.gradle.kts Build script improvements 2021-05-25 09:07:06 +02:00
gradle.properties Build script improvements 2021-05-25 09:07:06 +02:00
gradlew Switch to indra, attempt to fix shading and universal jar 2021-02-25 09:19:14 +01:00
gradlew.bat *cries in elephant* 2021-02-25 09:18:51 +01:00
LICENSE Split parts of common into api; We are now GPL, api is MIT 2021-03-24 14:02:37 +01:00
README.md Fix README build command (gradlew) (#2489) 2021-05-22 13:37:53 +02:00
settings.gradle.kts Build script improvements 2021-05-25 09:07:06 +02:00

ViaVersion - Spigot, Sponge, BungeeCord, Velocity

Latest Release Build Status Discord

Allows the connection of higher client versions to lower server versions

Supported Versions:

Table (https://i.imgur.com/uDM9HR8.png)

On Paper you may also use ProtocolSupport, but ensure you have the right build for your server version.

User Docs: https://docs.viaversion.com/display/VIAVERSION/

Sources:

wiki.vg (Used for information regarding packet structure, we also contribute back)

Burger (See PAaaS)

OpenNBT

Releases / Dev Builds:

You can find official releases here:

https://www.spigotmc.org/resources/viaversion.19254/history


You can find official dev builds here:

Jenkins: https://ci.viaversion.com

JavaDocs: https://jd.viaversion.com

Maven Repository:

<repository>
    <id>viaversion-repo</id>
    <url>https://repo.viaversion.com</url>
</repository>

API-artifact:

<dependency>
    <groupId>com.viaversion</groupId>
    <artifactId>viaversion-api</artifactId>
    <version>LATEST</version>
    <scope>provided</scope>
</dependency>

Replace the version depending on your needs.

If you need access to the existing protocol or platform implementations, use the parent artifact viaversion. Please note the differences in licensing.

Building:

After cloning this repository, build the project with Gradle by running ./gradlew build and take the created jar out of the build/libs directory.

License:

The entirety of the API directory (including the legacy API directory) is licensed under the MIT License; see licenses/MIT.md for details.

Everything else, unless explicitly stated otherwise, is licensed under the GNU General Public License, including the end product as a whole; see licenses/GPL.md for details.

Special thanks to all our Contributors.