Note
Extends Opaque
Constants
MAX_PITCH
php
public const MAX_PITCH = 24MIN_PITCH
php
public const MIN_PITCH = 0Methods
getFuelTime()
php
public function getFuelTime() : intgetInstrument() 5.46.0
php
public function getInstrument() : \pocketmine\world\sound\NoteInstrumentReturns the instrument played, which depends on the block below the note block.
getPitch()
php
public function getPitch() : intonAttack() 5.46.0
php
public function onAttack(\pocketmine\item\Item $item, int $face, ?\pocketmine\player\Player $player = null) : boolonInteract() 5.46.0
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonNearbyBlockChange() 5.46.0
php
public function onNearbyBlockChange() : voidplay() 5.46.0
php
public function play() : boolPlays the note, unless the note block is covered.
readStateFromWorld()
php
public function readStateFromWorld() : \pocketmine\block\BlocksetPitch()
php
public function setPitch(int $pitch) : selfwriteStateToWorld()
php
public function writeStateToWorld() : void