Oil Tweaks

Fix Oil being consumed by Fire.
Reduce Oil Biome oil spawn bonus: 40x -> 30x.
Nerf Ocean Oil Field spawns a bit.
Fix Oil on Water, Closes #919
This commit is contained in:
CovertJaguar 2013-06-10 03:27:58 -07:00
parent af4ef23e10
commit f19ab165ef
4 changed files with 18 additions and 19 deletions

View file

@ -309,7 +309,7 @@ public class BlockOilFlowing extends BlockFlowing implements ILiquid {
@Override
public int getFlammability(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) {
return 1;
return 0;
}
@Override

View file

@ -67,7 +67,7 @@ public class BlockOilStill extends BlockStationary implements ILiquid {
@Override
public int getFlammability(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) {
return 1;
return 0;
}
@Override

View file

@ -27,7 +27,7 @@ public class GenLayerAddOilOcean extends GenLayer {
final int currentBiomeId = inputBiomeIDs[xIter + 1 + (yIter + 1) * (width + 2)];
if (currentBiomeId == BiomeGenBase.ocean.biomeID
&& SimplexNoise.noise((xIter + x) * 0.0008, (yIter + y) * 0.0008) > 0.8) {
&& SimplexNoise.noise((xIter + x) * 0.0006, (yIter + y) * 0.0006) > 0.85) {
outputBiomeIDs[xIter + yIter * width] = BuildCraftEnergy.biomeOilOcean.biomeID;
} else {
outputBiomeIDs[xIter + yIter * width] = currentBiomeId;

View file

@ -84,7 +84,7 @@ public class OilPopulate {
double bonus = oilBiome ? 4.0 : 1.0;
if (excessiveBiomes.contains(biome.biomeID)) {
bonus *= 40;
bonus *= 30;
} else if (BuildCraftCore.debugMode) {
bonus *= 20;
}
@ -104,7 +104,7 @@ public class OilPopulate {
// Find ground level
int groundLevel = getTopBlock(world, x, z);
if (groundLevel < 0) {
if (groundLevel < 5) {
return;
}
@ -238,10 +238,10 @@ public class OilPopulate {
// Fill in holes
for (int dx = x - radius; dx <= x + radius; ++dx) {
for (int dz = z - radius; dz <= z + radius; ++dz) {
if (isOil(world, dx, y - 1, dz)) {
if (isOil(world, dx, y, dz)) {
continue;
}
if (isOilSurrounded(world, dx, y - 1, dz)) {
if (isOilSurrounded(world, dx, y, dz)) {
setOilColumnForLake(world, biome, dx, y, dz, depth, 2);
}
}
@ -302,7 +302,7 @@ public class OilPopulate {
private void setOilWithProba(World world, BiomeGenBase biome, Random rand, float proba, int x, int y, int z, int depth) {
if (rand.nextFloat() <= proba && world.getBlockId(x, y - depth - 1, z) != 0) {
if (isOilAdjacent(world, x, y - 1, z)) {
if (isOilAdjacent(world, x, y, z)) {
setOilColumnForLake(world, biome, x, y, z, depth, 3);
}
}
@ -313,21 +313,20 @@ public class OilPopulate {
if (!world.isAirBlock(x, y + 2, z)) {
return;
}
if (isOilOrWater(world, x, y + 1, z)) {
world.setBlock(x, y + 1, z, BuildCraftEnergy.oilStill.blockID, 0, update);
} else {
world.setBlock(x, y + 1, z, 0, 0, 2);
}
if (isOilOrWater(world, x, y, z)) {
if (isOilOrWater(world, x, y, z) || world.isBlockSolidOnSide(x, y - 1, z, ForgeDirection.UP)) {
world.setBlock(x, y, z, BuildCraftEnergy.oilStill.blockID, 0, update);
} else {
world.setBlock(x, y, z, 0, 0, 2);
return;
}
if (!world.isAirBlock(x, y + 1, z)) {
world.setBlock(x, y + 1, z, 0, 0, update);
}
for (int d = depth; d > 0; d--) {
if (isOilOrWater(world, x, y - d - 1, z) || world.isBlockSolidOnSide(x, y - d - 1, z, ForgeDirection.UP)) {
world.setBlock(x, y - d, z, BuildCraftEnergy.oilStill.blockID, 0, d == 1 ? update : 2);
for (int d = 1; d <= depth - 1; d++) {
if (isOilOrWater(world, x, y - d, z) || !world.isBlockSolidOnSide(x, y - d - 1, z, ForgeDirection.UP)) {
return;
}
world.setBlock(x, y - d, z, BuildCraftEnergy.oilStill.blockID, 0, 2);
}
}
}
@ -354,7 +353,7 @@ public class OilPopulate {
if (block instanceof BlockFlower) {
continue;
}
return y;
return y - 1;
}
return -1;