Botania

Botania

133M Downloads

[internal suggestion] Migrate to ObjectHolder annotations instead of holding references in ModBlocks

quat1024 opened this issue ยท 2 comments

commented

My mod Botania Tweaks uses registry replacements to change the blocks the terrasteel agglomeration plate and mana fluxfield point to. Unfortunately, Botania holds references to its blocks in ModBlocks.class and uses them in a bunch of places; when I registry replace these blocks, the references get stale, causing weird issues such as quat1024/BotaniaTweaks#7 .

If Botania used ObjectHolder annotations, it would be great for me and other third parties who want to replace Botania's blocks and items. Currently I have to sneak through before preinit, manually classload ModBlocks, and fix up the block references to point to my blocks. ObjectHolders get processed after other mods have the chance to registry replace, though, so it would be painless.

This would mean things such as the registration of the multiblock structures would have to get moved later than preinit; I'm not super familiar with Botania's layout so that might cause fun to debug problems?

commented

yeah sure, i'll do this in 1.13

don't want to do this on 1.12 since I already pre-flattened a bunch of things on a branch and the merge conflicts would be annoying

commented

This issue is stale because it has been open for a while with no activity. Remove stale label or comment or this will be closed soon.