diff --git a/src/entity/ai/tasks/TaskAttackPlayer.php b/src/entity/ai/tasks/TaskAttackPlayer.php index cc8a4bc6..bdea62c8 100644 --- a/src/entity/ai/tasks/TaskAttackPlayer.php +++ b/src/entity/ai/tasks/TaskAttackPlayer.php @@ -29,7 +29,8 @@ class TaskAttackPlayer extends TaskBase $ai->mobController->setLookPosition($ai->entity->target->x, $ai->entity->target->y + 0.12, $ai->entity->target->z, 10, $ai->entity->getVerticalFaceSpeed()); --$this->attackCounter; - $v1 = $ai->entity->width * $ai->entity->width * 4; + $mult = $ai->entity instanceof Spider ? 1 : 2; + $v1 = $ai->entity->width * $ai->entity->width * $mult*$mult; $e = $ai->entity; $t = $e->target; diff --git a/src/entity/monster/PigZombie.php b/src/entity/monster/PigZombie.php index e4cc616e..3d6859a7 100644 --- a/src/entity/monster/PigZombie.php +++ b/src/entity/monster/PigZombie.php @@ -1,5 +1,5 @@ setSize(0.3, 1.95); @@ -11,6 +11,7 @@ class PigZombie extends Monster{ $this->ai->addTask(new TaskLookAround()); $this->ai->addTask(new TaskRandomWalk(1.0)); $this->ai->addTask(new TaskSwimming()); + $this->ai->addTask(new TaskAttackPlayer(1.0, 16)); //TODO fix range? } public function getAttackDamage(){ return 5; diff --git a/src/entity/monster/Spider.php b/src/entity/monster/Spider.php index 9087321f..a6128c3b 100644 --- a/src/entity/monster/Spider.php +++ b/src/entity/monster/Spider.php @@ -10,6 +10,7 @@ class Spider extends Monster{ $this->ai->addTask(new TaskRandomWalk(1.0)); //TODO this mob doesnt use newAI -> speed is not correct $this->ai->addTask(new TaskLookAround()); //TODO this mob doesnt use newAI $this->ai->addTask(new TaskSwimming()); + $this->ai->addTask(new TaskAttackPlayer(1.0, 16)); //TODO fix range? } public function getDrops(){ diff --git a/src/material/block/solid/IceBlock.php b/src/material/block/solid/IceBlock.php index 6203a727..e4eb6d59 100644 --- a/src/material/block/solid/IceBlock.php +++ b/src/material/block/solid/IceBlock.php @@ -17,10 +17,6 @@ class IceBlock extends TransparentBlock{ return $ret; } - public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){ - return [new AxisAlignedBB($x, $y, $z, $x+1, $y+1, $z+1)]; - } - public function onBreak(Item $item, Player $player){ if(($player->gamemode & 0x01) === 0){ $this->level->setBlock($this, new WaterBlock(), true, false, true);