Posted September 6, 20178 yr I've already tried getting currentHealth and nbt health but they're the same so damageDealt is 0. float currentHealth = entity.getHealth(); NBTTagCompound tagCompound = new NBTTagCompound(); entity.writeToNBT(tagCompound); float entityHealth = tagCompound.getFloat("Health"); float damageDealth = entityHealth - currentHealth;
September 6, 20178 yr The damage hasn't been calculated when AttackEntityEvent is fired, use LivingHurtEvent instead. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.