Add API method for registering recipes at proper time
The old access to IBloodMagicRecipeRegistrar still exists, but should not be used so mods like CraftTweaker can do their thing. This commit also introduces @BloodMagicPlugin.Inject which will inject the active API instance into an annotated field with the API interface as it's type. These fields are populated during pre init.
This commit is contained in:
parent
395f1188e7
commit
91d7f23b4f
7 changed files with 125 additions and 18 deletions
|
@ -73,6 +73,7 @@ public class BloodMagic {
|
|||
configDir = new File(event.getModConfigurationDirectory(), "bloodmagic");
|
||||
|
||||
PLUGINS.addAll(PluginUtil.gatherPlugins(event.getAsmData()));
|
||||
PluginUtil.injectAPIInstances(PluginUtil.gatherInjections(event.getAsmData()));
|
||||
|
||||
ModTranquilityHandlers.init();
|
||||
ModDungeons.init();
|
||||
|
@ -84,7 +85,7 @@ public class BloodMagic {
|
|||
public void init(FMLInitializationEvent event) {
|
||||
BloodMagicPacketHandler.init();
|
||||
|
||||
PluginUtil.registerPlugins(PLUGINS);
|
||||
PluginUtil.handlePluginStep(PluginUtil.RegistrationStep.PLUGIN_REGISTER);
|
||||
|
||||
ModRecipes.init();
|
||||
ModRituals.initRituals();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue