From b1eb7b2be13ba2f41e90fade5093fbe07ab4f9bd Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 7 Feb 2024 00:06:13 +1000 Subject: [PATCH] Provide user-visible warning for #466, two patterns with the same signature (this won't catch great patterns that could overlap with regular/each other). --- .../hexcasting/common/casting/PatternRegistryManifest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/PatternRegistryManifest.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/PatternRegistryManifest.java index c15ad6488..66199bfba 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/PatternRegistryManifest.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/PatternRegistryManifest.java @@ -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++; }