Merge branch 'master' of https://github.com/BiomesOPlenty/BiomesOPlenty
This commit is contained in:
commit
16d47fd83e
13 changed files with 215 additions and 74 deletions
|
@ -17,7 +17,7 @@ public class BiomeGenBadlands extends BiomeGenBase
|
|||
{
|
||||
super(par1);
|
||||
spawnableCreatureList.clear();
|
||||
topBlock = (byte)Blocks.hardSand.get().blockID;
|
||||
topBlock = (byte)Block.field_111032_cD.blockID;
|
||||
fillerBlock = (byte)Block.blockClay.blockID;
|
||||
theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||||
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.Blocks;
|
||||
|
@ -28,6 +30,7 @@ public class BiomeGenChaparral extends BiomeGenBase
|
|||
customBiomeDecorator.berryBushesPerChunk = 2;
|
||||
customBiomeDecorator.generateStoneInGrass = true;
|
||||
customBiomeDecorator.generatePumpkins = false;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.Blocks;
|
||||
import biomesoplenty.worldgen.WorldGenLargeTree;
|
||||
|
@ -22,6 +24,7 @@ public class BiomeGenField extends BiomeGenBase
|
|||
customBiomeDecorator.flowersPerChunk = 1;
|
||||
customBiomeDecorator.grassPerChunk = 999;
|
||||
customBiomeDecorator.generatePumpkins = false;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,6 +16,7 @@ import biomesoplenty.worldgen.WorldGenMoss;
|
|||
import biomesoplenty.worldgen.WorldGenPrairie;
|
||||
import biomesoplenty.worldgen.WorldGenSwampTall;
|
||||
import biomesoplenty.worldgen.WorldGenThickTree2;
|
||||
import biomesoplenty.worldgen.WorldGenThickTree3;
|
||||
import biomesoplenty.worldgen.WorldGenWillow;
|
||||
|
||||
public class BiomeGenFungiForest extends BiomeGenBase
|
||||
|
@ -73,7 +74,7 @@ public class BiomeGenFungiForest extends BiomeGenBase
|
|||
@Override
|
||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||||
{
|
||||
return par1Random.nextInt(2) == 0 ? new WorldGenThickTree2(false) : (par1Random.nextInt(5) == 0 ? new WorldGenWillow() : (par1Random.nextInt(3) == 0 ? new WorldGenPrairie(false) : new WorldGenSwampTall()));
|
||||
return par1Random.nextInt(2) == 0 ? new WorldGenThickTree2(false) : (par1Random.nextInt(7) == 0 ? new WorldGenThickTree3(false) : (par1Random.nextInt(3) == 0 ? new WorldGenPrairie(false) : new WorldGenSwampTall()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Random;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityChicken;
|
||||
import net.minecraft.entity.passive.EntityCow;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.entity.passive.EntityPig;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -39,6 +40,7 @@ public class BiomeGenGrassland extends BiomeGenBase
|
|||
spawnableCreatureList.add(new SpawnListEntry(EntityPig.class, 12, 4, 4));
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 12, 4, 4));
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityCow.class, 10, 4, 4));
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.Blocks;
|
||||
|
@ -26,6 +28,7 @@ public class BiomeGenHeathland extends BiomeGenBase
|
|||
customBiomeDecorator.deadBushPerChunk = 2;
|
||||
customBiomeDecorator.berryBushesPerChunk = 1;
|
||||
customBiomeDecorator.generatePumpkins = false;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.Blocks;
|
||||
import biomesoplenty.worldgen.WorldGenApple;
|
||||
|
@ -27,6 +29,7 @@ public class BiomeGenOrchard extends BiomeGenBase
|
|||
customBiomeDecorator.sunflowersPerChunk = 1;
|
||||
customBiomeDecorator.lilyflowersPerChunk = 2;
|
||||
customBiomeDecorator.berryBushesPerChunk = 3;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.Blocks;
|
||||
|
@ -24,6 +26,7 @@ public class BiomeGenPlainsNew extends BiomeGenBase
|
|||
customBiomeDecorator.tinyFlowersPerChunk = 1;
|
||||
customBiomeDecorator.portobellosPerChunk = 1;
|
||||
customBiomeDecorator.sunflowersPerChunk = 2;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.Blocks;
|
||||
|
@ -24,6 +26,7 @@ public class BiomeGenPrairie extends BiomeGenBase
|
|||
customBiomeDecorator.whiteFlowersPerChunk = 45;
|
||||
customBiomeDecorator.portobellosPerChunk = 2;
|
||||
customBiomeDecorator.berryBushesPerChunk = 2;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenShrub;
|
||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
@ -24,6 +26,7 @@ public class BiomeGenShrubland extends BiomeGenBase
|
|||
customBiomeDecorator.grassPerChunk = 5;
|
||||
customBiomeDecorator.bushesPerChunk = 7;
|
||||
customBiomeDecorator.generatePumpkins = false;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,8 +3,10 @@ package biomesoplenty.biomes;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.Blocks;
|
||||
|
@ -28,6 +30,7 @@ public class BiomeGenSteppe extends BiomeGenBase
|
|||
customBiomeDecorator.steppePerChunk = 6;
|
||||
customBiomeDecorator.aloePerChunk = 2;
|
||||
customBiomeDecorator.generatePumpkins = false;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,7 @@ public class WorldGenThickTree2 extends WorldGenerator
|
|||
@Override
|
||||
public boolean generate(World var1, Random var2, int var3, int var4, int var5)
|
||||
{
|
||||
int var6 = var2.nextInt(8) + 16;
|
||||
int var6 = var2.nextInt(8) + 10;
|
||||
int var7 = var2.nextInt(8) + 0;
|
||||
int var8 = var6 - var7;
|
||||
int var9 = 2 + var2.nextInt(2);
|
||||
|
@ -69,22 +69,10 @@ public class WorldGenThickTree2 extends WorldGenerator
|
|||
else
|
||||
{
|
||||
var11 = var1.getBlockId(var3, var4 - 1, var5);
|
||||
var24 = var1.getBlockId(var3 - 1, var4 - 1, var5);
|
||||
var13 = var1.getBlockId(var3, var4 - 1, var5 - 1);
|
||||
var14 = var1.getBlockId(var3 - 1, var4 - 1, var5 - 1);
|
||||
|
||||
if ((var11 == Block.grass.blockID || var11 == Block.dirt.blockID) && var4 < 256 - var6 - 1)
|
||||
{
|
||||
if ((var24 == Block.grass.blockID || var24 == Block.dirt.blockID) && var4 < 256 - var6 - 1)
|
||||
{
|
||||
if ((var13 == Block.grass.blockID || var24 == Block.dirt.blockID) && var4 < 256 - var6 - 1)
|
||||
{
|
||||
if ((var14 == Block.grass.blockID || var24 == Block.dirt.blockID) && var4 < 256 - var6 - 1)
|
||||
{
|
||||
var1.setBlock(var3, var4 - 1, var5, Block.dirt.blockID);
|
||||
var1.setBlock(var3 - 1, var4 - 1, var5, Block.dirt.blockID);
|
||||
var1.setBlock(var3, var4 - 1, var5 - 1, Block.dirt.blockID);
|
||||
var1.setBlock(var3 - 1, var4 - 1, var5 - 1, Block.dirt.blockID);
|
||||
var15 = var2.nextInt(2);
|
||||
int var16 = 1;
|
||||
boolean var17 = false;
|
||||
|
@ -107,9 +95,6 @@ public class WorldGenThickTree2 extends WorldGenerator
|
|||
if ((Math.abs(var21) != var15 || Math.abs(var23) != var15 || var15 <= 0) && !Block.opaqueCubeLookup[var1.getBlockId(var20, var19, var22)])
|
||||
{
|
||||
this.setBlockAndMetadata(var1, var20, var19, var22, Block.leaves.blockID, 0);
|
||||
this.setBlockAndMetadata(var1, var20 - 1, var19, var22, Block.leaves.blockID, 0);
|
||||
this.setBlockAndMetadata(var1, var20, var19, var22 - 1, Block.leaves.blockID, 0);
|
||||
this.setBlockAndMetadata(var1, var20 - 1, var19, var22 - 1, Block.leaves.blockID, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -140,21 +125,12 @@ public class WorldGenThickTree2 extends WorldGenerator
|
|||
if (var20 == 0 || var20 == Block.leaves.blockID)
|
||||
{
|
||||
this.setBlockAndMetadata(var1, var3, var4 + var19, var5, Block.wood.blockID, 0);
|
||||
this.setBlockAndMetadata(var1, var3 - 1, var4 + var19, var5, Block.wood.blockID, 0);
|
||||
this.setBlockAndMetadata(var1, var3, var4 + var19, var5 - 1, Block.wood.blockID, 0);
|
||||
this.setBlockAndMetadata(var1, var3 - 1, var4 + var19, var5 - 1, Block.wood.blockID, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
} else
|
||||
return false;
|
||||
} else
|
||||
return false;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
return false;
|
||||
|
|
138
src/minecraft/biomesoplenty/worldgen/WorldGenThickTree3.java
Normal file
138
src/minecraft/biomesoplenty/worldgen/WorldGenThickTree3.java
Normal file
|
@ -0,0 +1,138 @@
|
|||
package biomesoplenty.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class WorldGenThickTree3 extends WorldGenerator
|
||||
{
|
||||
public WorldGenThickTree3(boolean var1)
|
||||
{
|
||||
super(var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(World var1, Random var2, int var3, int var4, int var5)
|
||||
{
|
||||
int var6 = var2.nextInt(15) + 25;
|
||||
int var7 = var2.nextInt(8) + 5;
|
||||
int var8 = var6 - var7;
|
||||
int var9 = 3 + var2.nextInt(1);
|
||||
boolean var10 = true;
|
||||
|
||||
if (var4 >= 1 && var4 + var6 + 1 <= 256)
|
||||
{
|
||||
int var11;
|
||||
int var13;
|
||||
int var14;
|
||||
int var15;
|
||||
int var24;
|
||||
|
||||
for (var11 = var4; var11 <= var4 + 1 + var6 && var10; ++var11)
|
||||
{
|
||||
boolean var12 = true;
|
||||
|
||||
if (var11 - var4 < var7)
|
||||
{
|
||||
var24 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var24 = var9;
|
||||
}
|
||||
|
||||
for (var13 = var3 - var24; var13 <= var3 + var24 && var10; ++var13)
|
||||
{
|
||||
for (var14 = var5 - var24; var14 <= var5 + var24 && var10; ++var14)
|
||||
{
|
||||
if (var11 >= 0 && var11 < 256)
|
||||
{
|
||||
var15 = var1.getBlockId(var13, var11, var14);
|
||||
|
||||
if (var15 != 0 && var15 != Block.leaves.blockID)
|
||||
{
|
||||
var10 = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var10 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!var10)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
var11 = var1.getBlockId(var3, var4 - 1, var5);
|
||||
|
||||
if ((var11 == Block.grass.blockID || var11 == Block.dirt.blockID) && var4 < 256 - var6 - 1)
|
||||
{
|
||||
var1.setBlock(var3, var4 - 1, var5, Block.dirt.blockID);
|
||||
var15 = var2.nextInt(2);
|
||||
int var16 = 1;
|
||||
boolean var17 = false;
|
||||
int var19;
|
||||
int var18;
|
||||
int var20;
|
||||
|
||||
for (var18 = 0; var18 <= var8; ++var18)
|
||||
{
|
||||
var19 = var4 + var6 - var18;
|
||||
|
||||
for (var20 = var3 - var15; var20 <= var3 + var15; ++var20)
|
||||
{
|
||||
int var21 = var20 - var3;
|
||||
|
||||
for (int var22 = var5 - var15; var22 <= var5 + var15; ++var22)
|
||||
{
|
||||
int var23 = var22 - var5;
|
||||
|
||||
if ((Math.abs(var21) != var15 || Math.abs(var23) != var15 || var15 <= 0) && !Block.opaqueCubeLookup[var1.getBlockId(var20, var19, var22)])
|
||||
{
|
||||
this.setBlockAndMetadata(var1, var20, var19, var22, Block.leaves.blockID, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (var15 >= var16)
|
||||
{
|
||||
var15 = var17 ? 1 : 0;
|
||||
var17 = true;
|
||||
++var16;
|
||||
|
||||
if (var16 > var9)
|
||||
{
|
||||
var16 = var9;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++var15;
|
||||
}
|
||||
}
|
||||
|
||||
var18 = var2.nextInt(3);
|
||||
|
||||
for (var19 = 0; var19 < var6 - var18; ++var19)
|
||||
{
|
||||
var20 = var1.getBlockId(var3, var4 + var19, var5);
|
||||
|
||||
if (var20 == 0 || var20 == Block.leaves.blockID)
|
||||
{
|
||||
this.setBlockAndMetadata(var1, var3, var4 + var19, var5, Block.wood.blockID, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue