Skip to content

Conversation

@ruViolence
Copy link
Contributor

Summary

Resource packs are registered into a HashSet so ForcePack can quickly look them up per server. Until now, equality only considered the URL/hash-based UUID plus the server name. That makes two entries for the same ZIP indistinguishable, even if one is the default pack list and the other is a pack-format override. As soon as an override reuses a URL already declared in the fallback section, the override entry is discarded during registration, so filtering by pack_format never sees it.

Problem

Admins may reuse the same base packs across all versions and add extra ZIPs only for specific pack formats. Because the fallback and override entries shared URL+hash, the fallback copy was dropped while the “extra” ZIP survived. ForcePack therefore kept only the override-only entries and sent an incomplete set of packs to clients e.g., they received just the new ZIP without the shared base packs.

Example configuration

[servers.survival]
resourcepack.urls = [
    "https://cdn.example.org/base.zip",
    "https://cdn.example.org/mode.zip"
]

[servers.survival.version.75]
resourcepack.urls = [
    "https://cdn.example.org/base.zip",
    "https://cdn.example.org/mode.zip",
    "https://cdn.example.org/mode-75.zip"
]

Solution

Include the pack-format range in ResourcePack.equals/hashCode. Default entries (no version) and version-specific entries are now distinguishable even when the URL/hash is identical. During registration both variants survive, and later filtering searchForValidPacks still prefers overrides because they remain in the set.

@SamB440 SamB440 merged commit fdf4185 into SamB440:master Jan 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants