Merge pull request #841 from XCompWiz/biomecheck

Adds a Check to prevent Biome Replacement
This commit is contained in:
LexManos 2013-10-27 22:14:54 -07:00
commit a47cca7e42

View file

@ -10,7 +10,26 @@
public abstract class BiomeGenBase public abstract class BiomeGenBase
{ {
@@ -179,8 +182,8 @@ @@ -140,6 +143,10 @@
protected WorldGenSwamp worldGeneratorSwamp;
public BiomeGenBase(int par1)
+ {
+ this(par1, true);
+ }
+ public BiomeGenBase(int par1, boolean register)
{
this.topBlock = (byte)Block.grass.blockID;
this.fillerBlock = (byte)Block.dirt.blockID;
@@ -159,6 +166,7 @@
this.worldGeneratorForest = new WorldGenForest(false);
this.worldGeneratorSwamp = new WorldGenSwamp();
this.biomeID = par1;
+ if (register)
biomeList[par1] = this;
this.theBiomeDecorator = this.createBiomeDecorator();
this.spawnableCreatureList.add(new SpawnListEntry(EntitySheep.class, 12, 4, 4));
@@ -179,8 +187,8 @@
* Allocate a new BiomeDecorator for this BiomeGenBase * Allocate a new BiomeDecorator for this BiomeGenBase
*/ */
public BiomeDecorator createBiomeDecorator() public BiomeDecorator createBiomeDecorator()
@ -21,7 +40,7 @@
} }
/** /**
@@ -372,7 +375,7 @@ @@ -372,7 +380,7 @@
{ {
double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F); double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F);
double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F); double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F);
@ -30,7 +49,7 @@
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -384,6 +387,32 @@ @@ -384,6 +392,32 @@
{ {
double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F); double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F);
double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F); double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F);