mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +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{
|
||||
$blockId = $block->getTypeId();
|
||||
return $blockId === BlockTypeIds::SAND
|
||||
|| $blockId === BlockTypeIds::RED_SAND
|
||||
|| $blockId === BlockTypeIds::PODZOL
|
||||
|| $blockId === BlockTypeIds::MYCELIUM
|
||||
|| $blockId === BlockTypeIds::DIRT
|
||||
|| $blockId === BlockTypeIds::HARDENED_CLAY
|
||||
|| $blockId === BlockTypeIds::STAINED_CLAY;
|
||||
return
|
||||
$block->hasTypeTag(BlockTypeTags::SAND) ||
|
||||
$block->hasTypeTag(BlockTypeTags::MUD) ||
|
||||
match($block->getTypeId()){
|
||||
//can't use DIRT tag here because it includes farmland
|
||||
BlockTypeIds::PODZOL,
|
||||
BlockTypeIds::MYCELIUM,
|
||||
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