Skip to content

BrushableBlock 5.46.0 ​

class · pocketmine\block\BrushableBlock · source

Extends Opaque
Implements Fallable

Suspicious sand and gravel. Brushing them (using a brush on them) uncovers the item rolled from their archaeology loot table; after 10 brush strokes, at most one every 10 ticks like in vanilla, the item pops out of the brushed face and the block turns into normal sand/gravel. Unfinished brushing decays after 2 seconds.

They fall like sand (unless "hanging", which vanilla uses for blocks generated without support) and break without dropping anything when they land. They never drop anything when broken, even with silk touch.

Constants ​

BRUSHES_TO_COMPLETE ​

php
public const BRUSHES_TO_COMPLETE = 10

MAX_BRUSHED_PROGRESS ​

php
public const MAX_BRUSHED_PROGRESS = 3

Methods ​

__construct() ​

php
public function __construct(\pocketmine\block\BlockIdentifier $idInfo, string $name, \pocketmine\block\BlockTypeInfo $typeInfo, \Closure $brushedResult)

describeBlockOnlyState() protected ​

php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : void

getBrushedProgress() ​

php
public function getBrushedProgress() : int

getBrushedResult() ​

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

Returns the block this turns into once fully brushed.

getDropsForCompatibleTool() ​

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

isAffectedBySilkTouch() ​

php
public function isAffectedBySilkTouch() : bool

isHanging() ​

php
public function isHanging() : bool

onHitGround() ​

php
public function onHitGround(\pocketmine\entity\object\FallingBlock $blockEntity) : bool

onInteract() ​

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

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

onScheduledUpdate() ​

php
public function onScheduledUpdate() : void

setBrushedProgress() ​

php
public function setBrushedProgress(int $brushedProgress) : self

setHanging() ​

php
public function setHanging(bool $hanging) : self

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