summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2014-07-09 16:19:27 -0500
committerTravis Watkins <amaranth@ubuntu.com>2014-07-09 19:00:16 -0500
commitf9e3bf24a8104f070b3fc4d57e7bbd3d7532be75 (patch)
tree7a02ba2ce97283340c45772405a8c15ba3e21fd5 /README.md
parent9b7b142ad0534452325bb997d8d55e8beb4b3d99 (diff)
downloadbukkit-f9e3bf24a8104f070b3fc4d57e7bbd3d7532be75.tar
bukkit-f9e3bf24a8104f070b3fc4d57e7bbd3d7532be75.tar.gz
bukkit-f9e3bf24a8104f070b3fc4d57e7bbd3d7532be75.tar.lz
bukkit-f9e3bf24a8104f070b3fc4d57e7bbd3d7532be75.tar.xz
bukkit-f9e3bf24a8104f070b3fc4d57e7bbd3d7532be75.zip
Recalculate damage modifiers in event for old method. Fixes BUKKIT-5681
When we added the new API in EntityDamageEvent to give control over the various things that modify the final damage done we caused a change in behavior for users of the old #setDamage(double) method. Before changing the damage would happen before the modifiers were calculated so they would be based on the final damage value from the event. Now they are calculated at the beginning so changing the damage does not change the modifiers. To allow the old style and the new to coexist we now expose the vanilla modifer calculations to the event in the form of Function objects. These are used in #setDamage(double) to calculate the difference in the modifier between the old damage and the new and apply this difference to the current modifier. The difference is between the vanilla values for both damage values and is applied on top of the event's modifier value as this should make old and new API usage work together in a way that isn't surprising.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions