|
| | __construct (Vector3 $pos, $id, $pitch=0) |
| |
| | getPitch () |
| |
| | setPitch ($pitch) |
| |
| | encode () |
| |
| | encode () |
| |
| | __construct ($x=0, $y=0, $z=0) |
| |
| | getX () |
| |
| | getY () |
| |
| | getZ () |
| |
| | getFloorX () |
| |
| | getFloorY () |
| |
| | getFloorZ () |
| |
| | getRight () |
| |
| | getUp () |
| |
| | getForward () |
| |
| | getSouth () |
| |
| | getWest () |
| |
| | add ($x, $y=0, $z=0) |
| |
| | subtract ($x=0, $y=0, $z=0) |
| |
| | multiply ($number) |
| |
| | divide ($number) |
| |
| | ceil () |
| |
| | floor () |
| |
| | round () |
| |
| | abs () |
| |
| | getSide ($side, $step=1) |
| |
| | asVector3 () |
| |
| | distance (Vector3 $pos) |
| |
| | distanceSquared (Vector3 $pos) |
| |
| | maxPlainDistance ($x=0, $z=0) |
| |
| | length () |
| |
| | lengthSquared () |
| |
| | normalize () |
| |
| | dot (Vector3 $v) |
| |
| | cross (Vector3 $v) |
| |
| | equals (Vector3 $v) |
| |
| | getIntermediateWithXValue (Vector3 $v, $x) |
| |
| | getIntermediateWithYValue (Vector3 $v, $y) |
| |
| | getIntermediateWithZValue (Vector3 $v, $z) |
| |
| | setComponents ($x, $y, $z) |
| |
| | fromObjectAdd (Vector3 $pos, $x, $y, $z) |
| |
| | __toString () |
| |
◆ __construct()
| __construct |
( |
Vector3 |
$pos, |
|
|
|
$id, |
|
|
|
$pitch = 0 |
|
) |
| |
GenericSound constructor.
- Parameters
-
| Vector3 | $pos | |
| int | $id | |
| int | $pitch | |
37 parent::__construct($pos->x, $pos->y, $pos->z);
38 $this->
id = (int)
$id;
39 $this->pitch = (float)
$pitch * 1000;
◆ encode()
- Returns
- LevelEventPacket
64 $pk =
new LevelEventPacket;
69 $pk->data = (int) $this->pitch;
◆ getPitch()
- Returns
- float
49 return $this->pitch / 1000;
◆ setPitch()
- Parameters
-
56 $this->pitch = (float)
$pitch * 1000;
◆ $id
◆ $pitch
The documentation for this class was generated from the following file:
- src/pocketmine/level/sound/GenericSound.php