Skip to content

Client-server mod mismatch causes random non-great spells to be tagged as great #1022

@Robotgiggle

Description

@Robotgiggle

Minecraft version

1.20.1

Hex Casting version

0.11.3

Issue description

If a mod that affects the action registry (ie adds new patterns) is present only on the client or server rather than both, it will cause a registry mismatch between the client and the server. Unlike a mismatch in a vanilla registry like blocks, this is not a big enough problem to force a disconnect, so the client is able to successfully join a server with their action registry in a bugged state. Since the method used to check if a given pattern is in a given tag relies on the registry, tag checks will start behaving inconsistently.

Most notably, this can cause non-great patterns to be treated as though they're in the hexcasting:per_world_pattern tag, causing their stroke order to be hidden in the guidebook and causing ancient scrolls to be generated for them. This last bit is particularly problematic, since scrolls generated for spells that are not actually great will be unable to find and load a per-world stroke order - but this problem is really just a symptom of the larger issue.

Steps to reproduce

  • Install the hexxy4 modpack on both client and server (the issue only seems to happen when there's lots of things registered)
  • Remove Caduceus from only the client (useful for testing since it adds a bunch of patterns but doesn't touch any other registries)
  • Join the server
  • Use the autofill from /hexcasting perWorldPatterns give to list great spells, or check the creative scroll tab
  • Observe that the set of great spells is not correct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions