本文整理汇总了PHP中pocketmine\block\Block::canBeFlowedInto方法的典型用法代码示例。如果您正苦于以下问题:PHP Block::canBeFlowedInto方法的具体用法?PHP Block::canBeFlowedInto怎么用?PHP Block::canBeFlowedInto使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\block\Block
的用法示例。
在下文中一共展示了Block::canBeFlowedInto方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flowIntoBlock
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());
//}
}
}
示例2: flowIntoBlock
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());
}
}
示例3: flowIntoBlock
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());
}
}