mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
DeadBush: updated support requirements
since 1.20 they can now be placed on grass and mud.
This commit is contained in:
parent
d7f69c5e24
commit
efafc2c6ca
@ -66,13 +66,19 @@ class DeadBush extends Flowable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function canBeSupportedBy(Block $block) : bool{
|
private function canBeSupportedBy(Block $block) : bool{
|
||||||
$blockId = $block->getTypeId();
|
return
|
||||||
return $blockId === BlockTypeIds::SAND
|
$block->hasTypeTag(BlockTypeTags::SAND) ||
|
||||||
|| $blockId === BlockTypeIds::RED_SAND
|
$block->hasTypeTag(BlockTypeTags::MUD) ||
|
||||||
|| $blockId === BlockTypeIds::PODZOL
|
match($block->getTypeId()){
|
||||||
|| $blockId === BlockTypeIds::MYCELIUM
|
//can't use DIRT tag here because it includes farmland
|
||||||
|| $blockId === BlockTypeIds::DIRT
|
BlockTypeIds::PODZOL,
|
||||||
|| $blockId === BlockTypeIds::HARDENED_CLAY
|
BlockTypeIds::MYCELIUM,
|
||||||
|| $blockId === BlockTypeIds::STAINED_CLAY;
|
BlockTypeIds::DIRT,
|
||||||
|
BlockTypeIds::GRASS,
|
||||||
|
BlockTypeIds::HARDENED_CLAY,
|
||||||
|
BlockTypeIds::STAINED_CLAY => true,
|
||||||
|
//TODO: moss block
|
||||||
|
default => false,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user