Skip to content

Latest commit

 

History

History
executable file
·
16 lines (9 loc) · 607 Bytes

COREMOD.md

File metadata and controls

executable file
·
16 lines (9 loc) · 607 Bytes

Using ModPatcher in your CoreMod

Add the following annotation to your IFMLLoadingPlugin.

@IFMLLoadingPlugin.SortingIndex(1001) // Magic value, after deobf transformer.

Change your IFMLLoadingPlugin's getSetupClass(data) method to:

return org.minimallycorrect.modpatcher.api.ModPatcher.getSetupClass()

Load your patch files with ModPatcher in your IFMLLoadingPlugin's injectData method. For example:

ModPatcher.addPatchesFromInputStream(MyClass.class.getResourceAsStream("/modpatcher.xml"));

See the example coremod for more detail.