[Bug] Remap targeting mod registry entries are silently discarded at load time #1

Closed
opened 2026-03-28 11:43:33 -06:00 by MitakeAmeka · 4 comments
MitakeAmeka commented 2026-03-28 11:43:33 -06:00 (Migrated from github.com)

When configuring a remap from a vanilla id to a mod id (e.g. minecraft:iron_ingot -> create:andesite_alloy), the remap is silently discarded during initialization and never applied.
However, remaps between two vanilla ids work correctly.
I checked latest.log and found the snippet where the problem occurred:

[00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Initializing on Forge 1.20.1
[00:44:16] [modloading-worker-0/INFO]: Create 6.0.8 initializing! Commit hash: 1a1a9a2819b4f89f78caec41b55ed8cb222fa24b
[00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in block registry, skipping remap from 'minecraft:iron_ingot'
[00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in item registry, skipping remap from 'minecraft:iron_ingot'
[00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in fluid registry, skipping remap from 'minecraft:iron_ingot'
[00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in entity_type registry, skipping remap from 'minecraft:iron_ingot'
[00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Loaded 3 remaps across 7 types
[00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Active remap config: RemapConfig{size=3, types=[BLOCK, ITEM, FLUID, ENTITY_TYPE, TAG, RECIPE, LOOT_TABLE]}
[00:44:16] [modloading-worker-0/INFO]: Forge mod loading, version 47.4.18, for MC 1.20.1 with MCP 20230612.114412
[00:44:16] [modloading-worker-0/INFO]: MinecraftForge v47.4.18 Initialized

Taking forge-1.20.1 for example, the mod initializes during the mod construction phase, before any mod registries have been populated.
At this point, ForgePlatformHelper.getAllRegistryIds() queries the game registries, which only contain vanilla entries:

    public static Map<RemapType, Set<String>> getAllRegistryIds() {
        Map<RemapType, Set<String>> result = new EnumMap<>(RemapType.class);

        result.put(RemapType.BLOCK, collectIds(BuiltInRegistries.BLOCK));
        result.put(RemapType.ITEM, collectIds(BuiltInRegistries.ITEM));
        result.put(RemapType.FLUID, collectIds(BuiltInRegistries.FLUID));
        result.put(RemapType.ENTITY_TYPE, collectIds(BuiltInRegistries.ENTITY_TYPE));

        return result;
    }

This map is then passed to RemapLoader.load() , which calls RemapValidator.validateAndFilter() to remove any remap whose target id does not exist in the registry at that moment:

        for (RemapType type : RemapType.registryTypes()) {
            Map<String, String> typeRemaps = remapsByType.get(type);
            if (typeRemaps != null) {
                Set<String> typeKnownIds = knownIds.getOrDefault(type, Set.of());
                RemapValidator.validateAndFilter(typeRemaps, typeKnownIds, type, logger);
            }
        }

Since mod entries have not been registered yet, they are filtered out before being stored.
At last, by the time MappedRegistryMixin.freeze() runs, the remap rules have already been discarded, so nothing is injected.
I should open a tested pull request with minimal changes to the fixes later for this issue.

When configuring a remap from a vanilla id to a mod id (e.g. minecraft:iron_ingot -> create:andesite_alloy), the remap is silently discarded during initialization and never applied. However, remaps between two vanilla ids work correctly. I checked latest.log and found the snippet where the problem occurred: ``` [00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Initializing on Forge 1.20.1 [00:44:16] [modloading-worker-0/INFO]: Create 6.0.8 initializing! Commit hash: 1a1a9a2819b4f89f78caec41b55ed8cb222fa24b [00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in block registry, skipping remap from 'minecraft:iron_ingot' [00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in item registry, skipping remap from 'minecraft:iron_ingot' [00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in fluid registry, skipping remap from 'minecraft:iron_ingot' [00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in entity_type registry, skipping remap from 'minecraft:iron_ingot' [00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Loaded 3 remaps across 7 types [00:44:16] [modloading-worker-0/INFO]: [RemapIDs] Active remap config: RemapConfig{size=3, types=[BLOCK, ITEM, FLUID, ENTITY_TYPE, TAG, RECIPE, LOOT_TABLE]} [00:44:16] [modloading-worker-0/INFO]: Forge mod loading, version 47.4.18, for MC 1.20.1 with MCP 20230612.114412 [00:44:16] [modloading-worker-0/INFO]: MinecraftForge v47.4.18 Initialized ``` Taking forge-1.20.1 for example, the mod initializes during the mod construction phase, before any mod registries have been populated. At this point, ForgePlatformHelper.getAllRegistryIds() queries the game registries, which only contain vanilla entries: ``` public static Map<RemapType, Set<String>> getAllRegistryIds() { Map<RemapType, Set<String>> result = new EnumMap<>(RemapType.class); result.put(RemapType.BLOCK, collectIds(BuiltInRegistries.BLOCK)); result.put(RemapType.ITEM, collectIds(BuiltInRegistries.ITEM)); result.put(RemapType.FLUID, collectIds(BuiltInRegistries.FLUID)); result.put(RemapType.ENTITY_TYPE, collectIds(BuiltInRegistries.ENTITY_TYPE)); return result; } ``` This map is then passed to RemapLoader.load() , which calls RemapValidator.validateAndFilter() to remove any remap whose target id does not exist in the registry at that moment: ``` for (RemapType type : RemapType.registryTypes()) { Map<String, String> typeRemaps = remapsByType.get(type); if (typeRemaps != null) { Set<String> typeKnownIds = knownIds.getOrDefault(type, Set.of()); RemapValidator.validateAndFilter(typeRemaps, typeKnownIds, type, logger); } } ``` Since mod entries have not been registered yet, they are filtered out before being stored. At last, by the time MappedRegistryMixin.freeze() runs, the remap rules have already been discarded, so nothing is injected. I should open a tested pull request with minimal changes to the fixes later for this issue.
MitakeAmeka commented 2026-03-31 10:10:35 -06:00 (Migrated from github.com)

Hi, I tried the latest version (1.2.0) and this issue seems to be not fixed. This is the json file:

{
  "remaps": [
    {
      "source": "minecraft:iron_ingot",
      "target": "create:andesite_alloy",
      "types": ["item"]
    }
  ]
}

And this is the latest.log:

[00:03:01] [modloading-worker-0/INFO]: [RemapIDs] Initializing on Forge 1.20.1
[00:03:01] [modloading-worker-0/INFO]: Create 6.0.8 initializing! Commit hash: 1a1a9a2819b4f89f78caec41b55ed8cb222fa24b
[00:03:01] [modloading-worker-0/INFO]: Forge mod loading, version 47.4.18, for MC 1.20.1 with MCP 20230612.114412
[00:03:01] [modloading-worker-0/INFO]: MinecraftForge v47.4.18 Initialized
[00:03:02] [Render thread/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in item registry, skipping remap from 'minecraft:iron_ingot'
[00:03:02] [Render thread/INFO]: [RemapIDs] Loaded 0 remaps across 1 types

Since I have to go to work tomorrow, right now I don't have time to check the changes of the code so I can only provide a quick report. Could you try to review this issue again? Thank you!

Hi, I tried the latest version (1.2.0) and this issue seems to be not fixed. This is the json file: ``` { "remaps": [ { "source": "minecraft:iron_ingot", "target": "create:andesite_alloy", "types": ["item"] } ] } ``` And this is the latest.log: ``` [00:03:01] [modloading-worker-0/INFO]: [RemapIDs] Initializing on Forge 1.20.1 [00:03:01] [modloading-worker-0/INFO]: Create 6.0.8 initializing! Commit hash: 1a1a9a2819b4f89f78caec41b55ed8cb222fa24b [00:03:01] [modloading-worker-0/INFO]: Forge mod loading, version 47.4.18, for MC 1.20.1 with MCP 20230612.114412 [00:03:01] [modloading-worker-0/INFO]: MinecraftForge v47.4.18 Initialized [00:03:02] [Render thread/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in item registry, skipping remap from 'minecraft:iron_ingot' [00:03:02] [Render thread/INFO]: [RemapIDs] Loaded 0 remaps across 1 types ``` Since I have to go to work tomorrow, right now I don't have time to check the changes of the code so I can only provide a quick report. Could you try to review this issue again? Thank you!
MitakeAmeka commented 2026-03-31 10:57:22 -06:00 (Migrated from github.com)

I also noticed something is moved to render thread, just a quick reminder it may be influence the server (I don't know, need to check the source code)

I also noticed something is moved to render thread, just a quick reminder it may be influence the server (I don't know, need to check the source code)
MitakeAmeka commented 2026-04-02 08:15:34 -06:00 (Migrated from github.com)

Hi, it seems that for 1.2.1 this issue remains, and the latest.log is the same as above.

[22:12:16] [modloading-worker-0/INFO]: [RemapIDs] Initializing on Forge 1.20.1
[22:12:16] [modloading-worker-0/INFO]: Create 6.0.8 initializing! Commit hash: 1a1a9a2819b4f89f78caec41b55ed8cb222fa24b
[22:12:16] [modloading-worker-0/INFO]: Forge mod loading, version 47.4.18, for MC 1.20.1 with MCP 20230612.114412
[22:12:16] [modloading-worker-0/INFO]: MinecraftForge v47.4.18 Initialized
[22:12:18] [Render thread/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in item registry, skipping remap from 'minecraft:iron_ingot'
[22:12:18] [Render thread/INFO]: [RemapIDs] Loaded 0 remaps across 1 types
Hi, it seems that for 1.2.1 this issue remains, and the latest.log is the same as above. ``` [22:12:16] [modloading-worker-0/INFO]: [RemapIDs] Initializing on Forge 1.20.1 [22:12:16] [modloading-worker-0/INFO]: Create 6.0.8 initializing! Commit hash: 1a1a9a2819b4f89f78caec41b55ed8cb222fa24b [22:12:16] [modloading-worker-0/INFO]: Forge mod loading, version 47.4.18, for MC 1.20.1 with MCP 20230612.114412 [22:12:16] [modloading-worker-0/INFO]: MinecraftForge v47.4.18 Initialized [22:12:18] [Render thread/INFO]: [RemapIDs] Remap target 'create:andesite_alloy' not found in item registry, skipping remap from 'minecraft:iron_ingot' [22:12:18] [Render thread/INFO]: [RemapIDs] Loaded 0 remaps across 1 types ```
MitakeAmeka commented 2026-04-03 07:36:10 -06:00 (Migrated from github.com)

Seems to be fixed in 1.3.0. Thanks!

Seems to be fixed in 1.3.0. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TysonTheEmber/RemapIDs#1
No description provided.