Updated textures, implemented tree gen
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user