This is how Mojang checks if trees can grow.

Subject to changes.
This commit is contained in:
wizjany 2019-08-05 23:16:42 -04:00
parent e25a6d21cd
commit d822ccc9e5

View File

@ -53,7 +53,7 @@ public class ForestGenerator implements RegionFunction {
BlockState block = editSession.getBlock(position);
BlockType t = block.getBlockType();
if (t == BlockTypes.GRASS_BLOCK || t == BlockTypes.DIRT) {
if (t == BlockTypes.GRASS_BLOCK || t == BlockTypes.DIRT || t == BlockTypes.PODZOL || t == BlockTypes.COARSE_DIRT) {
return treeType.generate(editSession, position.add(0, 1, 0));
} else if (t.getMaterial().isReplacedDuringPlacement()) {
// since the implementation's tree generators generally don't generate in non-air spots,