Cactus Flowers in vanilla can be placed on #minecraft:dirt, minecraft:farmland, or anything that is face sturdy upwards.
Forge has added a line of code that works for other classes that extend VegetationBlock, but because CactusFlowerBlock has special placement, it has broken it.
CactusFlowerBlock code
@Override protected boolean mayPlaceOn(BlockState p_395694_, BlockGetter p_391810_, BlockPos p_391352_) {
BlockState blockstate = p_391810_.getBlockState(p_391352_);
return blockstate.is(Blocks.CACTUS) || blockstate.is(Blocks.FARMLAND) || blockstate.isFaceSturdy(p_391810_, p_391352_, Direction.UP, SupportType.CENTER);
}
VegetationBlock code that broke it
@Override protected boolean canSurvive(BlockState p_397664_, LevelReader p_395119_, BlockPos p_393561_) {
BlockPos blockpos = p_393561_.below();
if (p_397664_.getBlock() == this) { //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
return p_395119_.getBlockState(blockpos).canSustainPlant(p_395119_, blockpos, Direction.UP, this);
}
return this.mayPlaceOn(p_395119_.getBlockState(blockpos), p_395119_, blockpos); }