Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tgwaste committed Feb 16, 2022
1 parent c21f825 commit 076886a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/tgwaste/Mobs/Coords.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function getSaferSpawn(Vector3 $start, World $world, int $radius) : Vecto
public function getRandomDestination(MobsEntity $entity) : Vector3 {
$pos = $this->getEnemyDestination($entity);

//if ($pos->x or $pos->y or $pos->z) {
if (!$pos->equals(new Vector3(0, 0, 0))) {
return $pos;
}
Expand Down Expand Up @@ -83,17 +82,13 @@ public function getEnemyDestination(MobsEntity $entity) : Vector3 {
}

foreach ($entity->getWorld()->getNearbyEntities($entity->getBoundingBox()->expandedCopy(15, 15, 15)) as $e) {
if (!method_exists($e, "getName")) {
continue;
}

if ($e instanceof Player and $e->isAlive() and $e->isCreative() == false) {
$entity->setTargetEntity($e);
$pos = $e->getPosition();
return new Vector3($pos->x, 0, $pos->z);
}

if ($e->getName() === $entity->mortalEnemy()) {
if (($e instanceof Player or $e instanceof MobsEntity) and $e->getName() === $entity->mortalEnemy()) {
$entity->setTargetEntity($e);
$entity->setMovementSpeed(2.00);
$pos = $e->getPosition();
Expand Down

2 comments on commit 076886a

@Ifera
Copy link

@Ifera Ifera commented on 076886a Feb 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear @tgwaste,

I regret to inform you that your plugin "Mobs" (v1.1.0 submitted on 2022-02-16T19:07:51.000Z) has been rejected.

D6 — Pick a license carefully:

All plugins released on Poggit must be under an open source license as defined by OSI. Licenses must be included in a LICENSE file on the repository.

Please resolve these issues and submit the plugin again.

This comment is posted here because this is the last commit when the released build was created.

@tgwaste
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LICENSE added and resubmitted plugin for review

Please sign in to comment.