diff options
author | ST-DDT <ST-DDT@gmx.de> | 2013-05-05 17:54:41 +0300 |
---|---|---|
committer | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-06-13 16:53:35 -0600 |
commit | 93c0d7e6b55d5393794decfbf5c6367c80c2ab12 (patch) | |
tree | e098076741c22d10f423eba9a759749d978c21a4 /pom.xml | |
parent | 045121d095bacebc92db8901d96c6dc48b4b4d8a (diff) | |
download | craftbukkit-93c0d7e6b55d5393794decfbf5c6367c80c2ab12.tar craftbukkit-93c0d7e6b55d5393794decfbf5c6367c80c2ab12.tar.gz craftbukkit-93c0d7e6b55d5393794decfbf5c6367c80c2ab12.tar.lz craftbukkit-93c0d7e6b55d5393794decfbf5c6367c80c2ab12.tar.xz craftbukkit-93c0d7e6b55d5393794decfbf5c6367c80c2ab12.zip |
Fix negative damage from Zombies. Fixes BUKKIT-4193
Currently, the method used for calculating the damage of zombies is scaled
to their health, but it uses the default max health rather than the real
max health value. If zombies have more health than the default max health
value, the amount of damage they deal becomes negative.
This is caused by EntityZombie.getMaxHealth() returning a hardcoded value of
20, which is the vanilla max health for zombies. Rather than using this value
when calculating zombie damage, the call is changed to instead use
((CraftLivingEntity) this.bukkitEntity).getMaxHealth(). This uses the true
maximum health of the Entity. "this.maxHealth" could be used instead of the
aforementioned method, however that creates a very unclear diff, and a
confusing change.
Diffstat (limited to 'pom.xml')
0 files changed, 0 insertions, 0 deletions