PointedDripstone 5.46.0
Extends Transparent
Pointed dripstone (also used for the sulfur spike, which has the same states).
A standing block (stalagmite) needs a full top face or a standing block of the same type below it; a hanging block (stalactite) needs a full bottom face or a hanging block of the same type above it. The thickness is recalculated from the neighbouring blocks like in vanilla, including merged tips.
Stalactites of pointed dripstone drip the water or lava source above the block they hang from into a cauldron up to 11 blocks below their tip (Java PointedDripstoneBlock.maybeTransferFluid()): on a random tick of the top block of the stalactite, water drips with a 17.6% chance and lava with 5.9%; the drop lands 50 ticks + 1 tick per block of fall later. Water adds a third of a cauldron (2 of the 6 Bedrock levels), lava fills it. Mud above the root block dries into clay instead. The dripping particles are drawn by the client from the block states.
Not implemented: falling stalactites, extra fall damage on stalagmites and growth. Blocks that lose their support break and drop instead of falling.
Constants
DRIP_BASE_DELAY_TICKS
public const DRIP_BASE_DELAY_TICKS = 50FLUID_LAVA
public const FLUID_LAVA = 2FLUID_NONE
public const FLUID_NONE = 0FLUID_WATER
public const FLUID_WATER = 1LAVA_TRANSFER_CHANCE
public const LAVA_TRANSFER_CHANCE = 0.05859375MAX_DRIP_SEARCH_LENGTH
public const MAX_DRIP_SEARCH_LENGTH = 11WATER_DRIP_FILL_AMOUNT
public const WATER_DRIP_FILL_AMOUNT = 2Bedrock cauldron levels added by one drop of water (a third of the cauldron, like one Java level)
WATER_TRANSFER_CHANCE
public const WATER_TRANSFER_CHANCE = 0.17578125Properties
$hanging protected
protected bool $hanging$thickness protected
protected \pocketmine\block\utils\DripstoneThickness $thicknessMethods
canBePlacedAt()
public function canBePlacedAt(\pocketmine\block\Block $blockReplace, \pocketmine\math\Vector3 $clickVector, int $face, bool $isClickedBlock) : boolcanCauldronReceiveDrip()
public static function canCauldronReceiveDrip(\pocketmine\block\Block $block, int $fluid) : boolReturns whether a drop of the fluid (FLUID_* constant) can go into the cauldron: an empty cauldron takes water and lava, a water cauldron which isn't full (nor dyed) takes water.
canDripThrough()
public static function canDripThrough(\pocketmine\block\Block $block) : boolReturns whether a drop can fall through the block: air, or a non-solid block without fluid that leaves the central 4x4 pixel column free (Java canDripThrough()).
describeBlockOnlyState() protected
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : voidfillCauldron()
public static function fillCauldron(\pocketmine\block\Block $cauldron, int $fluid) : voidAdds a drop of the fluid to the cauldron: water adds a third of a cauldron, lava fills it.
findFillableCauldronBelow()
public static function findFillableCauldronBelow(\pocketmine\block\PointedDripstone $tip, int $fluid) : ?\pocketmine\block\BlockReturns the cauldron up to 11 blocks below the tip that a drop of the fluid falls into, or null.
findTip()
public function findTip() : ?\pocketmine\block\PointedDripstoneReturns the tip of the stalactite this block belongs to (not a merged tip), or null if none is found within 11 blocks.
getFluidAboveStalactite()
public function getFluidAboveStalactite() : arrayReturns the fluid that drips from the stalactite this block belongs to (FLUID_* constant) and the block it comes from: a water or lava source (or waterlogged block) above the block the stalactite hangs from. Mud counts as water.
getSupportType()
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportTypegetThickness()
public function getThickness() : \pocketmine\block\utils\DripstoneThicknessisHanging()
public function isHanging() : boolisStalactiteStart()
public function isStalactiteStart() : boolReturns whether this is the top block of a stalactite.
maybeTransferFluid()
public function maybeTransferFluid(float $random) : boolJava PointedDripstoneBlock.maybeTransferFluid(): lets a drop of the fluid above the stalactite fall towards a cauldron below its tip (it lands in PointedDripstone::onScheduledUpdate()), or dries mud into clay. Only the top block of a stalactite drips.
onNearbyBlockChange()
public function onNearbyBlockChange() : voidonRandomTick()
public function onRandomTick() : voidonScheduledUpdate()
public function onScheduledUpdate() : voidA drop let fall by PointedDripstone::maybeTransferFluid() lands: the cauldron below the tip is filled if the stalactite, the fluid and the cauldron are still there (Java fills from the cauldron's scheduled tick).
place()
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : boolrecalculateCollisionBoxes() protected
protected function recalculateCollisionBoxes() : arraysetHanging()
public function setHanging(bool $hanging) : selfsetThickness()
public function setThickness(\pocketmine\block\utils\DripstoneThickness $thickness) : selfticksRandomly()
public function ticksRandomly() : bool