canBeFlowedInto() public method

AKA: Block->isFlowable
public canBeFlowedInto ( ) : boolean
return boolean
Exemplo n.º 1
0
 private function flowIntoBlock(Block $block, $newFlowDecay)
 {
     //So this the actual block setting
     if ($block->canBeFlowedInto()) {
         if ($block->getId() > 0) {
             $this->getLevel()->useBreakOn($block);
         }
         $this->getLevel()->setBlock($block, Block::get($this->getId(), $newFlowDecay), true);
         //if($newFlowDecay >= 0){ //This should actually be added somewhere else, now no water will go away
         $this->getLevel()->scheduleUpdate($block, $this->tickRate());
         //}
     }
 }
Exemplo n.º 2
0
 private function flowIntoBlock(Block $block, $newFlowDecay)
 {
     if ($block->canBeFlowedInto()) {
         if ($block->getId() > 0) {
             $this->getLevel()->useBreakOn($block);
         }
         $this->getLevel()->setBlock($block, Block::get($this->getId(), $newFlowDecay), \true);
         $this->getLevel()->scheduleUpdate($block, $this->tickRate());
     }
 }
Exemplo n.º 3
0
 private function flowIntoBlock(Block $block, $newFlowDecay)
 {
     if ($block->canBeFlowedInto()) {
         if ($block instanceof Lava) {
             $this->triggerLavaMixEffects($block);
         } elseif ($block->getId() > 0) {
             $this->getLevel()->useBreakOn($block);
         }
         $this->getLevel()->setBlock($block, Block::get($this->getId(), $newFlowDecay), true);
         $this->getLevel()->scheduleUpdate($block, $this->tickRate());
     }
 }