Skip to content

Commit

Permalink
Improve the error when you try to sync the same registry instance (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
strubium authored Oct 17, 2024
1 parent b570c8e commit 76a8cd4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ void sync(ResourceLocation name, ForgeRegistry<V> from)
if (DEBUG)
FMLLog.log.debug("Registry {} Sync: {} -> {}", this.superType.getSimpleName(), this.stage.getName(), from.stage.getName());
if (this == from)
throw new IllegalArgumentException("WTF We are the same!?!?!");
throw new IllegalArgumentException("Attempted to sync the same registry instance!");
if (from.superType != this.superType)
throw new IllegalArgumentException("Attempted to copy to incompatible registry: " + name + " " + from.superType + " -> " + this.superType);

Expand Down

0 comments on commit 76a8cd4

Please sign in to comment.