-
-
Save anonymous/c8586b87b06684ccc462 to your computer and use it in GitHub Desktop.
Adding Health
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Event_BUS LivingUpdateEvent | |
int extraHP = props.getHealth()+20; | |
double extraSpeed = props.getSpeed(); | |
if(extraHP < 1) | |
player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20); | |
else | |
{ | |
player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(extraHP); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment