Updated textures, implemented tree gen

This commit is contained in:
2021-02-25 21:37:57 -05:00
parent c7094dfc61
commit bb39d14bb8
5 changed files with 27 additions and 5 deletions
@@ -22,11 +22,19 @@ public class CherryTree extends Feature<DefaultFeatureConfig> {
public boolean generate(StructureWorldAccess world, ChunkGenerator generator, Random random, BlockPos pos, DefaultFeatureConfig config) {
BlockPos topPos = world.getTopPosition(Heightmap.Type.WORLD_SURFACE, pos);
Direction offset = Direction.NORTH;
/*
for (int y = 1; y <= 15; y++) {
offset = offset.rotateYClockwise();
world.setBlockState(topPos.up(y).offset(offset), CherryBlocks.CHERRYLOG.getDefaultState(), 3);
}
*/
if (isSoil(world, topPos.down())){
System.out.println(pos.toString() + " is soil! (TOP)");
for (int y = 0; y <=7; y++)
world.setBlockState(topPos.up(y), CherryBlocks.CHERRYLOG.getDefaultState(), 3);
} else {
System.out.println(pos.toString() + " is not soil! (TOP)");
}
return true;
}