Correct damage calculation for non-arrow projectiles (#5394)

This commit is contained in:
IvanCraft623
2022-11-07 15:05:53 -05:00
committed by GitHub
parent b3ccf41307
commit a7ac6070dc
2 changed files with 3 additions and 2 deletions

View File

@ -128,7 +128,7 @@ abstract class Projectile extends Entity{
* Returns the amount of damage this projectile will deal to the entity it hits.
*/
public function getResultDamage() : int{
return (int) ceil($this->motion->length() * $this->damage);
return (int) ceil($this->damage);
}
public function saveNBT() : CompoundTag{