-
Notifications
You must be signed in to change notification settings - Fork 0
Error line 60 #7
Copy link
Copy link
Open
Description
juiceluqi
opened on Jun 1, 2018
Issue body actions
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;
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels