Skip to content

Commit

Permalink
Provide user-visible warning for FallingColors#466, two patterns with…
Browse files Browse the repository at this point in the history
… the same signature (this won't catch great patterns that could overlap with regular/each other).
  • Loading branch information
Talia-12 committed Feb 6, 2024
1 parent 7ace8b1 commit b1eb7b2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public static void processRegistry(@Nullable ServerLevel overworld) {
continue;

if (!HexUtils.isOfTag(registry, key, HexTags.Actions.PER_WORLD_PATTERN)) {
NORMAL_ACTION_LOOKUP.put(entry.prototype().getAngles(), key);
var old = NORMAL_ACTION_LOOKUP.put(entry.prototype().getAngles(), key);
if (old != null) {
HexAPI.LOGGER.warn("Inserted %s which has same signature as %s, overriding it.".formatted(key, old));
}
} else {
perWorldActionCount++;
}
Expand Down

0 comments on commit b1eb7b2

Please sign in to comment.