I'm new to Forge API, I'm trying to make a mod that only revives a player until x amount, and after that nothing, even if you die. I made a revive part, however when it comes to capability, I have no idea. I saw some tutorials, yet they are too confusing for me, and I'm struggling to get it right. I know you need PlayerClone event to keep the value after death, but do I need playerconnect / playerChangeDimension events? I'm confused over how to save Capabilities , Make it persist, then load it in another file, like my Revive class, or basically confused in everything about Capabilities .
I just need orientations or help to where go from this, as I have no idea. Do I need packets for something this basic? If so, how do I make packets?
https://github.com/snurfe/TestMod/tree/main/CapabilityTest