Changes to the Deadlands and how Smoldering Grass generates.
This commit is contained in:
parent
e77aee5360
commit
e650ecd2b2
9 changed files with 64 additions and 80 deletions
|
@ -133,7 +133,6 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
protected WorldGenerator clayInStoneGen;
|
||||
protected WorldGenerator quagmireGen;
|
||||
protected WorldGenerator canyonGen;
|
||||
protected WorldGenerator smolderingGrassGen;
|
||||
protected WorldGenerator cloudGen;
|
||||
protected WorldGenerator coalGen;
|
||||
protected WorldGenerator ironGen;
|
||||
|
@ -168,6 +167,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
protected WorldGenerator cattailGen;
|
||||
protected WorldGenerator highCattailGen;
|
||||
protected WorldGenerator outbackGen;
|
||||
protected WorldGenerator smolderingGrassGen;
|
||||
protected WorldGenerator canyonGrassGen;
|
||||
protected WorldGenerator netherGrassGen;
|
||||
protected WorldGenerator netherWartGen;
|
||||
|
@ -279,6 +279,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
/** The amount of tall grass to generate per chunk. */
|
||||
protected int grassPerChunk;
|
||||
protected int outbackPerChunk;
|
||||
protected int smolderingGrassPerChunk;
|
||||
protected int netherGrassPerChunk;
|
||||
protected int netherWartPerChunk;
|
||||
protected int canyonGrassPerChunk;
|
||||
|
@ -356,7 +357,6 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
public boolean generatePumpkins;
|
||||
public boolean generateMelons;
|
||||
public boolean generateBoulders;
|
||||
public boolean generateSmolderingGrass;
|
||||
public boolean generateClouds;
|
||||
|
||||
public BiomeDecoratorBOP(BiomeGenBase par1BiomeGenBase)
|
||||
|
@ -380,7 +380,6 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
this.clayInStoneGen = new WorldGenMinable(Block.blockClay.blockID, 32);
|
||||
this.quagmireGen = new WorldGenQuagmire(Block.grass.blockID, 48);
|
||||
this.canyonGen = new WorldGenCanyon(Blocks.redRock.get().blockID, 48);
|
||||
this.smolderingGrassGen = new WorldGenSmolderingGrass(Blocks.holyGrass.get().blockID, 1, 32);
|
||||
this.driedDirtInSandGen = new WorldGenDriedDirt(Blocks.driedDirt.get().blockID, 32);
|
||||
this.cloudGen = new WorldGenCloud(Blocks.cloud.get().blockID, 48);
|
||||
this.coalGen = new WorldGenMinable(Block.oreCoal.blockID, 16);
|
||||
|
@ -432,6 +431,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
this.highGrassGen = new WorldGenHighGrass(Blocks.foliage.get().blockID, 3);
|
||||
this.highCattailGen = new WorldGenHighCattail(Blocks.plants.get().blockID, 9);
|
||||
this.outbackGen = new WorldGenOutback(Blocks.foliage.get().blockID, 2);
|
||||
this.smolderingGrassGen = new WorldGenSmolderingGrass(Blocks.holyGrass.get().blockID, 1);
|
||||
this.netherGrassGen = new WorldGenNetherGrass(Block.tallGrass.blockID, 1);
|
||||
this.netherWartGen = new WorldGenNetherWart(Block.netherStalk.blockID, 0);
|
||||
this.canyonGrassGen = new WorldGenCanyonGrass(Blocks.foliage.get().blockID, 2);
|
||||
|
@ -501,6 +501,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
this.desertCactiPerChunk = 0;
|
||||
this.highGrassPerChunk = 0;
|
||||
this.outbackPerChunk = 0;
|
||||
this.smolderingGrassPerChunk = 0;
|
||||
this.netherGrassPerChunk = 0;
|
||||
this.netherWartPerChunk = 0;
|
||||
this.canyonGrassPerChunk = 0;
|
||||
|
@ -530,7 +531,6 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
this.generatePumpkins = true;
|
||||
this.generateMelons = false;
|
||||
this.generateBoulders = false;
|
||||
this.generateSmolderingGrass = false;
|
||||
this.generateClouds = false;
|
||||
this.biome = par1BiomeGenBase;
|
||||
}
|
||||
|
@ -662,11 +662,6 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
this.genStandardOre1(15, this.canyonGen, 64, 128);
|
||||
}
|
||||
|
||||
if (this.generateSmolderingGrass)
|
||||
{
|
||||
this.genStandardOre1(15, this.smolderingGrassGen, 64, 128);
|
||||
}
|
||||
|
||||
if (this.generateClouds)
|
||||
{
|
||||
this.genCloudMain(1, this.cloudGen, 0, 50);
|
||||
|
@ -1090,6 +1085,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
this.outbackGen.generate(this.currentWorld, this.randomGenerator, var3, var4, var5);
|
||||
}
|
||||
|
||||
for (var2 = 0; var2 < this.smolderingGrassPerChunk; ++var2)
|
||||
{
|
||||
var3 = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
|
||||
var4 = this.randomGenerator.nextInt(128);
|
||||
var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
|
||||
this.smolderingGrassGen.generate(this.currentWorld, this.randomGenerator, var3, var4, var5);
|
||||
}
|
||||
|
||||
for (var2 = 0; var2 < this.netherGrassPerChunk; ++var2)
|
||||
{
|
||||
var3 = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
|
||||
|
|
|
@ -2,6 +2,8 @@ package biomesoplenty.biomes;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.worldgen.WorldGenBogBush;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
@ -9,15 +11,29 @@ import net.minecraft.world.gen.feature.WorldGenerator;
|
|||
|
||||
public class BiomeGenBeachOvergrown extends BiomeGenBase
|
||||
{
|
||||
private BiomeDecoratorBOP customBiomeDecorator;
|
||||
|
||||
public BiomeGenBeachOvergrown(int par1)
|
||||
{
|
||||
super(par1);
|
||||
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||||
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||||
this.spawnableCreatureList.clear();
|
||||
this.topBlock = (byte)Block.sand.blockID;
|
||||
this.fillerBlock = (byte)Block.sand.blockID;
|
||||
this.theBiomeDecorator.treesPerChunk = 5;
|
||||
this.theBiomeDecorator.deadBushPerChunk = -999;
|
||||
this.theBiomeDecorator.treesPerChunk = 15;
|
||||
this.theBiomeDecorator.deadBushPerChunk = 1;
|
||||
this.customBiomeDecorator.duneGrassPerChunk = 25;
|
||||
this.theBiomeDecorator.reedsPerChunk = -999;
|
||||
this.theBiomeDecorator.cactiPerChunk = 1;
|
||||
this.customBiomeDecorator.outbackPerChunk = 5;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a WorldGen appropriate for this biome.
|
||||
*/
|
||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||||
{
|
||||
return new WorldGenBogBush();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ public class BiomeGenDeadlands extends BiomeGenBase
|
|||
this.customBiomeDecorator.sandPerChunk = -999;
|
||||
this.customBiomeDecorator.sandPerChunk2 = -999;
|
||||
this.customBiomeDecorator.lavaLakesPerChunk = 25;
|
||||
this.customBiomeDecorator.smolderingGrassPerChunk = 5;
|
||||
this.customBiomeDecorator.generatePits = true;
|
||||
this.customBiomeDecorator.generateSmolderingGrass = true;
|
||||
this.waterColorMultiplier = 16711680;
|
||||
this.spawnableCreatureList.clear();
|
||||
this.spawnableWaterCreatureList.clear();
|
||||
|
|
|
@ -30,6 +30,7 @@ public class BiomeGenNetherLava extends BiomeGenBase
|
|||
this.fillerBlock = (byte)Block.netherrack.blockID;
|
||||
this.customBiomeDecorator.grassPerChunk = 8;
|
||||
this.customBiomeDecorator.netherLavaPerChunk = 20;
|
||||
this.customBiomeDecorator.smolderingGrassPerChunk = 2;
|
||||
this.customBiomeDecorator.generateAsh = true;
|
||||
this.spawnableMonsterList.clear();
|
||||
this.spawnableCreatureList.clear();
|
||||
|
|
|
@ -80,10 +80,10 @@ public class BOPBiomes {
|
|||
Biomes.chaparral = Optional.of((new BiomeGenChaparral(BOPConfiguration.chaparralID)).setColor(9286496).setBiomeName("Chaparral").setTemperatureRainfall(0.8F, 0.4F).setMinMaxHeight(0.3F, 0.6F));
|
||||
Biomes.cherryBlossomGrove = Optional.of((new BiomeGenCherryBlossomGrove(BOPConfiguration.cherryBlossomGroveID)).setColor(9286496).setBiomeName("Cherry Blossom Grove").setMinMaxHeight(0.1F, 0.2F).setTemperatureRainfall(0.7F, 0.8F));
|
||||
Biomes.coniferousForest = Optional.of((new BiomeGenConiferousForest(BOPConfiguration.coniferousForestID)).setColor(747097).setBiomeName("Coniferous Forest").func_76733_a(5159473).setTemperatureRainfall(0.3F, 0.4F).setMinMaxHeight(0.1F, 0.8F));
|
||||
Biomes.coniferousForestSnow = Optional.of((new BiomeGenConiferousForestSnow(BOPConfiguration.coniferousForestSnowID)).setColor(14090235).setBiomeName("Coniferous Forest (Snow)").setTemperatureRainfall(0.0F, 0.0F).setMinMaxHeight(0.1F, 0.7F));
|
||||
Biomes.coniferousForestSnow = Optional.of((new BiomeGenConiferousForestSnow(BOPConfiguration.coniferousForestSnowID)).setColor(14090235).setBiomeName("Snowy Coniferous Forest").setTemperatureRainfall(0.0F, 0.0F).setMinMaxHeight(0.1F, 0.7F));
|
||||
Biomes.crag = Optional.of((new BiomeGenCrag(BOPConfiguration.cragID)).setColor(9286496).setBiomeName("Crag").setMinMaxHeight(0.0F, 9.9F).setTemperatureRainfall(0.4F, 0.2F));
|
||||
Biomes.deadForest = Optional.of((new BiomeGenDeadForest(BOPConfiguration.deadForestID)).setColor(522674).setBiomeName("Dead Forest").func_76733_a(9154376).setMinMaxHeight(0.2F, 0.7F).setTemperatureRainfall(1.2F, 0.1F));
|
||||
Biomes.deadForestSnow = Optional.of((new BiomeGenDeadForestSnow(BOPConfiguration.deadForestSnowID)).setColor(522674).setBiomeName("Dead Forest (Snow)").func_76733_a(9154376).setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.2F, 0.7F));
|
||||
Biomes.deadForestSnow = Optional.of((new BiomeGenDeadForestSnow(BOPConfiguration.deadForestSnowID)).setColor(522674).setBiomeName("Snowy Dead Forest").func_76733_a(9154376).setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.2F, 0.7F));
|
||||
Biomes.deadSwamp = Optional.of((new BiomeGenDeadSwamp(BOPConfiguration.deadSwampID)).setColor(522674).setBiomeName("Dead Swamp").func_76733_a(9154376).setMinMaxHeight(-0.2F, 0.1F).setTemperatureRainfall(0.8F, 0.9F));
|
||||
Biomes.deadlands = Optional.of((new BiomeGenDeadlands(BOPConfiguration.deadlandsID)).setColor(522674).setBiomeName("Deadlands").setDisableRain().func_76733_a(9154376).setMinMaxHeight(0.1F, 0.5F).setTemperatureRainfall(2.0F, 0.0F));
|
||||
Biomes.deciduousForest = Optional.of((new BiomeGenDeciduousForest(BOPConfiguration.deciduousForestID)).setColor(353825).setBiomeName("Deciduous Forest").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F));
|
||||
|
|
|
@ -17,7 +17,7 @@ public class WorldGenBogBush extends WorldGenerator
|
|||
|
||||
int var6 = var1.getBlockId(var3, var4, var5);
|
||||
|
||||
if (var6 != Block.grass.blockID)
|
||||
if (var6 != Block.grass.blockID && var6 != Block.sand.blockID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -38,19 +38,20 @@ public class WorldGenBrush2 extends WorldGenerator
|
|||
var1.setBlock(var3, var4 + 1, var5, Block.wood.blockID);
|
||||
var1.setBlock(var3, var4 + 2, var5, Block.wood.blockID);
|
||||
var1.setBlock(var3, var4 + 3, var5, Block.wood.blockID);
|
||||
var1.setBlock(var3 + 1, var4 + 3, var5, Block.leaves.blockID);
|
||||
var1.setBlock(var3 - 1, var4 + 3, var5, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 3, var5 + 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 3, var5 - 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 + 1, var4 + 3, var5 + 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 + 1, var4 + 3, var5 - 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 - 1, var4 + 3, var5 + 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 - 1, var4 + 3, var5 - 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 4, var5, Block.wood.blockID);
|
||||
var1.setBlock(var3 + 1, var4 + 4, var5, Block.leaves.blockID);
|
||||
var1.setBlock(var3 - 1, var4 + 4, var5, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 4, var5 + 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 4, var5 - 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 4, var5, Block.leaves.blockID);
|
||||
var1.setBlock(var3 + 1, var4 + 4, var5 + 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 + 1, var4 + 4, var5 - 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 - 1, var4 + 4, var5 + 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 - 1, var4 + 4, var5 - 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3 + 1, var4 + 5, var5, Block.leaves.blockID);
|
||||
var1.setBlock(var3 - 1, var4 + 5, var5, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 5, var5 + 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 5, var5 - 1, Block.leaves.blockID);
|
||||
var1.setBlock(var3, var4 + 5, var5, Block.leaves.blockID);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class WorldGenOutback extends WorldGenerator
|
|||
int var9 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
||||
int var10 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8);
|
||||
|
||||
if (par1World.isAirBlock(var8, var9, var10) && par1World.getBlockId(var8, var9 - 1, var10) == Blocks.hardSand.get().blockID)
|
||||
if (par1World.isAirBlock(var8, var9, var10) && (par1World.getBlockId(var8, var9 - 1, var10) == Blocks.hardSand.get().blockID || par1World.getBlockId(var8, var9 - 1, var10) == Block.sand.blockID))
|
||||
{
|
||||
par1World.setBlock(var8, var9 - 1, var10, Block.grass.blockID, 0, 2);
|
||||
par1World.setBlock(var8, var9, var10, this.tallGrassID, this.tallGrassMetadata, 2);
|
||||
|
|
|
@ -6,76 +6,39 @@ import biomesoplenty.api.Blocks;
|
|||
import biomesoplenty.configuration.BOPBlocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class WorldGenSmolderingGrass extends WorldGenerator
|
||||
{
|
||||
/** The block ID of the ore to be placed using this generator. */
|
||||
private int minableBlockId;
|
||||
/** Stores ID for WorldGenTallGrass */
|
||||
private int tallGrassID;
|
||||
private int tallGrassMetadata;
|
||||
|
||||
/** The number of blocks to generate. */
|
||||
private int numberOfBlocks;
|
||||
|
||||
private int blockMeta;
|
||||
|
||||
public WorldGenSmolderingGrass(int par1, int meta, int par2)
|
||||
public WorldGenSmolderingGrass(int par1, int par2)
|
||||
{
|
||||
this.minableBlockId = par1;
|
||||
this.numberOfBlocks = par2;
|
||||
this.blockMeta = meta;
|
||||
this.tallGrassID = par1;
|
||||
this.tallGrassMetadata = par2;
|
||||
}
|
||||
|
||||
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
|
||||
{
|
||||
float var6 = par2Random.nextFloat() * (float)Math.PI;
|
||||
double var7 = (double)((float)(par3 + 8) + MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
|
||||
double var9 = (double)((float)(par3 + 8) - MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
|
||||
double var11 = (double)((float)(par5 + 8) + MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
|
||||
double var13 = (double)((float)(par5 + 8) - MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
|
||||
double var15 = (double)(par4 + par2Random.nextInt(3) - 2);
|
||||
double var17 = (double)(par4 + par2Random.nextInt(3) - 2);
|
||||
int var11;
|
||||
|
||||
for (int var19 = 0; var19 <= this.numberOfBlocks; ++var19)
|
||||
for (boolean var6 = false; ((var11 = par1World.getBlockId(par3, par4, par5)) == 0 || var11 == Block.leaves.blockID) && par4 > 0; --par4)
|
||||
{
|
||||
double var20 = var7 + (var9 - var7) * (double)var19 / (double)this.numberOfBlocks;
|
||||
double var22 = var15 + (var17 - var15) * (double)var19 / (double)this.numberOfBlocks;
|
||||
double var24 = var11 + (var13 - var11) * (double)var19 / (double)this.numberOfBlocks;
|
||||
double var26 = par2Random.nextDouble() * (double)this.numberOfBlocks / 16.0D;
|
||||
double var28 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
|
||||
double var30 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
|
||||
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
|
||||
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
|
||||
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
|
||||
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
|
||||
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
|
||||
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
|
||||
;
|
||||
}
|
||||
|
||||
for (int var38 = var32; var38 <= var35; ++var38)
|
||||
for (int var7 = 0; var7 < 128; ++var7)
|
||||
{
|
||||
int var8 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8);
|
||||
int var9 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
||||
int var10 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8);
|
||||
|
||||
if (par1World.isAirBlock(var8, var9, var10) && (par1World.getBlockId(var8, var9 - 1, var10) == Blocks.ash.get().blockID || par1World.getBlockId(var8, var9 - 1, var10) == Block.netherrack.blockID))
|
||||
{
|
||||
double var39 = ((double)var38 + 0.5D - var20) / (var28 / 2.0D);
|
||||
|
||||
if (var39 * var39 < 1.0D)
|
||||
{
|
||||
for (int var41 = var33; var41 <= var36; ++var41)
|
||||
{
|
||||
double var42 = ((double)var41 + 0.5D - var22) / (var30 / 2.0D);
|
||||
|
||||
if (var39 * var39 + var42 * var42 < 1.0D)
|
||||
{
|
||||
for (int var44 = var34; var44 <= var37; ++var44)
|
||||
{
|
||||
double var45 = ((double)var44 + 0.5D - var24) / (var28 / 2.0D);
|
||||
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Blocks.ash.get().blockID || par1World.getBlockId(var38, var41, var44) == Block.netherrack.blockID)
|
||||
{
|
||||
par1World.setBlock(var38, var41, var44, this.minableBlockId, this.blockMeta, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
par1World.setBlock(var8, var9 - 1, var10, Blocks.holyGrass.get().blockID, 1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue