mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
armor rewrite
This commit is contained in:
parent
45b36cb034
commit
bae0d4618e
34 changed files with 143 additions and 67 deletions
|
|
@ -32,10 +32,10 @@ class Explosion{
|
|||
$server = ServerAPI::request();
|
||||
if(!Explosion::$enableExplosions){ /*Disable Explosions*/
|
||||
foreach($server->api->entity->getRadius($this->source, $radius) as $entity){
|
||||
$impact = (1 - $this->source->distance($entity) / $radius) * 0.5; //pla>
|
||||
$damage = (int) (($impact * $impact + $impact) * 8 * $this->size + 1);
|
||||
$entity->harm($damage, "explosion");
|
||||
}
|
||||
$impact = (1 - $this->source->distance($entity) / $radius) * 0.5; //pla>
|
||||
$damage = (int) (($impact * $impact + $impact) * 8 * $this->size + 1);
|
||||
$entity->harm($damage, "explosion");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if($this->size < 0.1 or $server->api->dhandle("entity.explosion", [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue