Fix naming errors in ArbitraryBiomeShape caused by biome commit.

This commit is contained in:
sk89q 2014-07-17 14:50:44 -07:00
parent 42be110097
commit 9c205e0e00

View File

@ -84,12 +84,12 @@ public abstract class ArbitraryBiomeShape {
*/ */
protected abstract BaseBiome getBiome(int x, int z, BaseBiome defaultBaseBiome); protected abstract BaseBiome getBiome(int x, int z, BaseBiome defaultBaseBiome);
private BaseBiome getBiomeCached(int x, int z, BaseBiome BaseBiome) { private BaseBiome getBiomeCached(int x, int z, BaseBiome baseBiome) {
final int index = (z - cacheOffsetZ) + (x - cacheOffsetX) * cacheSizeZ; final int index = (z - cacheOffsetZ) + (x - cacheOffsetX) * cacheSizeZ;
final BaseBiome cacheEntry = cache[index]; final BaseBiome cacheEntry = cache[index];
if (cacheEntry == null) {// unknown, fetch material if (cacheEntry == null) {// unknown, fetch material
final BaseBiome material = getBiome(x, z, BaseBiome); final BaseBiome material = getBiome(x, z, baseBiome);
if (material == null) { if (material == null) {
// outside // outside
cache[index] = OUTSIDE; cache[index] = OUTSIDE;
@ -108,13 +108,13 @@ public abstract class ArbitraryBiomeShape {
return cacheEntry; return cacheEntry;
} }
private boolean isInsideCached(int x, int z, BaseBiome BaseBiome) { private boolean isInsideCached(int x, int z, BaseBiome baseBiome) {
final int index = (z - cacheOffsetZ) + (x - cacheOffsetX) * cacheSizeZ; final int index = (z - cacheOffsetZ) + (x - cacheOffsetX) * cacheSizeZ;
final BaseBiome cacheEntry = cache[index]; final BaseBiome cacheEntry = cache[index];
if (cacheEntry == null) { if (cacheEntry == null) {
// unknown block, meaning they must be outside the extent at this stage, but might still be inside the shape // unknown block, meaning they must be outside the extent at this stage, but might still be inside the shape
return getBiomeCached(x, z, BaseBiome) != null; return getBiomeCached(x, z, baseBiome) != null;
} }
return cacheEntry != OUTSIDE; return cacheEntry != OUTSIDE;
@ -124,11 +124,11 @@ public abstract class ArbitraryBiomeShape {
* Generates the shape. * Generates the shape.
* *
* @param editSession The EditSession to use. * @param editSession The EditSession to use.
* @param BaseBiome The default biome type. * @param baseBiome The default biome type.
* @param hollow Specifies whether to generate a hollow shape. * @param hollow Specifies whether to generate a hollow shape.
* @return number of affected blocks. * @return number of affected blocks.
*/ */
public int generate(EditSession editSession, BaseBiome BaseBiome, boolean hollow) { public int generate(EditSession editSession, BaseBiome baseBiome, boolean hollow) {
int affected = 0; int affected = 0;
for (Vector2D position : getExtent()) { for (Vector2D position : getExtent()) {
@ -136,7 +136,7 @@ public abstract class ArbitraryBiomeShape {
int z = position.getBlockZ(); int z = position.getBlockZ();
if (!hollow) { if (!hollow) {
final BaseBiome material = getBiome(x, z, BaseBiome); final BaseBiome material = getBiome(x, z, baseBiome);
if (material != OUTSIDE) { if (material != OUTSIDE) {
editSession.getWorld().setBiome(position, material); editSession.getWorld().setBiome(position, material);
++affected; ++affected;
@ -145,26 +145,26 @@ public abstract class ArbitraryBiomeShape {
continue; continue;
} }
final BaseBiome material = getBiomeCached(x, z, BaseBiome); final BaseBiome material = getBiomeCached(x, z, baseBiome);
if (material == null) { if (material == null) {
continue; continue;
} }
boolean draw = false; boolean draw = false;
do { do {
if (!isInsideCached(x + 1, z, BaseBiome)) { if (!isInsideCached(x + 1, z, baseBiome)) {
draw = true; draw = true;
break; break;
} }
if (!isInsideCached(x - 1, z, BaseBiome)) { if (!isInsideCached(x - 1, z, baseBiome)) {
draw = true; draw = true;
break; break;
} }
if (!isInsideCached(x, z + 1, BaseBiome)) { if (!isInsideCached(x, z + 1, baseBiome)) {
draw = true; draw = true;
break; break;
} }
if (!isInsideCached(x, z - 1, BaseBiome)) { if (!isInsideCached(x, z - 1, baseBiome)) {
draw = true; draw = true;
break; break;
} }