I'm using Forge 1.16.5-23.2.34, and I'm attempting to make a tree that would grow from Soul Sand (or any other block I might later choose), and there seems to be no method to change this. I've already made it so that saplings can be placed on it, I just can't get them to form into trees on it.
This is my code for making Saplings peaceable on other blocks:
public class ModSaplingBlock extends SaplingBlock {
private Supplier<Block> otherDirt;
public ModSaplingBlock(Tree p_i48337_1_, Properties p_i48337_2_, Supplier<Block> otherDirt) {
super(p_i48337_1_, p_i48337_2_);
this.otherDirt = otherDirt;
}
@Override
protected boolean mayPlaceOn(BlockState p_200014_1_, IBlockReader p_200014_2_, BlockPos p_200014_3_) {
return p_200014_1_.is(otherDirt.get());
}
}
And this is my code for my trees:
public static final ConfiguredFeature<BaseTreeFeatureConfig, ?> ASH =
register("ash", Feature.TREE.configured((
new BaseTreeFeatureConfig.Builder(
new SimpleBlockStateProvider(ModBlocks.ASH_LOG.get().defaultBlockState()),
new SimpleBlockStateProvider(Blocks.AIR.defaultBlockState()),
new AcaciaFoliagePlacer(FeatureSpread.fixed(2),FeatureSpread.fixed(0)),
new ForkyTrunkPlacer(5, 2, 2),
new TwoLayerFeature(1, 0, 2))
.build())));
Any help or pointers would be greatly appreciated, thanks!