Posted August 14, 20169 yr So I'm making an item in my mod with 2 parts that may be changeable according to the item's NBT, I made a custom model for this item with a custom model loader and all, but I am facing a problem. I'm trying to make all possible models from those 2 parts, it would be no problem for my mod's parts to use ModelBakety.registerItemVariants and iterate through all possible combinations. However, the problem comes if I ever want another mod to register its own variants that may include my mods parts and other mods' custom ones. Since the models get loaded between preInit and init, no one can guarantee which mod's code runs first in preInit, and what variants to what parts can be registered in a certain mod's preInit, or if even my item was already initialized to register the variants (I may note that my items initialize in a static constructor of my items container but registered later on, which might suggest that they are always initialized when called). Can I in anyway get over such problems? Is there a way to make some code run before the loading but after preInit? and if not, would these problems be solved if I create a registry for those parts, where mods must register their custom ones, then register all variants whether my mod was already pre-initialized or not? The latter idea will cause variants overlapping if that's a problem.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.