make reeds, algae, coral biomes configurable

This commit is contained in:
octarine-noise
2014-08-21 01:39:00 +02:00
parent 03766727fd
commit c366e89266
13 changed files with 326 additions and 28 deletions

View File

@@ -31,7 +31,8 @@ public class RenderBlockBetterAlgae extends RenderBlockAOBase implements IRender
public boolean isBlockAccepted(IBlockAccess blockAccess, int x, int y, int z, Block block, int original) {
if (!Config.algaeEnabled) return false;
if (!(Config.dirt.matchesID(block))) return false;
if (!Config.dirt.matchesID(block)) return false;
if (!Config.algaeBiomeList.contains(blockAccess.getBiomeGenForCoords(x, z).biomeID)) return false;
if (blockAccess.getBlock(x, y + 1, z).getMaterial() != Material.water) return false;
if (blockAccess.getBlock(x, y + 2, z).getMaterial() != Material.water) return false;
int terrainVariation = MathHelper.floor_double((noise.func_151605_a(x, z) + 1.0) * 32.0);

View File

@@ -32,6 +32,7 @@ public class RenderBlockBetterCoral extends RenderBlockAOBase implements IRender
public boolean isBlockAccepted(IBlockAccess blockAccess, int x, int y, int z, Block block, int original) {
if (!Config.coralEnabled) return false;
if (block != Blocks.sand) return false;
if (!Config.coralBiomeList.contains(blockAccess.getBiomeGenForCoords(x, z).biomeID)) return false;
int terrainVariation = MathHelper.floor_double((noise.func_151605_a(x * 0.1, z * 0.1) + 1.0) * 32.0);
return terrainVariation < Config.coralPopulation;
}

View File

@@ -34,9 +34,9 @@ public class RenderBlockBetterReed extends RenderBlockAOBase implements IRenderB
public boolean isBlockAccepted(IBlockAccess blockAccess, int x, int y, int z, Block block, int original) {
if (!Config.reedEnabled) return false;
if (!(Config.dirt.matchesID(block))) return false;
if (!Config.reedBiomeList.contains(blockAccess.getBiomeGenForCoords(x, z).biomeID)) return false;
if (blockAccess.getBlock(x, y + 1, z).getMaterial() != Material.water) return false;
if (!blockAccess.isAirBlock(x, y + 2, z)) return false;
if (blockAccess.getBiomeGenForCoords(x, z).temperature < 0.4f || blockAccess.getBiomeGenForCoords(x, z).rainfall < 0.4f) return false;
int terrainVariation = MathHelper.floor_double((noise.func_151605_a(x, z) + 1.0) * 32.0);
return terrainVariation < Config.reedPopulation;
}