Skip to content

BubbleColumn 5.46.0 ​

class · pocketmine\block\BubbleColumn · source

Extends Transparent
Implements Waterlogged

Bubble column (https://minecraft.wiki/w/Bubble_Column): fills the water sources above soul sand (pushes up) or a magma block (drags down, "whirlpool"). Like vanilla it holds a water source (kept in the liquid layer) and is created, extended and removed by BubbleColumn::updateColumn(): water sources over soul sand/magma run it when they are updated, column blocks run it 5 ticks after a neighbour change.

The bubbles and sounds are drawn by the client from the block; players are moved by their own client, other entities are pushed here with the vanilla velocities.

Constants ​

CHECK_DELAY ​

php
public const CHECK_DELAY = 5

Ticks between a neighbour change and the column check (vanilla CHECK_PERIOD).

DRAG_DOWN_ACCELERATION ​

php
public const DRAG_DOWN_ACCELERATION = 0.03

Velocity change per tick inside a whirlpool, and its cap (downwards).

DRAG_DOWN_MAX_SPEED ​

php
public const DRAG_DOWN_MAX_SPEED = 0.3

PUSH_UP_ACCELERATION ​

php
public const PUSH_UP_ACCELERATION = 0.06

Velocity change per tick inside an upward column, and its cap (blocks/tick).

PUSH_UP_MAX_SPEED ​

php
public const PUSH_UP_MAX_SPEED = 0.7

SURFACE_DRAG_DOWN_MAX_SPEED ​

php
public const SURFACE_DRAG_DOWN_MAX_SPEED = 0.9

SURFACE_PUSH_UP_ACCELERATION ​

php
public const SURFACE_PUSH_UP_ACCELERATION = 0.1

Same for the topmost block of an upward column (nothing above it): entities are thrown out of the water.

SURFACE_PUSH_UP_MAX_SPEED ​

php
public const SURFACE_PUSH_UP_MAX_SPEED = 1.8

Properties ​

$dragDown protected ​

php
protected bool $dragDown

Methods ​

canBeReplaced() ​

php
public function canBeReplaced() : bool

canOccupy() ​

php
public static function canOccupy(\pocketmine\block\Block $block) : bool

Whether a bubble column can take the place of this block: another column, or a water source (not one held by a waterlogged block, which stops the column like in vanilla).

describeBlockOnlyState() protected ​

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

getColumnState() ​

php
public static function getColumnState(\pocketmine\block\Block $below, \pocketmine\block\Block $occupied) : \pocketmine\block\Block

What a column-capable block should be with the given block below it: the column continues the one below, soul sand starts an upward column, a magma block a whirlpool, and anything else turns a column back into still water.

getDropsForCompatibleTool() ​

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

getPickedItem() ​

php
public function getPickedItem(bool $addUserData = false) : \pocketmine\item\Item

getSupportType() ​

php
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportType

isAffectedBySilkTouch() ​

php
public function isAffectedBySilkTouch() : bool

isDragDown() ​

php
public function isDragDown() : bool

Whether the column drags entities down (above a magma block) instead of pushing them up (above soul sand).

isSolid() ​

php
public function isSolid() : bool

onColumnSourceRandomTick() ​

php
public static function onColumnSourceRandomTick(\pocketmine\block\Block $source) : void

onEntityInside() ​

php
public function onEntityInside(\pocketmine\entity\Entity $entity) : bool

Same as water, plus the push of the column. Players are left to their client, which simulates the column itself (pushing them here as well would double the effect).

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

onScheduledUpdate() ​

php
public function onScheduledUpdate() : void

onWaterSourceUpdate() ​

php
public static function onWaterSourceUpdate(\pocketmine\block\Water $water) : void

Called by water sources when they are updated: starts a column if one is over soul sand or a magma block.

pushedVerticalSpeed() ​

php
public static function pushedVerticalSpeed(float $speed, bool $dragDown, bool $surface) : float

Vertical speed (blocks/tick) of an entity after one tick in a bubble column block. $surface is true for the top block of a column, which has nothing (no collision, no liquid) above it.

recalculateCollisionBoxes() protected ​

php
protected function recalculateCollisionBoxes() : array

setDragDown() ​

php
public function setDragDown(bool $dragDown) : self

startsColumn() ​

php
public static function startsColumn(\pocketmine\block\Block $block) : bool

Whether this block below a water source starts a bubble column (soul sand or a magma block).

updateColumn() ​

php
public static function updateColumn(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos, \pocketmine\block\Block $below) : void

Vanilla's BubbleColumnBlock.updateColumn(): sets the block at $pos (if a column can be there) to what the block below calls for, and the same state in every column-capable block above it, up to the first one that is not. Creates, extends, flips and removes columns.

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