PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
pocketmine\block\utils\MinimumCostFlowCalculator Class Reference
+ Collaboration diagram for pocketmine\block\utils\MinimumCostFlowCalculator:

Public Member Functions

 __construct (private World $world, private int $flowDecayPerBlock, private \Closure $canFlowInto)
 
 getOptimalFlowDirections (int $originX, int $originY, int $originZ)
 

Detailed Description

Calculates the path(s) of least resistance for liquid flow.

Definition at line 36 of file MinimumCostFlowCalculator.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\block\utils\MinimumCostFlowCalculator::__construct ( private World $world,
private int $flowDecayPerBlock,
private \Closure $canFlowInto )

@phpstan-param \Closure(Block) : bool $canFlowInto

Definition at line 48 of file MinimumCostFlowCalculator.php.

Member Function Documentation

◆ getOptimalFlowDirections()

pocketmine\block\utils\MinimumCostFlowCalculator::getOptimalFlowDirections ( int $originX,
int $originY,
int $originZ )
Returns
int[]

Definition at line 101 of file MinimumCostFlowCalculator.php.


The documentation for this class was generated from the following file: