Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

Latest commit

 

History

History
64 lines (47 loc) · 2.78 KB

README.md

File metadata and controls

64 lines (47 loc) · 2.78 KB

Multi Azalea

This library is created to support multiple versions of azalea using the power of cargo features.

How to use

Just add the following line in your Cargo.toml

[dependencies]
azalea = { package = "multi-azalea", git = "https://github.com/as1100k/aether.git", feature = "git", default_features = false }

For using any other feature other than git default_features = false is required.

Supported Azalea Version

When creating this plugin, my aim was to support multiple versions of azalea which are supported with the help of cargo features.

Feature Supported Version
git (default) main branch
crates_io 0.9.1 version on crates.io
git_1_20_6 1.20.6 branch of azalea

It is recommended to use the bleeding-edge version of azalea (tracking main branch) or 1.20.6 branch as these are somewhat stable versions and since you are using zenith proxy, that uses ViaProxy behind the scenes you can connect to any server of any backward version.

Warning

main branch of azalea can introduce breaking changes especially in upgrading minecraft version.

Best Practices

  1. If you want to use your own fork, set up your Cargo.toml in the following way:

    [dependencies]
    azalea = { git = "https://github.com/azalea-rs/azalea.git", branch = "1.20.6" }
    
    # for more information see: https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#overriding-repository-url
    [path."https://github.com/azalea-rs/azalea"]
    azalea = { git = "https://github.com/as1100k-forks/azalea.git", branch = "better-1.20.6" }

    This way you can use your fork with plugins/dependency that are on git version of azalea.

Note

Using patch will only make you use your fork on your library and plugin/library will still be using whatever version of azalea they are using.

  1. If you are building a library/plugin and want to support multiple versions of azalea, then you should set up your Cargo.toml in the following way:

    let's assume that you want to support main branch and 1.20.6 branch.

    [features]
    default = ["git"]
    git = ["azalea/git"]
    git_1_20_6 = ["azalea/git_1_20_6"]
    
    [dependencies]
    azalea = { package = "multi-azalea", git = "https://github.com/as1100k/aether.git", default_features = false }

    Now, it's upto the user which version they want to use.