Skip to content

Error line 60 #7

@juiceluqi

Description

@juiceluqi
getCause() !== EntityDamageEvent::CAUSE_VOID){ $source->setCancelled(); }else{ if($this->isAlive()){ $this->close(); } } } public function spawnTo(Player $player){ $packet = new AddEntityPacket(); $packet->type = static::NETWORK_ID; $packet->motion = $this->getMotion(); $packet->position = $this->asVector3(); $packet->entityRuntimeId = $this->getId(); $packet->pitch = $this->pitch; $packet->yaw = $this->yaw; $packet->metadata = $this->getDataPropertyManager()->getAll(); $player->dataPacket($packet); parent::spawnTo($player); } public static function getCompoundMotion(Player $player): CompoundTag{ $data = new CompoundTag("", [ new ListTag("Pos", array( new DoubleTag("", $player->getX()), new DoubleTag("", $player->getY() + $player->getEyeHeight()), new DoubleTag("", $player->getZ()) )), new ListTag("Motion", array( new DoubleTag("", -sin($player->yaw / 180 * M_PI) * cos($player->pitch / 180 * M_PI)), new DoubleTag("", -sin($player->pitch / 180 * M_PI)), new DoubleTag("", cos($player->yaw / 180 * M_PI) * cos($player->pitch / 180 * M_PI)) )), new ListTag("Rotation", array( new FloatTag("", $player->yaw), new FloatTag("", $player->pitch) )) ]); return $data; } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions