Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error line 60 #7

Open
xxxWILL-INFxxx opened this issue Jun 1, 2018 · 0 comments
Open

Error line 60 #7

xxxWILL-INFxxx opened this issue Jun 1, 2018 · 0 comments

Comments

@xxxWILL-INFxxx
Copy link

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; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant