mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Liquid: add getMinAdjacentSourcesToFormSource(), remove circular dependency between Liquid and Water
this unpleasantly-named method allows controlling the source-forming behaviour of liquids by changing the required number of adjacent sources that must be present in order for a new source to form. This allows stuff like non-infinite water.
This commit is contained in:
@ -46,6 +46,10 @@ class Water extends Liquid{
|
||||
return 5;
|
||||
}
|
||||
|
||||
public function getMinAdjacentSourcesToFormSource() : ?int{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public function onEntityInside(Entity $entity) : bool{
|
||||
$entity->resetFallDistance();
|
||||
if($entity->isOnFire()){
|
||||
|
Reference in New Issue
Block a user