Skip to content

Commit

Permalink
Formatting and remove unneeded floatval
Browse files Browse the repository at this point in the history
  • Loading branch information
diamond-gold committed Jun 29, 2022
1 parent c516f73 commit fe49ad3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MiniBosses/Boss.php
Expand Up @@ -84,7 +84,7 @@ class Boss extends Living
public string $displayHealth;
public bool $movesByJumping;
public int $despawnAfter;
/** @var int[] */
/** @var int[] */
public array $projectileDelay = [];

const PROJECTILE_OPTIONS_TYPE = [
Expand Down Expand Up @@ -271,7 +271,7 @@ private function parseData(array $data, bool $validateMinions = true)
throw new Exception("Projectile $id: Unknown projectile entity type " . $projectileOptions["networkId"]);
}
if ($projectileOptions["networkId"] === EntityIds::PLAYER) {
throw new Exception("Projectile $id: ". EntityIds::PLAYER . " is not a valid projectile entity type, please use other entity");
throw new Exception("Projectile $id: " . EntityIds::PLAYER . " is not a valid projectile entity type, please use other entity");
}
} elseif (empty($projectileOptions["particle"])) {
$this->log(LogLevel::WARNING, "Projectile $id is completely invisible");
Expand Down Expand Up @@ -666,7 +666,7 @@ public function spawnMinion(int $id, array $option): ?Boss
public function attack(EntityDamageEvent $source): void
{
if (isset($this->hurtModifiers[$source->getCause()])) {
$source->setBaseDamage($source->getBaseDamage() * floatval($this->hurtModifiers[$source->getCause()]));
$source->setBaseDamage($source->getBaseDamage() * $this->hurtModifiers[$source->getCause()]);
}
parent::attack($source);
if (!$source->isCancelled() && $source instanceof EntityDamageByEntityEvent) {
Expand Down

0 comments on commit fe49ad3

Please sign in to comment.