Topic category: Help with modding (Java Edition)
So, I'm making a clone of the player. I don't know how to copy the player's skin onto the clone, so I've just been using a Steve skin. But that's a topic for later. What I need to know is, how would I do a procedure where it gets the player's health, and divides it in half so that the clone entity is a weaker version of the player. Don't get me wrong, I have variables set up that already detect how much health the player has, and I tested them and they worked, I just need to know how to make the entity get the player's health and divide it for it's own health. I'm assuming this would mean going into the source code and writing lines above or below where the health is listed for the entity? I'm fine with that, as long as you tell me exactly where and how to do it. If you can, thanks so much, this would be great. In my mod, player's can upgrade their health and to have the clone gradually become stronger too is perfect.