Added reed gen
This commit is contained in:
parent
5c0d532e1b
commit
cfbb6e527a
21 changed files with 63 additions and 0 deletions
|
@ -98,6 +98,7 @@ import biomesoplenty.worldgen.WorldGenSponge;
|
||||||
import biomesoplenty.worldgen.WorldGenSprout;
|
import biomesoplenty.worldgen.WorldGenSprout;
|
||||||
import biomesoplenty.worldgen.WorldGenSteppe;
|
import biomesoplenty.worldgen.WorldGenSteppe;
|
||||||
import biomesoplenty.worldgen.WorldGenSunflower;
|
import biomesoplenty.worldgen.WorldGenSunflower;
|
||||||
|
import biomesoplenty.worldgen.WorldGenWaterReeds;
|
||||||
import biomesoplenty.worldgen.tree.WorldGenPromisedWillow;
|
import biomesoplenty.worldgen.tree.WorldGenPromisedWillow;
|
||||||
|
|
||||||
public class BiomeDecoratorBOP extends BiomeDecorator
|
public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
|
@ -182,6 +183,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
public WorldGenerator plantDeadGen;
|
public WorldGenerator plantDeadGen;
|
||||||
public WorldGenerator plantDesertGen;
|
public WorldGenerator plantDesertGen;
|
||||||
public WorldGenerator cattailGen;
|
public WorldGenerator cattailGen;
|
||||||
|
public WorldGenerator waterReedGen;
|
||||||
public WorldGenerator highCattailGen;
|
public WorldGenerator highCattailGen;
|
||||||
public WorldGenerator outbackGen;
|
public WorldGenerator outbackGen;
|
||||||
public WorldGenerator smolderingGrassGen;
|
public WorldGenerator smolderingGrassGen;
|
||||||
|
@ -328,6 +330,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
public int bluebellsPerChunk;
|
public int bluebellsPerChunk;
|
||||||
public int minersDelightPerChunk;
|
public int minersDelightPerChunk;
|
||||||
public int icyIrisPerChunk;
|
public int icyIrisPerChunk;
|
||||||
|
public int waterReedsPerChunk;
|
||||||
|
|
||||||
public int boneSpinesPerChunk;
|
public int boneSpinesPerChunk;
|
||||||
public int boneSpines2PerChunk;
|
public int boneSpines2PerChunk;
|
||||||
|
@ -532,6 +535,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
desertCactusGen = new WorldGenDesertCactus();
|
desertCactusGen = new WorldGenDesertCactus();
|
||||||
waterlilyGen = new WorldGenWaterlily();
|
waterlilyGen = new WorldGenWaterlily();
|
||||||
algaeGen = new WorldGenAlgae();
|
algaeGen = new WorldGenAlgae();
|
||||||
|
waterReedGen = new WorldGenWaterReeds();
|
||||||
pitGen = new WorldGenPit(Blocks.ash.get().blockID);
|
pitGen = new WorldGenPit(Blocks.ash.get().blockID);
|
||||||
waterlilyPerChunk = 0;
|
waterlilyPerChunk = 0;
|
||||||
lilyflowersPerChunk = 0;
|
lilyflowersPerChunk = 0;
|
||||||
|
@ -623,6 +627,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
bluebellsPerChunk = 0;
|
bluebellsPerChunk = 0;
|
||||||
minersDelightPerChunk = 2;
|
minersDelightPerChunk = 2;
|
||||||
icyIrisPerChunk = 0;
|
icyIrisPerChunk = 0;
|
||||||
|
waterReedsPerChunk = 0;
|
||||||
generateLakes = true;
|
generateLakes = true;
|
||||||
generateAsh = false;
|
generateAsh = false;
|
||||||
generateMycelium = false;
|
generateMycelium = false;
|
||||||
|
@ -1702,6 +1707,19 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
algaeGen.generate(currentWorld, randomGenerator, var3, var5, var4);
|
algaeGen.generate(currentWorld, randomGenerator, var3, var5, var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var2 = 0; doGen && var2 < waterReedsPerChunk; ++var2)
|
||||||
|
{
|
||||||
|
var3 = chunk_X + randomGenerator.nextInt(16) + 8;
|
||||||
|
var4 = chunk_Z + randomGenerator.nextInt(16) + 8;
|
||||||
|
|
||||||
|
for (var5 = randomGenerator.nextInt(256); var5 > 0 && currentWorld.getBlockId(var3, var5 - 1, var4) == 0; --var5)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
waterReedGen.generate(currentWorld, randomGenerator, var3, var5, var4);
|
||||||
|
}
|
||||||
|
|
||||||
//Added
|
//Added
|
||||||
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD);
|
doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD);
|
||||||
for (var2 = 0; doGen && var2 < waterlilyPerChunk; ++var2)
|
for (var2 = 0; doGen && var2 < waterlilyPerChunk; ++var2)
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class BiomeGenBayou extends BiomeGenBase
|
||||||
customBiomeDecorator.algaePerChunk = 1;
|
customBiomeDecorator.algaePerChunk = 1;
|
||||||
customBiomeDecorator.shrubsPerChunk = 2;
|
customBiomeDecorator.shrubsPerChunk = 2;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 7;
|
customBiomeDecorator.wheatGrassPerChunk = 7;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 3;
|
||||||
customBiomeDecorator.generatePumpkins = false;
|
customBiomeDecorator.generatePumpkins = false;
|
||||||
waterColorMultiplier = 16767282;
|
waterColorMultiplier = 16767282;
|
||||||
spawnableWaterCreatureList.clear();
|
spawnableWaterCreatureList.clear();
|
||||||
|
|
|
@ -40,6 +40,7 @@ public class BiomeGenBog extends BiomeGenBase
|
||||||
customBiomeDecorator.waterLakesPerChunk = 6;
|
customBiomeDecorator.waterLakesPerChunk = 6;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 3;
|
customBiomeDecorator.wheatGrassPerChunk = 3;
|
||||||
customBiomeDecorator.poisonWaterPerChunk = 2;
|
customBiomeDecorator.poisonWaterPerChunk = 2;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 5;
|
||||||
customBiomeDecorator.shrubsPerChunk = 10;
|
customBiomeDecorator.shrubsPerChunk = 10;
|
||||||
customBiomeDecorator.generatePumpkins = false;
|
customBiomeDecorator.generatePumpkins = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ public class BiomeGenBorealForest extends BiomeGenBase
|
||||||
customBiomeDecorator.grassPerChunk = 50;
|
customBiomeDecorator.grassPerChunk = 50;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 25;
|
customBiomeDecorator.wheatGrassPerChunk = 25;
|
||||||
customBiomeDecorator.shrubsPerChunk = 10;
|
customBiomeDecorator.shrubsPerChunk = 10;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,6 +29,7 @@ public class BiomeGenDeadForest extends BiomeGenBase
|
||||||
customBiomeDecorator.reedsPerChunk = -999;
|
customBiomeDecorator.reedsPerChunk = -999;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 1;
|
customBiomeDecorator.wheatGrassPerChunk = 1;
|
||||||
customBiomeDecorator.shrubsPerChunk = 2;
|
customBiomeDecorator.shrubsPerChunk = 2;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class BiomeGenDeadSwamp extends BiomeGenBase
|
||||||
customBiomeDecorator.sandPerChunk2 = -999;
|
customBiomeDecorator.sandPerChunk2 = -999;
|
||||||
customBiomeDecorator.reedsBOPPerChunk = 2;
|
customBiomeDecorator.reedsBOPPerChunk = 2;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 10;
|
customBiomeDecorator.wheatGrassPerChunk = 10;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 3;
|
||||||
spawnableCreatureList.clear();
|
spawnableCreatureList.clear();
|
||||||
spawnableWaterCreatureList.clear();
|
spawnableWaterCreatureList.clear();
|
||||||
waterColorMultiplier = 10661201;
|
waterColorMultiplier = 10661201;
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class BiomeGenDeciduousForest extends BiomeGenBase
|
||||||
customBiomeDecorator.poisonIvyPerChunk = 1;
|
customBiomeDecorator.poisonIvyPerChunk = 1;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 10;
|
customBiomeDecorator.wheatGrassPerChunk = 10;
|
||||||
customBiomeDecorator.shrubsPerChunk = 10;
|
customBiomeDecorator.shrubsPerChunk = 10;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class BiomeGenFen extends BiomeGenBase
|
||||||
customBiomeDecorator.algaePerChunk = 1;
|
customBiomeDecorator.algaePerChunk = 1;
|
||||||
customBiomeDecorator.portobellosPerChunk = 1;
|
customBiomeDecorator.portobellosPerChunk = 1;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 8;
|
customBiomeDecorator.wheatGrassPerChunk = 8;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 6;
|
||||||
customBiomeDecorator.shrubsPerChunk = 7;
|
customBiomeDecorator.shrubsPerChunk = 7;
|
||||||
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class BiomeGenLushSwamp extends BiomeGenBase
|
||||||
customBiomeDecorator.poisonWaterPerChunk = 2;
|
customBiomeDecorator.poisonWaterPerChunk = 2;
|
||||||
customBiomeDecorator.carrotsPerChunk = 1;
|
customBiomeDecorator.carrotsPerChunk = 1;
|
||||||
customBiomeDecorator.shrubsPerChunk = 5;
|
customBiomeDecorator.shrubsPerChunk = 5;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 5;
|
||||||
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
|
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class BiomeGenMangrove extends BiomeGenBase
|
||||||
customBiomeDecorator.deadGrassPerChunk = 9;
|
customBiomeDecorator.deadGrassPerChunk = 9;
|
||||||
customBiomeDecorator.reedsPerChunk = -999;
|
customBiomeDecorator.reedsPerChunk = -999;
|
||||||
customBiomeDecorator.cactiPerChunk = -999;
|
customBiomeDecorator.cactiPerChunk = -999;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 4;
|
||||||
customBiomeDecorator.desertSproutsPerChunk = 1;
|
customBiomeDecorator.desertSproutsPerChunk = 1;
|
||||||
customBiomeDecorator.waterLakesPerChunk = 10;
|
customBiomeDecorator.waterLakesPerChunk = 10;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class BiomeGenMarsh extends BiomeGenBase
|
||||||
customBiomeDecorator.sandPerChunk2 = -999;
|
customBiomeDecorator.sandPerChunk2 = -999;
|
||||||
customBiomeDecorator.mudPerChunk = 1;
|
customBiomeDecorator.mudPerChunk = 1;
|
||||||
customBiomeDecorator.mudPerChunk2 = 1;
|
customBiomeDecorator.mudPerChunk2 = 1;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 10;
|
||||||
customBiomeDecorator.generatePumpkins = false;
|
customBiomeDecorator.generatePumpkins = false;
|
||||||
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class BiomeGenQuagmire extends BiomeGenBase
|
||||||
customBiomeDecorator.sandPerChunk = -999;
|
customBiomeDecorator.sandPerChunk = -999;
|
||||||
customBiomeDecorator.sandPerChunk2 = -999;
|
customBiomeDecorator.sandPerChunk2 = -999;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 3;
|
customBiomeDecorator.wheatGrassPerChunk = 3;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 1;
|
||||||
waterColorMultiplier = 13390080;
|
waterColorMultiplier = 13390080;
|
||||||
customBiomeDecorator.generateQuagmire = true;
|
customBiomeDecorator.generateQuagmire = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class BiomeGenSilkglades extends BiomeGenBase
|
||||||
customBiomeDecorator.sproutsPerChunk = 2;
|
customBiomeDecorator.sproutsPerChunk = 2;
|
||||||
customBiomeDecorator.poisonIvyPerChunk = 2;
|
customBiomeDecorator.poisonIvyPerChunk = 2;
|
||||||
customBiomeDecorator.cobwebsPerChunk = 9;
|
customBiomeDecorator.cobwebsPerChunk = 9;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 3;
|
||||||
customBiomeDecorator.generatePumpkins = true;
|
customBiomeDecorator.generatePumpkins = true;
|
||||||
waterColorMultiplier = 16777079;
|
waterColorMultiplier = 16777079;
|
||||||
spawnableWaterCreatureList.clear();
|
spawnableWaterCreatureList.clear();
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class BiomeGenSludgepit extends BiomeGenBase
|
||||||
customBiomeDecorator.deadBushPerChunk = 5;
|
customBiomeDecorator.deadBushPerChunk = 5;
|
||||||
customBiomeDecorator.algaePerChunk = 2;
|
customBiomeDecorator.algaePerChunk = 2;
|
||||||
customBiomeDecorator.poisonWaterPerChunk = 5;
|
customBiomeDecorator.poisonWaterPerChunk = 5;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 4;
|
||||||
spawnableCreatureList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
|
spawnableCreatureList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
|
||||||
waterColorMultiplier = 11506176;
|
waterColorMultiplier = 11506176;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class BiomeGenWetland extends BiomeGenBase
|
||||||
customBiomeDecorator.portobellosPerChunk = 1;
|
customBiomeDecorator.portobellosPerChunk = 1;
|
||||||
customBiomeDecorator.berryBushesPerChunk = 1;
|
customBiomeDecorator.berryBushesPerChunk = 1;
|
||||||
customBiomeDecorator.shrubsPerChunk = 10;
|
customBiomeDecorator.shrubsPerChunk = 10;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 7;
|
||||||
spawnableCreatureList.clear();
|
spawnableCreatureList.clear();
|
||||||
spawnableWaterCreatureList.clear();
|
spawnableWaterCreatureList.clear();
|
||||||
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
||||||
|
|
|
@ -26,6 +26,7 @@ public class BiomeGenBeachOvergrown extends BiomeGenBase
|
||||||
customBiomeDecorator.duneGrassPerChunk = 25;
|
customBiomeDecorator.duneGrassPerChunk = 25;
|
||||||
customBiomeDecorator.cactiPerChunk = 5;
|
customBiomeDecorator.cactiPerChunk = 5;
|
||||||
customBiomeDecorator.outbackPerChunk = 7;
|
customBiomeDecorator.outbackPerChunk = 7;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class BiomeGenSwampNew extends BiomeGenBase
|
||||||
customBiomeDecorator.mudPerChunk = 9;
|
customBiomeDecorator.mudPerChunk = 9;
|
||||||
customBiomeDecorator.mudPerChunk2 = 9;
|
customBiomeDecorator.mudPerChunk2 = 9;
|
||||||
customBiomeDecorator.portobellosPerChunk = 1;
|
customBiomeDecorator.portobellosPerChunk = 1;
|
||||||
|
customBiomeDecorator.waterReedsPerChunk = 5;
|
||||||
waterColorMultiplier = 14745456;
|
waterColorMultiplier = 14745456;
|
||||||
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
|
spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
|
||||||
}
|
}
|
||||||
|
|
29
common/biomesoplenty/worldgen/WorldGenWaterReeds.java
Normal file
29
common/biomesoplenty/worldgen/WorldGenWaterReeds.java
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
package biomesoplenty.worldgen;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
|
import biomesoplenty.api.Blocks;
|
||||||
|
|
||||||
|
public class WorldGenWaterReeds extends WorldGenerator
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
|
||||||
|
{
|
||||||
|
for (int var6 = 0; var6 < 64; ++var6)
|
||||||
|
{
|
||||||
|
int var7 = par3 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
||||||
|
int var8 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
||||||
|
int var9 = par5 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
||||||
|
|
||||||
|
if (par1World.isAirBlock(var7, var8, var9) && par1World.getBlockId(var7, var8 - 1, var9) == Block.waterStill.blockID)
|
||||||
|
{
|
||||||
|
par1World.setBlock(var7, var8, var9, Blocks.plants.get().blockID, 14, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 456 B |
Binary file not shown.
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 610 B |
Binary file not shown.
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 508 B |
Loading…
Reference in a new issue