Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Removed unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasXu committed Jul 23, 2022
1 parent 88b7b1a commit ae0e1bc
Showing 1 changed file with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.durchholz.beacon.math.Vec3i;

public enum Biome {
OCEAN(voxel -> true, 0f),
OCEAN(voxel -> true),
BEACH(voxel -> {
float temperature = Main.INSTANCE.getWorld().getGenerator().getTemperature().sample(voxel.position());
Block block = temperature < 0 ? Block.STONE : Block.SAND;
Expand All @@ -15,46 +15,42 @@ public enum Biome {
if(relative != null) relative.setBlock(block);
}
return true;
}, 0.5f),
}),
PLAINS(voxel -> {
voxel.setBlock(Block.GRASS);
for (int y = 1; y < 3; y++) {
final Voxel relative = voxel.getRelative(new Vec3i(0, -y, 0));
if(relative != null) relative.setBlock(Block.DIRT);
}
return true;
}, 0.25f, new Structure(1, 2, new BirchTreeFeature())),
}, new Structure(3, 5, new BirchTreeFeature())),
FOREST(voxel -> {
voxel.setBlock(Block.GRASS);
for (int y = 1; y < 3; y++) {
final Voxel relative = voxel.getRelative(new Vec3i(0, -y, 0));
if(relative != null) relative.setBlock(Block.DIRT);
}
return true;
}, 0.1f, new Structure(1, 3, new OakTreeFeature())),
}, new Structure(1, 3, new OakTreeFeature())),
MOUNTAINS(voxel -> {
voxel.setBlock(Block.STONE);
return true;
}, 0.25f),
}),
DESERT(voxel -> {
voxel.setBlock(Block.SAND);
return true;
}, 0.5f, new Structure(0, 2, new CactusFeature())),
}, new Structure(0, 2, new CactusFeature())),
SNOW(voxel -> {
voxel.setBlock(Block.WHITE_GLASS);
return true;
}, 0.5f, new Structure(0, 3, new AcaciaTreeFeature()));
}, new Structure(0, 3, new AcaciaTreeFeature()));

private final TerrainFeature surfaceLayer;
//private final TerrainFeature[] features;
private final float featureDensity;

private final Structure[] structures;

Biome(TerrainFeature surfaceLayer, float featureDensity, Structure... structures) {
Biome(TerrainFeature surfaceLayer, Structure... structures) {
this.surfaceLayer = surfaceLayer;
//this.features = features;
this.featureDensity = featureDensity;
this.structures = structures;

}
Expand All @@ -63,16 +59,8 @@ public TerrainFeature getSurfaceLayer() {
return surfaceLayer;
}

/*public TerrainFeature[] getFeatures() {
return features;
}*/

public Structure[] getStructures() {
return structures;
}


public float getFeatureDensity() {
return featureDensity;
}
}

0 comments on commit ae0e1bc

Please sign in to comment.