Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi resourcepack #259

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Multi resourcepack #259

wants to merge 6 commits into from

Conversation

jimchen5209
Copy link
Member

Changes (TBD)

實做 1.20.3 以上的多重伺服器資源包功能,以減少資源包開發成本(一個基底變更將不需套用到所有資源包)。
派送資源包邏輯將不同,同時也改動設定檔。
改動如下:

  • 新增設定: config/resoruce_packs.json
    在此統一管理資源包,以 Key-Value 的方式設定,Value 為資源包的 url。
    和之前一樣,伺服器會依據 Url 自動計算 hash 與 UUID。
    範例如下:
    {
      "base": "https://path/to/base.zip",
      "lobby": "https://path/to/lobby.zip"
    }
  • 更改設定: config/galaxies/*.json
    移除原 ResourcePack 選項,更改為 ResourcePacks,型態改為陣列,並依照 config/resoruce_packs.json 定義之資源包 Key 依序套用。
    清單中,第一個資源包會最先套用,接著套用第二個資源包,依此類推,若出現重複的資源包 Key,則以第一個出現的位置為主。

    需注意此設定如果套用在 1.20.2(含)以下的 Minecraft 版本,根據 Velocity API 設計應該只有最後一個資源包會被套用。

    "ResourcePacks": ["base", "lobby"],

範例

config/resoruce_packs.json 定義之資源包如下

  • base
    base 資源包
  • lobby
    lobby 資源包

config/galaxies/lobby.json 中,設定的 ResourcePacks

"ResourcePacks": ["base", "lobby"],

則最終套用之伺服器資源包與順序如下:
圖片

@james58899 james58899 force-pushed the multi-resourcepack branch 3 times, most recently from 141e1f8 to 1c39763 Compare November 10, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants