Standardize explosion radius terminology

closes #5061
This commit is contained in:
Dylan K. Taylor
2022-12-15 22:43:36 +00:00
parent ba4d038972
commit 3d75094874
3 changed files with 15 additions and 15 deletions

View File

@ -42,23 +42,23 @@ class EntityPreExplodeEvent extends EntityEvent implements Cancellable{
public function __construct(
Entity $entity,
protected float $force
protected float $radius
){
if($force <= 0){
if($radius <= 0){
throw new \InvalidArgumentException("Explosion radius must be positive");
}
$this->entity = $entity;
}
public function getForce() : float{
return $this->force;
public function getRadius() : float{
return $this->radius;
}
public function setForce(float $force) : void{
if($force <= 0){
public function setRadius(float $radius) : void{
if($radius <= 0){
throw new \InvalidArgumentException("Explosion radius must be positive");
}
$this->force = $force;
$this->radius = $radius;
}
public function isBlockBreaking() : bool{