DeadBush: updated support requirements

since 1.20 they can now be placed on grass and mud.
This commit is contained in:
Dylan K. Taylor 2023-09-08 16:41:06 +01:00
parent d7f69c5e24
commit efafc2c6ca
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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,
};
} }
} }