diff --git a/src/main/java/net/neoforged/neoforge/client/event/RegisterMaterialAtlasesEvent.java b/src/main/java/net/neoforged/neoforge/client/event/RegisterMaterialAtlasesEvent.java index 4bb279ceb9..9d6f6c68ce 100644 --- a/src/main/java/net/neoforged/neoforge/client/event/RegisterMaterialAtlasesEvent.java +++ b/src/main/java/net/neoforged/neoforge/client/event/RegisterMaterialAtlasesEvent.java @@ -46,7 +46,7 @@ public RegisterMaterialAtlasesEvent(Map atla * @param atlasInfoLocation The location of the atlas info JSON relative to the {@code atlases} directory */ public void register(ResourceLocation atlasLocation, ResourceLocation atlasInfoLocation) { - ResourceLocation oldAtlasInfoLoc = this.atlases.put(atlasLocation, atlasInfoLocation); + ResourceLocation oldAtlasInfoLoc = this.atlases.putIfAbsent(atlasLocation, atlasInfoLocation); if (oldAtlasInfoLoc != null) { throw new IllegalStateException(String.format( "Duplicate registration of atlas: %s (old info: %s, new info: %s)",