Skip to content

Liquid ​

abstract class · pocketmine\block\Liquid · source

Extends Transparent

Constants ​

MAX_DECAY ​

php
public const MAX_DECAY = 7

Properties ​

$adjacentSources ​

php
public int $adjacentSources

$decay protected ​

php
protected int $decay

$falling protected ​

php
protected bool $falling

$flowVector protected ​

php
protected ?\pocketmine\math\Vector3 $flowVector

$still protected ​

php
protected bool $still

Methods ​

addVelocityToEntity() ​

php
public function addVelocityToEntity(\pocketmine\entity\Entity $entity) : ?\pocketmine\math\Vector3

canBeFlowedInto() ​

php
public function canBeFlowedInto() : bool

canBeReplaced() ​

php
public function canBeReplaced() : bool

canFlowInto() protected ​

php
protected function canFlowInto(\pocketmine\block\Block $block) : bool

checkForHarden() protected ​

php
protected function checkForHarden() : bool

describeBlockOnlyState() protected ​

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

flowIntoBlock() protected ​

php
protected function flowIntoBlock(\pocketmine\block\Block $block, int $newFlowDecay, bool $falling) : void

getBucketEmptySound() ​

php
abstract public function getBucketEmptySound() : \pocketmine\world\sound\Sound

getBucketFillSound() ​

php
abstract public function getBucketFillSound() : \pocketmine\world\sound\Sound

getDecay() ​

php
public function getDecay() : int

getDropsForCompatibleTool() ​

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

getEffectiveFlowDecay() protected ​

php
protected function getEffectiveFlowDecay(\pocketmine\block\Block $block) : int

getFlowDecayPerBlock() ​

php
public function getFlowDecayPerBlock() : int

Returns how many liquid levels are lost per block flowed horizontally. Affects how far the liquid can flow.

getFlowVector() ​

php
public function getFlowVector() : \pocketmine\math\Vector3

getFlowingForm() ​

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

getFluidHeightPercent() ​

php
public function getFluidHeightPercent()

getMinAdjacentSourcesToFormSource() ​

php
public function getMinAdjacentSourcesToFormSource() : ?int

Returns the number of source blocks of this liquid that must be horizontally adjacent to this block in order for this block to become a source block itself, or null if the liquid does not exhibit source-forming behaviour.

getStillForm() ​

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

getSupportType() ​

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

hasEntityCollision() ​

php
public function hasEntityCollision() : bool

isFalling() ​

php
public function isFalling() : bool

isSolid() ​

php
public function isSolid() : bool

isSource() ​

php
public function isSource() : bool

isStill() ​

php
public function isStill() : bool

liquidCollide() protected ​

php
protected function liquidCollide(\pocketmine\block\Block $cause, \pocketmine\block\Block $result) : bool

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

onScheduledUpdate() ​

php
public function onScheduledUpdate() : void

readStateFromWorld() ​

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

recalculateCollisionBoxes() protected ​

php
protected function recalculateCollisionBoxes() : array

setDecay() ​

php
public function setDecay(int $decay) : self

setFalling() ​

php
public function setFalling(bool $falling) : self

setStill() ​

php
public function setStill(bool $still = true) : self

tickRate() ​

php
abstract public function tickRate() : int

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