Open main menu
Home
Random
Log in
Settings
About Stardew Valley Wiki
Disclaimers
Stardew Valley Wiki
Search
Changes
← Older edit
Newer edit →
Modding:Modder Guide/APIs/Harmony
(view source)
Revision as of 20:21, 16 August 2021
36 bytes removed
,
20:21, 16 August 2021
update for SMAPI 3.12 and Harmony 2.0
Line 28:
Line 28:
<li>In your mod's <tt>Entry</tt> method, use Harmony's code API to register patches:
<li>In your mod's <tt>Entry</tt> method, use Harmony's code API to register patches:
<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
−
var harmony =
HarmonyInstance.Create
(this.ModManifest.UniqueID);
+
var harmony =
new Harmony
(this.ModManifest.UniqueID);
// example patch, you'll need to edit this for your patch
// example patch, you'll need to edit this for your patch
Line 36:
Line 36:
);
);
</syntaxhighlight></li>
</syntaxhighlight></li>
−
<li>See the
{{github|pardeike
/
Harmony
/
wiki|Harmony 1
.
2 wiki}} (not 2
.
0!) for
tutorials and documentation.</li>
+
<li>See the
[https:
//
harmony
.
pardeike
.
net/ Harmony
tutorials and documentation
]
.</li>
</ol>
</ol>
Pathoschild
translators
8,447
edits