Jump to content

Attaching attribute to player


Recommended Posts

1 hour ago, MadAlchemist said:

Found it, in jakecool19's mod "Lands of Chaos", which has more complex version of feature I want. It uses harmony, and I didn't fully understood how it works (I know java enough to mod minecraft, but  new to C#). Are there some tutorials or examples of simple way to use it?

To store a value in an entity, you just need WatchedAttributes. If you need behavior, make a custom EntityBehavior and patch the player entity json. You can look at PlayerCorpse for an example: behaviorpatch.

All tutorials are on the wiki, but if it is possible not to use harmony, it is best not to use it. It makes the mod very fragile and sensitive to game updates (especially transpilers).

Link to comment
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.