Skip to content

Jukebox ​

class · pocketmine\block\Jukebox · source

Extends Opaque
Implements ComparatorReadable

A playing jukebox emits a redstone signal of 15 until the track ends; a comparator reads a value per disc for as long as the disc is inside.

Methods ​

ejectRecord() ​

php
public function ejectRecord() : void

getComparatorOutput() 5.46.0 ​

php
public function getComparatorOutput() : int

getDropsForCompatibleTool() ​

php
public function getDropsForCompatibleTool(\pocketmine\item\Item $item) : array

getFuelTime() ​

php
public function getFuelTime() : int

getRecord() ​

php
public function getRecord() : ?\pocketmine\item\Record

getWeakPower() 5.46.0 ​

php
public function getWeakPower(int $face) : int

insertRecord() ​

php
public function insertRecord(\pocketmine\item\Record $record) : void

isPlaying() 5.46.0 ​

php
public function isPlaying() : bool

Returns whether the inserted disc is still playing (the jukebox emits redstone power meanwhile).

isRedstoneSource() 5.46.0 ​

php
public function isRedstoneSource() : bool

onBreak() ​

php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onInteract() ​

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

onScheduledUpdate() 5.46.0 ​

php
public function onScheduledUpdate() : void

readStateFromWorld() ​

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

startSound() ​

php
public function startSound() : void

stopSound() ​

php
public function stopSound() : void

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.