BrushableBlock 5.46.0
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 = 10MAX_BRUSHED_PROGRESS
php
public const MAX_BRUSHED_PROGRESS = 3Methods
__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) : voidgetBrushedProgress()
php
public function getBrushedProgress() : intgetBrushedResult()
php
public function getBrushedResult() : \pocketmine\block\BlockReturns the block this turns into once fully brushed.
getDropsForCompatibleTool()
php
public function getDropsForCompatibleTool(\pocketmine\item\Item $item) : arrayisAffectedBySilkTouch()
php
public function isAffectedBySilkTouch() : boolisHanging()
php
public function isHanging() : boolonHitGround()
php
public function onHitGround(\pocketmine\entity\object\FallingBlock $blockEntity) : boolonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonNearbyBlockChange()
php
public function onNearbyBlockChange() : voidonScheduledUpdate()
php
public function onScheduledUpdate() : voidsetBrushedProgress()
php
public function setBrushedProgress(int $brushedProgress) : selfsetHanging()
php
public function setHanging(bool $hanging) : self