Skip to content

Instantly share code, notes, and snippets.

/.Java Secret

Created January 24, 2016 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c8586b87b06684ccc462 to your computer and use it in GitHub Desktop.
Save anonymous/c8586b87b06684ccc462 to your computer and use it in GitHub Desktop.
Adding Health
// 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