First look at using (very) basic tags for dynamic block properties

this allows plugins to, for example, add their own custom dirt-like blocks which support having flowers placed on them.
This commit is contained in:
Dylan K. Taylor
2022-07-24 00:08:02 +01:00
parent 817591910b
commit d9b050fb68
17 changed files with 158 additions and 98 deletions

View File

@ -79,14 +79,7 @@ class FlowerPot extends Flowable{
}
private function isValidPlant(Block $block) : bool{
return
$block instanceof Cactus ||
$block instanceof DeadBush ||
$block instanceof Flower ||
$block instanceof RedMushroom ||
$block instanceof Sapling ||
($block instanceof TallGrass && $block->getTypeId() === BlockTypeIds::LARGE_FERN);
//TODO: bamboo
return $block->hasTypeTag(BlockTypeTags::POTTABLE_PLANTS);
}
/**