Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

ForgeInitializer.onForgeInitialize should return the Forge Mod instance #53

Open
rikka0w0 opened this issue Jun 26, 2020 · 0 comments
Open

Comments

@rikka0w0
Copy link

rikka0w0 commented Jun 26, 2020

The Forge ModContainer has a function Object ModContainer.getMod() which returns the instance of the forge mod class (annotated by @Mod()), this feature is widely used. However, in current version of Patchwork, we don't have any method to get that instance.

We should make net/patchworkmc/api/ForgeInitializer.onForgeInitialize return that instance: Changing void onForgeInitialize(); to Object onForgeInitialize().

This feature is required by Patchwork-API PR: PatchworkMC/patchwork-api#87

The Patchwork-API dispatcher needs to call this method to store the mod instance:
https://github.com/rikka0w0/patchwork-api/blob/1e18e1218c9030f3a903b088c67e66f5dbbf0829/patchwork-fml/src/main/java/net/minecraftforge/fml/javafmlmod/FMLModContainer.java#L62

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant