Block Swap

Block Swap

4M Downloads

[Crash]: 'not a valid id in registry' on fabric 1.19.2/1.20.1 (load order dependent?)

calliecameron opened this issue ยท 1 comments

commented

Minecraft Version

1.19.2 and 1.20.1

Block Swap Version

2.0.0.1 on 1.19.2, also affects 5.0.0.0 on 1.20.1

Mod Loader

Fabric

Mod Loader Version

0.16.10

What happened?

Trying to use missing_block_ids.json5 to replace a block with a block from a mod loaded after blockswap makes the server crash at startup. Fabric seems to load mods in alphabetical order - and the order can't be changed - so this means blocks from mods that sort after 'blockswap' can't be used.

In the attached log, I'm trying to replace a block from vanilla with a block from swampier_swamps, but when blockswap loads and dumps the registry, swampier_swamps hasn't been loaded yet, its blocks aren't in the registry, and the server crashes.

A possible workaround might be to rebuild the blockswap jar locally with a 'z' at the start of the mod ID, to force it to load last, but I haven't tried it.

latest.log

https://pastebin.com/KCmeMfhv

commented

Confirmed that changing the mod ID to 'zblockswap' works - fabric loads it last. But using a custom version depending on fabric's undocumented load order feels very fragile - especially when fabric doesn't provide any load-order-management tools to the user.

Is there a way to make the config load lazily, so it isn't load-order dependent? Or to initially load the replacement blocks as strings, and only later look them up in the registry?