Fixed falling blocks getting moved by currents, closes #2080

This commit is contained in:
Dylan K. Taylor
2018-03-30 12:20:59 +01:00
parent 5d32587cf7
commit 1d5978df98
3 changed files with 19 additions and 4 deletions

View File

@ -189,10 +189,12 @@ abstract class Liquid extends Transparent{
}
public function addVelocityToEntity(Entity $entity, Vector3 $vector) : void{
$flow = $this->getFlowVector();
$vector->x += $flow->x;
$vector->y += $flow->y;
$vector->z += $flow->z;
if($entity->canBeMovedByCurrents()){
$flow = $this->getFlowVector();
$vector->x += $flow->x;
$vector->y += $flow->y;
$vector->z += $flow->z;
}
}
abstract public function tickRate() : int;