Skip to content

Note ​

class · pocketmine\block\Note · source

Extends Opaque

Constants ​

MAX_PITCH ​

php
public const MAX_PITCH = 24

MIN_PITCH ​

php
public const MIN_PITCH = 0

Methods ​

getFuelTime() ​

php
public function getFuelTime() : int

getInstrument() 5.46.0 ​

php
public function getInstrument() : \pocketmine\world\sound\NoteInstrument

Returns the instrument played, which depends on the block below the note block.

getPitch() ​

php
public function getPitch() : int

onAttack() 5.46.0 ​

php
public function onAttack(\pocketmine\item\Item $item, int $face, ?\pocketmine\player\Player $player = null) : bool

onInteract() 5.46.0 ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onNearbyBlockChange() 5.46.0 ​

php
public function onNearbyBlockChange() : void

play() 5.46.0 ​

php
public function play() : bool

Plays the note, unless the note block is covered.

readStateFromWorld() ​

php
public function readStateFromWorld() : \pocketmine\block\Block

setPitch() ​

php
public function setPitch(int $pitch) : self

writeStateToWorld() ​

php
public function writeStateToWorld() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.