uploaded old source code

This commit is contained in:
ted80-PC 2013-03-28 20:03:53 +01:00
parent 98e219d12a
commit 6c9f7b2039
410 changed files with 65072 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,26 @@
package tdwp_ftw.biomesop;
import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
MinecraftForgeClient.preloadTexture(BLOCK_PNG);
MinecraftForgeClient.preloadTexture(ITEMS_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_MUD1_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_MUD2_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST1_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST2_PNG);
}
@Override
public int addArmor(String armor)
{
return RenderingRegistry.addNewArmourRendererPrefix(armor);
}
}

View file

@ -0,0 +1,20 @@
package tdwp_ftw.biomesop;
public class CommonProxy {
public static String BLOCK_PNG = "/tdwp_ftw/biomesop/res/block.png";
public static String ITEMS_PNG = "/tdwp_ftw/biomesop/res/items.png";
public static String ARMOR_MUD1_PNG = "/tdwp_ftw/biomesop/res/armor/mud_1.png";
public static String ARMOR_MUD2_PNG = "/tdwp_ftw/biomesop/res/armor/mud_2.png";
public static String ARMOR_AMETHYST1_PNG = "/tdwp_ftw/biomesop/res/armor/amethyst_1.png";
public static String ARMOR_AMETHYST2_PNG = "/tdwp_ftw/biomesop/res/armor/amethyst_2.png";
// Client stuff
public void registerRenderers() {
// Nothing here as the server doesn't render graphics!
}
public int addArmor(String armor)
{
return 0;
}
}

View file

@ -0,0 +1,25 @@
package tdwp_ftw.biomesop.armor;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IArmorTextureProvider;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.CommonProxy;
public class ArmorAmethyst extends ItemArmor implements IArmorTextureProvider
{
public ArmorAmethyst(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTextureFile(ItemStack par1) {
if(par1.itemID == mod_BiomesOPlenty.helmetAmethyst.itemID||par1.itemID == mod_BiomesOPlenty.chestplateAmethyst.itemID||par1.itemID == mod_BiomesOPlenty.bootsAmethyst.itemID){
return CommonProxy.ARMOR_AMETHYST1_PNG;
}
if(par1.itemID == mod_BiomesOPlenty.leggingsAmethyst.itemID){
return CommonProxy.ARMOR_AMETHYST2_PNG;
}
return null;
}
}

View file

@ -0,0 +1,25 @@
package tdwp_ftw.biomesop.armor;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IArmorTextureProvider;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.CommonProxy;
public class ArmorMuddy extends ItemArmor implements IArmorTextureProvider
{
public ArmorMuddy(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTextureFile(ItemStack par1) {
if(par1.itemID == mod_BiomesOPlenty.helmetMud.itemID||par1.itemID == mod_BiomesOPlenty.chestplateMud.itemID||par1.itemID == mod_BiomesOPlenty.bootsMud.itemID){
return CommonProxy.ARMOR_MUD1_PNG;
}
if(par1.itemID == mod_BiomesOPlenty.leggingsMud.itemID){
return CommonProxy.ARMOR_MUD2_PNG;
}
return null;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,36 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga6;
import tdwp_ftw.biomesop.worldgen.WorldGenAlpsSpruce;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenAlps extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenAlps(int par1)
{
super(par1);
this.topBlock = (byte)Block.stone.blockID;
this.fillerBlock = (byte)Block.stone.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenTaiga6(false);
}
}

View file

@ -0,0 +1,48 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga3;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga4;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga9;
import tdwp_ftw.biomesop.worldgen.WorldGenFir1;
import tdwp_ftw.biomesop.worldgen.WorldGenFir2;
import tdwp_ftw.biomesop.worldgen.WorldGenFir3;
public class BiomeGenArctic extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenArctic(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 3;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenTaiga3(false) : (par1Random.nextInt(3) == 0 ? new WorldGenTaiga4(false) : new WorldGenTaiga9(false)));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
}

View file

@ -0,0 +1,57 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenBadlands extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenBadlands(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)Block.sandStone.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.hardSand.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.deadBushPerChunk = 4;
this.customBiomeDecorator.reedsPerChunk = -999;
this.customBiomeDecorator.cactiPerChunk = 2;
this.customBiomeDecorator.clayPerChunk = 3;
this.customBiomeDecorator.generateClayInStone = true;
this.customBiomeDecorator.generateSandInStone = true;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 13421723;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,81 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenBambooTree;
public class BiomeGenBambooForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenBambooForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 30;
this.customBiomeDecorator.grassPerChunk = 5;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.bushesPerChunk = 5;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenShrub(0, 0) : new WorldGenBambooTree(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 9430372;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 9430372;
}
}

View file

@ -0,0 +1,107 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenBayou1;
import tdwp_ftw.biomesop.worldgen.WorldGenBayou2;
import tdwp_ftw.biomesop.worldgen.WorldGenBayou3;
import tdwp_ftw.biomesop.worldgen.WorldGenCypress1;
import tdwp_ftw.biomesop.worldgen.WorldGenCypress2;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
public class BiomeGenBayou extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenBayou(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 15;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.reedsPerChunk = 25;
this.customBiomeDecorator.mudPerChunk = 1;
this.customBiomeDecorator.mudPerChunk2 = 1;
this.customBiomeDecorator.toadstoolsPerChunk = 2;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.waterlilyPerChunk = 2;
this.customBiomeDecorator.cattailsPerChunk = 1;
this.customBiomeDecorator.algaePerChunk = 1;
this.customBiomeDecorator.generatePumpkins = false;
this.waterColorMultiplier = 16767282;
this.spawnableWaterCreatureList.clear();
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(8) == 0 ? new WorldGenBayou3() : (par1Random.nextInt(2) == 0 ? new WorldGenBayou1() : new WorldGenBayou2()));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 9154411;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11591816;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 11322556;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,64 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenSilverBirch1;
import tdwp_ftw.biomesop.worldgen.WorldGenSilverBirch2;
public class BiomeGenBirchForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenBirchForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 5;
this.customBiomeDecorator.grassPerChunk = 3;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.tinyFlowersPerChunk = 6;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return this.worldGeneratorForest;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
}

View file

@ -0,0 +1,99 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntitySlime;
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 tdwp_ftw.biomesop.worldgen.WorldGenBog1;
import tdwp_ftw.biomesop.worldgen.WorldGenBog2;
public class BiomeGenBog extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenBog(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 30;
this.customBiomeDecorator.grassPerChunk = 30;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.mudPerChunk = 5;
this.customBiomeDecorator.mudPerChunk2 = 5;
this.customBiomeDecorator.deadBushPerChunk = 5;
this.customBiomeDecorator.algaePerChunk = 2;
this.spawnableCreatureList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
this.waterColorMultiplier = 11506176;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenBog2() : new WorldGenBog1());
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(9) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 0) : new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 7627817;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 9539892;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 7039816;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,61 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityWolf;
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 tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
import tdwp_ftw.biomesop.worldgen.WorldGenAutumn;
import net.minecraft.world.gen.feature.WorldGenShrub;
public class BiomeGenBorealForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenBorealForest(int par1)
{
super(par1);
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 25;
this.customBiomeDecorator.grassPerChunk = 50;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? this.worldGeneratorTrees : (par1Random.nextInt(5) == 0 ? new WorldGenShrub(0,0) : (par1Random.nextInt(3) == 0 ? new WorldGenAutumn(false) : (par1Random.nextInt(3) == 0 ? this.worldGeneratorForest : new WorldGenTaiga5(false)))));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 10467185;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 13225573;
}
}

View file

@ -0,0 +1,46 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import tdwp_ftw.biomesop.worldgen.WorldGenCanyonShrub;
import tdwp_ftw.biomesop.worldgen.WorldGenCanyonTree;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenCanyon extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenCanyon(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.topBlock = (byte)mod_BiomesOPlenty.hardDirt.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.hardDirt.blockID;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.tinyCactiPerChunk = 2;
this.customBiomeDecorator.generatePumpkins = false;
//this.customBiomeDecorator.generateCanyon = true;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenCanyonTree() : new WorldGenCanyonShrub(0,0));
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11123300;
}
}

View file

@ -0,0 +1,75 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import tdwp_ftw.biomesop.worldgen.WorldGenChaparral1;
import tdwp_ftw.biomesop.worldgen.WorldGenChaparral2;
import tdwp_ftw.biomesop.worldgen.WorldGenChaparral3;
public class BiomeGenChaparral extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenChaparral(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 8;
this.customBiomeDecorator.grassPerChunk = 20;
this.customBiomeDecorator.bushesPerChunk = 10;
this.customBiomeDecorator.generateStoneInGrass = true;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenChaparral2() : (par1Random.nextInt(5) == 0 ? new WorldGenChaparral1(0, 0) : new WorldGenChaparral3()));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 12638301;
}
}

View file

@ -0,0 +1,43 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenCherry1;
import tdwp_ftw.biomesop.worldgen.WorldGenCherry2;
public class BiomeGenCherryBlossomGrove extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenCherryBlossomGrove(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 5;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.pinkFlowersPerChunk = 15;
this.customBiomeDecorator.whiteFlowersPerChunk = 30;
this.customBiomeDecorator.tinyFlowersPerChunk = 25;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenCherry2(false) : new WorldGenCherry1(false));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 10747818;
}
}

View file

@ -0,0 +1,70 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityWolf;
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 tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenFir1;
import tdwp_ftw.biomesop.worldgen.WorldGenFir2;
import tdwp_ftw.biomesop.worldgen.WorldGenFir3;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga3;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga4;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga9;
public class BiomeGenConiferousForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenConiferousForest(int par1)
{
super(par1);
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 8, 4, 4));
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 6;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.toadstoolsPerChunk = 3;
this.customBiomeDecorator.violetsPerChunk = 2;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenTaiga3(false) : (par1Random.nextInt(3) == 0 ? new WorldGenTaiga4(false) : new WorldGenTaiga9(false)));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
}

View file

@ -0,0 +1,56 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenCrag;
public class BiomeGenCrag extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenCrag(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.topBlock = (byte)mod_BiomesOPlenty.cragRock.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.cragRock.blockID;
this.waterColorMultiplier = 944693;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 4944498;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,81 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree2;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
public class BiomeGenDeadForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenDeadForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 3;
this.customBiomeDecorator.grassPerChunk = 1;
this.customBiomeDecorator.thornsPerChunk = 2;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.reedsPerChunk = -999;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(9) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 0) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenDeadTree(false) : (par1Random.nextInt(4) == 0 ? new WorldGenTaiga5(false): new WorldGenDeadTree2(false)));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 12362085;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 9873591;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,86 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree;
public class BiomeGenDeadSwamp extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenDeadSwamp(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 2;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.highGrassPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.reedsPerChunk = -999;
this.customBiomeDecorator.mudPerChunk = 3;
this.customBiomeDecorator.mudPerChunk2 = 3;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.waterColorMultiplier = 10661201;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(9) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenDeadTree(false);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 6713420;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 6451816;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,106 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.passive.EntityBat;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree3;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadlands;
public class BiomeGenDeadlands extends BiomeGenBase
{
private WorldGenerator theWorldGenerator;
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenDeadlands(int par1)
{
super(par1);
this.topBlock = (byte)mod_BiomesOPlenty.ash.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.ash.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 1;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.mushroomsPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.lavaLakesPerChunk = 25;
this.customBiomeDecorator.generatePits = true;
this.customBiomeDecorator.generateSmolderingGrass = true;
this.waterColorMultiplier = 16711680;
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityCreeper.class, 30, 1, 7));
this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityBat.class, 10, 8, 8));
this.theWorldGenerator = new WorldGenMinable(Block.silverfish.blockID, 8);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenDeadTree3(false);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return new WorldGenDeadlands();
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
int var6;
int var7;
int var8;
for (var5 = 0; var5 < 7; ++var5)
{
var6 = par3 + par2Random.nextInt(16);
var7 = par2Random.nextInt(64);
var8 = par4 + par2Random.nextInt(16);
this.theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
}
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 4464929;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,60 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraft.world.gen.feature.WorldGenShrub;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenDeciduous;
public class BiomeGenDeciduousForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenDeciduousForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 15;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.toadstoolsPerChunk = 1;
this.customBiomeDecorator.bushesPerChunk = 8;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(4) == 0 ? new WorldGenShrub(2,2) : new WorldGenDeciduous(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(5) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 12695369;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 12896570;
}
}

View file

@ -0,0 +1,43 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenDesertWells;
public class BiomeGenDesertNew extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenDesertNew(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)Block.sand.blockID;
this.fillerBlock = (byte)Block.sand.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.deadBushPerChunk = 2;
this.customBiomeDecorator.reedsPerChunk = 50;
this.customBiomeDecorator.cactiPerChunk = 10;
this.customBiomeDecorator.desertSproutsPerChunk = 1;
this.customBiomeDecorator.tinyCactiPerChunk = 5;
this.customBiomeDecorator.quicksand2PerChunk = 6;
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
if (par2Random.nextInt(1000) == 0)
{
int var5 = par3 + par2Random.nextInt(16) + 8;
int var6 = par4 + par2Random.nextInt(16) + 8;
WorldGenDesertWells var7 = new WorldGenDesertWells();
var7.generate(par1World, par2Random, var5, par1World.getHeightValue(var5, var6) + 1, var6);
}
}
}

View file

@ -0,0 +1,47 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenDrylands extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenDrylands(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 4;
this.customBiomeDecorator.thornsPerChunk = 4;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.quicksandPerChunk = 4;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenShrub(0, 0) : this.worldGeneratorTrees);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 13404780;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 13407596;
}
}

View file

@ -0,0 +1,56 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenDunes extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenDunes(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)Block.sand.blockID;
this.fillerBlock = (byte)Block.sand.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.deadBushPerChunk = -999;
this.customBiomeDecorator.duneGrassPerChunk = 10;
this.customBiomeDecorator.desertSproutsPerChunk = 5;
this.customBiomeDecorator.reedsPerChunk = -999;
this.customBiomeDecorator.generateLakes = false;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 14203007;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,86 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.World;
import net.minecraft.block.Block;
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 tdwp_ftw.biomesop.worldgen.WorldGenFen1;
import tdwp_ftw.biomesop.worldgen.WorldGenFen2;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
public class BiomeGenFen extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenFen(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.highGrassPerChunk = 1;
this.customBiomeDecorator.waterlilyPerChunk = 1;
this.customBiomeDecorator.cattailsPerChunk = 1;
this.customBiomeDecorator.pondsPerChunk = 99;
this.customBiomeDecorator.toadstoolsPerChunk = 2;
this.customBiomeDecorator.mushroomsPerChunk = 8;
this.customBiomeDecorator.mudPerChunk = 1;
this.customBiomeDecorator.mudPerChunk2 = 1;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.algaePerChunk = 1;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenFen2(false) : (par1Random.nextInt(20) == 0 ? new WorldGenDeadTree(false) : new WorldGenFen1()));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return (par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : (par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1)));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 12240001;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 13547897;
}
}

View file

@ -0,0 +1,49 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga8;
public class BiomeGenField extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenField(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = 1;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(4) == 0 ? new WorldGenTaiga5(false) : (par1Random.nextInt(8) == 0 ? new WorldGenTaiga8(false) : (par1Random.nextInt(2) == 0 ? this.worldGeneratorTrees : new WorldGenShrub(0,0))));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 11186770;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 10467150;
}
}

View file

@ -0,0 +1,56 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenWhiteOak1;
import tdwp_ftw.biomesop.worldgen.WorldGenWhiteOak2;
import tdwp_ftw.biomesop.worldgen.WorldGenAlder1;
import tdwp_ftw.biomesop.worldgen.WorldGenAlder2;
import tdwp_ftw.biomesop.worldgen.WorldGenPaperBirch1;
import tdwp_ftw.biomesop.worldgen.WorldGenPaperBirch2;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
public class BiomeGenForestNew extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenForestNew(int par1)
{
super(par1);
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 2;
this.customBiomeDecorator.hydrangeasPerChunk = 2;
this.customBiomeDecorator.whiteFlowersPerChunk = 1;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenWhiteOak1() : (par1Random.nextInt(5) == 0 ? new WorldGenAlder2() : (par1Random.nextInt(8) == 0 ? new WorldGenAlder1() : (par1Random.nextInt(4) == 0 ? new WorldGenPaperBirch2() : (par1Random.nextInt(7) == 0 ? new WorldGenPaperBirch1() : new WorldGenWhiteOak2())))));
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? this.worldGeneratorForest : (par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : this.worldGeneratorTrees));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
}

View file

@ -0,0 +1,77 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenFrostForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenFrostForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 3;
this.customBiomeDecorator.grassPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.mushroomsPerChunk = -999;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return this.worldGeneratorTrees;
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 11261628;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11261628;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 13557994;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,105 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.entity.passive.EntityMooshroom;
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 tdwp_ftw.biomesop.worldgen.WorldGenSwampTall;
import tdwp_ftw.biomesop.worldgen.WorldGenThickTree;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
public class BiomeGenFungiForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenFungiForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 4;
this.customBiomeDecorator.grassPerChunk = 5;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.mushroomsPerChunk = 8;
this.customBiomeDecorator.bigMushroomsPerChunk = 4;
this.customBiomeDecorator.toadstoolsPerChunk = 5;
this.customBiomeDecorator.blueFlowersPerChunk = 3;
this.customBiomeDecorator.generateMycelium = true;
this.customBiomeDecorator.generatePumpkins = false;
this.waterColorMultiplier = 65326;
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityMooshroom.class, 3, 4, 8));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenThickTree(false) : new WorldGenSwampTall());
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 5359235;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 5359235;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 5888980;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,90 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
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 tdwp_ftw.biomesop.worldgen.WorldGenGiantFlowerRed;
import tdwp_ftw.biomesop.worldgen.WorldGenGiantFlowerYellow;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.mobs.EntityRosester;
public class BiomeGenGarden extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenGarden(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = 20;
this.customBiomeDecorator.whiteFlowersPerChunk = 25;
this.customBiomeDecorator.tinyFlowersPerChunk = 15;
this.customBiomeDecorator.sproutsPerChunk = 1;
this.customBiomeDecorator.rosesPerChunk = 20;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.bushesPerChunk = 10;
this.customBiomeDecorator.generatePumpkins = false;
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityRosester.class, 10, 4, 4));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenGiantFlowerRed() : new WorldGenGiantFlowerYellow());
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 3785757;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 5364530;
}
}

View file

@ -0,0 +1,24 @@
package tdwp_ftw.biomesop.biomes;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenGlacier extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenGlacier(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)mod_BiomesOPlenty.hardIce.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.hardIce.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
}
}

View file

@ -0,0 +1,76 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.passive.EntitySheep;
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;
public class BiomeGenGrassland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenGrassland(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = 2;
this.customBiomeDecorator.reedsPerChunk = 25;
this.customBiomeDecorator.mushroomsPerChunk = 20;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.waterLakesPerChunk = 15;
this.customBiomeDecorator.generatePumpkins = false;
this.spawnableCreatureList.add(new SpawnListEntry(EntitySheep.class, 14, 4, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityPig.class, 12, 4, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 12, 4, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class, 10, 4, 4));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 8379261;
}
}

View file

@ -0,0 +1,49 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenGrove extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenGrove(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 6;
this.customBiomeDecorator.flowersPerChunk = 5;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.sproutsPerChunk = 2;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenShrub(2,2) : this.worldGeneratorBigTree);
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenNorwaySpruce1() : new WorldGenNorwaySpruce2());
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 8298592;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 7445333;
}
}

View file

@ -0,0 +1,50 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenHeath;
public class BiomeGenHeathland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenHeathland(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 2;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.purpleFlowersPerChunk = 30;
this.customBiomeDecorator.deadBushPerChunk = 2;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenShrub(0, 0) : new WorldGenHeath(false));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 13550967;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11454081;
}
}

View file

@ -0,0 +1,20 @@
package tdwp_ftw.biomesop.biomes;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenHighland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenHighland(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.highGrassPerChunk = 25;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.potatoesPerChunk = -999;
this.customBiomeDecorator.generateBoulders = true;
}
}

View file

@ -0,0 +1,54 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenHillsNew extends BiomeGenBase
{
private WorldGenerator theWorldGenerator;
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenHillsNew(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.violetsPerChunk = 5;
this.theWorldGenerator = new WorldGenMinable(Block.silverfish.blockID, 8);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
int var6;
int var7;
int var8;
for (var6 = 0; var6 < var5; ++var6)
{
var7 = par3 + par2Random.nextInt(16);
var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
for (var5 = 0; var5 < 7; ++var5)
{
var6 = par3 + par2Random.nextInt(16);
var7 = par2Random.nextInt(64);
var8 = par4 + par2Random.nextInt(16);
this.theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
}
}
}

View file

@ -0,0 +1,25 @@
package tdwp_ftw.biomesop.biomes;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.block.Block;
public class BiomeGenIceSheet extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenIceSheet(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)Block.ice.blockID;
this.fillerBlock = (byte)Block.ice.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
}
}

View file

@ -0,0 +1,67 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenIceTree;
import net.minecraft.entity.monster.EntitySnowman;
import net.minecraft.world.biome.SpawnListEntry;
public class BiomeGenIcyHills extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenIcyHills(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)Block.blockSnow.blockID;
this.fillerBlock = (byte)Block.blockSnow.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 2;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = -999;
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnowman.class, 30, 2, 4));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenIceTree(false);
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 16777215;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,98 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import tdwp_ftw.biomesop.worldgen.WorldGenJadeTree;
import net.minecraft.world.gen.feature.WorldGenTaiga2;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
public class BiomeGenJadeCliffs extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenJadeCliffs(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 12;
this.customBiomeDecorator.grassPerChunk = 3;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(4) == 0 ? new WorldGenShrub(0, 1) : new WorldGenJadeTree(false));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 12045485;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 8168808;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 9096298;
}
}

View file

@ -0,0 +1,120 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenHugeTrees;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenVines;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenBrazilNut1;
import tdwp_ftw.biomesop.worldgen.WorldGenBrazilNut2;
import tdwp_ftw.biomesop.worldgen.WorldGenSandboxTree1;
import tdwp_ftw.biomesop.worldgen.WorldGenSandboxTree2;
import tdwp_ftw.biomesop.mobs.EntityJungleSpider;
public class BiomeGenJungleNew extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenJungleNew(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 45;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.flowersPerChunk = 4;
this.customBiomeDecorator.orangeFlowersPerChunk = 5;
this.customBiomeDecorator.quicksandPerChunk = 1;
this.customBiomeDecorator.generateMelons = true;
this.waterColorMultiplier = 10745289;
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 10, 4, 4));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
//return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenBrazilNut1() : (par1Random.nextInt(10) == 0 ? new WorldGenSandboxTree1() : (par1Random.nextInt(2) == 0 ? new WorldGenBrazilNut2() : (par1Random.nextInt(3) == 0 ? new WorldGenSandboxTree2() : new WorldGenShrub(3, 0)))));
return (WorldGenerator)(par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(2) == 0 ? new WorldGenShrub(3, 0) : (par1Random.nextInt(3) == 0 ? new WorldGenHugeTrees(false, 10 + par1Random.nextInt(20), 3, 3) : new WorldGenTrees(false, 4 + par1Random.nextInt(7), 3, 3, true))));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenVines var5 = new WorldGenVines();
for (int var6 = 0; var6 < 50; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 32;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 5232218;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 3266623;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 16751442;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,45 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import tdwp_ftw.biomesop.worldgen.WorldGenAcacia;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenLushDesert extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenLushDesert(int par1)
{
super(par1);
this.topBlock = (byte)mod_BiomesOPlenty.redRock.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.redRock.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 8;
this.customBiomeDecorator.grassPerChunk = 8;
this.customBiomeDecorator.oasesPerChunk = 999;
this.customBiomeDecorator.oasesPerChunk2 = 999;
this.customBiomeDecorator.deadBushPerChunk = 2;
this.customBiomeDecorator.purpleFlowersPerChunk = 5;
this.customBiomeDecorator.desertGrassPerChunk = 10;
this.customBiomeDecorator.desertCactiPerChunk = 10;
this.customBiomeDecorator.cactiPerChunk = 20;
this.customBiomeDecorator.tinyCactiPerChunk = 5;
this.customBiomeDecorator.generateGrass = true;
this.customBiomeDecorator.generateSand = true;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenAcacia(false) : new WorldGenShrub(0, 0));
}
}

View file

@ -0,0 +1,58 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.block.Block;
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 tdwp_ftw.biomesop.worldgen.WorldGenSwampTall;
public class BiomeGenLushSwamp extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenLushSwamp(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 4;
this.customBiomeDecorator.mushroomsPerChunk = 8;
this.customBiomeDecorator.reedsPerChunk = 16;
this.customBiomeDecorator.cattailsPerChunk = 10;
this.customBiomeDecorator.waterlilyPerChunk = 3;
this.customBiomeDecorator.hydrangeasPerChunk = 1;
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenSwampTall() : this.worldGeneratorSwamp);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
}

View file

@ -0,0 +1,37 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenMangrove;
public class BiomeGenMangrove extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMangrove(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)Block.sand.blockID;
this.fillerBlock = (byte)Block.sand.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 6;
this.customBiomeDecorator.deadBushPerChunk = 1;
this.customBiomeDecorator.deadGrassPerChunk = 9;
this.customBiomeDecorator.reedsPerChunk = -999;
this.customBiomeDecorator.cactiPerChunk = -999;
this.customBiomeDecorator.desertSproutsPerChunk = 1;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenMangrove(false);
}
}

View file

@ -0,0 +1,31 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenMaple;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
public class BiomeGenMapleWoods extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMapleWoods(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 9;
this.customBiomeDecorator.grassPerChunk = 1;
this.customBiomeDecorator.violetsPerChunk = 1;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(6) == 0 ? new WorldGenTaiga5(false) : new WorldGenMaple(false));
}
}

View file

@ -0,0 +1,52 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenMarsh;
public class BiomeGenMarsh extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMarsh(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = 65;
this.customBiomeDecorator.highGrassPerChunk = 25;
this.customBiomeDecorator.generatePumpkins = false;
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMarsh var5 = new WorldGenMarsh();
for (int var6 = 0; var6 < 25; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 62;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
}

View file

@ -0,0 +1,66 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTaiga2;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenMeadow extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMeadow(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 2;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.tinyFlowersPerChunk = 14;
this.customBiomeDecorator.flowersPerChunk = 10;
this.customBiomeDecorator.carrotsPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.hydrangeasPerChunk = 3;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenTaiga2(false) : new WorldGenShrub(0, 1));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 6533741;
}
}

View file

@ -0,0 +1,55 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
public class BiomeGenMesa extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMesa(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)mod_BiomesOPlenty.redRock.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.redRock.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.deadBushPerChunk = 2;
this.customBiomeDecorator.desertGrassPerChunk = 10;
this.customBiomeDecorator.tinyCactiPerChunk = 2;
this.spawnableMonsterList.add(new SpawnListEntry(EntitySpider.class, 15, 2, 6));
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 15898486;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,92 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenMoor;
public class BiomeGenMoor extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMoor(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.mudPerChunk = 1;
this.customBiomeDecorator.mudPerChunk2 = 1;
this.waterColorMultiplier = 5800566;
this.customBiomeDecorator.generatePumpkins = false;
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoor var5 = new WorldGenMoor();
for (int var6 = 0; var6 < 16; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 64;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return (par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : (par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1)));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 6394725;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 10536403;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,32 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTaiga2;
import tdwp_ftw.biomesop.worldgen.WorldGenScotsPine1;
import tdwp_ftw.biomesop.worldgen.WorldGenScotsPine2;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga7;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenMountain extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMountain(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 2;
this.customBiomeDecorator.grassPerChunk = 3;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(8) == 0 ? new WorldGenTaiga2(false) : (par1Random.nextInt(4) == 0 ? new WorldGenTaiga7(false) : this.worldGeneratorTrees));
}
}

View file

@ -0,0 +1,101 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntityWitch;
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 tdwp_ftw.biomesop.worldgen.WorldGenMystic1;
import tdwp_ftw.biomesop.worldgen.WorldGenMystic2;
public class BiomeGenMysticGrove extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenMysticGrove(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 8;
this.customBiomeDecorator.grassPerChunk = 7;
this.customBiomeDecorator.flowersPerChunk = 8;
this.customBiomeDecorator.pinkFlowersPerChunk = 6;
this.customBiomeDecorator.glowFlowersPerChunk = 15;
this.customBiomeDecorator.rosesPerChunk = 8;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.sproutsPerChunk = 3;
this.customBiomeDecorator.hydrangeasPerChunk = 3;
this.waterColorMultiplier = 15349914;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenMystic2(false) : new WorldGenMystic1(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 7004860;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 3530896;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 16751558;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,43 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenPalmTree3;
public class BiomeGenOasis extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenOasis(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)Block.sand.blockID;
this.fillerBlock = (byte)Block.sand.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 3;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.reedsPerChunk = 100;
this.customBiomeDecorator.oasesPerChunk = 999;
this.customBiomeDecorator.oasesPerChunk2 = 999;
this.customBiomeDecorator.cactiPerChunk = 7;
this.customBiomeDecorator.desertSproutsPerChunk = 3;
this.customBiomeDecorator.tinyCactiPerChunk = 2;
this.customBiomeDecorator.generatePumpkins = false;
this.customBiomeDecorator.generateMelons = true;
this.customBiomeDecorator.waterLakesPerChunk = 10;
this.customBiomeDecorator.quicksand2PerChunk = 2;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenPalmTree3();
}
}

View file

@ -0,0 +1,109 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntityCaveSpider;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.passive.EntityBat;
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 tdwp_ftw.biomesop.worldgen.WorldGenDarkTree1;
import tdwp_ftw.biomesop.worldgen.WorldGenDarkTree2;
import tdwp_ftw.biomesop.worldgen.WorldGenWillow1;
import tdwp_ftw.biomesop.worldgen.WorldGenWillow2;
import tdwp_ftw.biomesop.worldgen.WorldGenOminous1;
import tdwp_ftw.biomesop.worldgen.WorldGenOminous2;
public class BiomeGenOminousWoods extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenOminousWoods(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.deathbloomsPerChunk = 1;
this.customBiomeDecorator.mushroomsPerChunk = 8;
this.customBiomeDecorator.reedsPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.thornsPerChunk = 9;
this.waterColorMultiplier = 1973030;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityCaveSpider.class, 15, 1, 2));
this.spawnableMonsterList.add(new SpawnListEntry(EntityEnderman.class, 10, 1, 4));
this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityBat.class, 10, 8, 8));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenWillow2() : (par1Random.nextInt(7) == 0 ? new WorldGenDarkTree1() : (par1Random.nextInt(5) == 0 ? new WorldGenWillow1() : new WorldGenDarkTree2())));
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenOminous1(false) : new WorldGenOminous2());
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(6) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 0) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 4145489;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 4145489;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 5069168;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,43 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenApple;
import tdwp_ftw.biomesop.worldgen.WorldGenAppleTree1;
import tdwp_ftw.biomesop.worldgen.WorldGenAppleTree2;
public class BiomeGenOrchard extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenOrchard(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 2;
this.customBiomeDecorator.flowersPerChunk = 20;
this.customBiomeDecorator.whiteFlowersPerChunk = 20;
this.customBiomeDecorator.tinyFlowersPerChunk = 20;
this.customBiomeDecorator.grassPerChunk = 15;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenAppleTree1() : new WorldGenAppleTree2());
return new WorldGenApple(false);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 14024557;
}
}

View file

@ -0,0 +1,76 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenOriginTree;
public class BiomeGenOriginValley extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenOriginValley(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.topBlock = (byte)mod_BiomesOPlenty.originGrass.blockID;
this.customBiomeDecorator.treesPerChunk = 4;
this.customBiomeDecorator.grassPerChunk = -999;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenOriginTree(false);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 10682207;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 3866368;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 8703228;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,42 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import tdwp_ftw.biomesop.worldgen.WorldGenOutback;
import tdwp_ftw.biomesop.worldgen.WorldGenOutbackTree;
import tdwp_ftw.biomesop.worldgen.WorldGenOutbackShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenOutback extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenOutback(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.topBlock = (byte)mod_BiomesOPlenty.hardSand.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.hardSand.blockID;
this.customBiomeDecorator.treesPerChunk = 3;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.outbackPerChunk = 10;
this.customBiomeDecorator.deadBushPerChunk = 7;
this.customBiomeDecorator.tinyCactiPerChunk = 2;
this.customBiomeDecorator.bushesPerChunk = 5;
this.customBiomeDecorator.quicksandPerChunk = 1;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenOutbackShrub(0,0) : new WorldGenOutbackTree());
}
}

View file

@ -0,0 +1,55 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenPasture extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenPasture(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 0;
this.customBiomeDecorator.grassPerChunk = 999;
this.customBiomeDecorator.flowersPerChunk = -999;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return new WorldGenTallGrass(mod_BiomesOPlenty.barley.blockID, 0);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return this.worldGeneratorBigTree;
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 15259456;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 13166666;
}
}

View file

@ -0,0 +1,34 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenPlainsNew extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenPlainsNew(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = 4;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.tinyFlowersPerChunk = 1;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
}

View file

@ -0,0 +1,41 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenPrairie;
public class BiomeGenPrairie extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenPrairie(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 1;
this.customBiomeDecorator.grassPerChunk = 999;
this.customBiomeDecorator.whiteFlowersPerChunk = 45;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenPrairie(false);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return (par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : (par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1)));
}
}

View file

@ -0,0 +1,115 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenPromisedTree;
import tdwp_ftw.biomesop.worldgen.WorldGenPromisedTree2;
import tdwp_ftw.biomesop.worldgen.WorldGenPromisedTree3;
import tdwp_ftw.biomesop.worldgen.WorldGenPromisedShrub;
import net.minecraft.world.gen.feature.WorldGenMinable;
public class BiomeGenPromisedLand extends BiomeGenBase
{
private WorldGenerator theWorldGenerator;
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenPromisedLand(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.topBlock = (byte)mod_BiomesOPlenty.holyGrass.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.holyStone.blockID;
this.customBiomeDecorator.treesPerChunk = 8;
this.customBiomeDecorator.grassPerChunk = -999;
this.customBiomeDecorator.holyTallGrassPerChunk = 50;
this.customBiomeDecorator.promisedWillowPerChunk = 80;
this.customBiomeDecorator.pinkFlowersPerChunk = 6;
this.customBiomeDecorator.glowFlowersPerChunk = 3;
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.clear();
this.spawnableCaveCreatureList.clear();
this.customBiomeDecorator.generatePumpkins = false;
this.theWorldGenerator = new WorldGenMinable(Block.waterMoving.blockID, 8);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenPromisedShrub(0, 0) : (par1Random.nextInt(4) == 0 ? new WorldGenPromisedTree3(false) : (par1Random.nextInt(8) == 0 ? new WorldGenPromisedTree2(false) : new WorldGenPromisedTree(false))));
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 4583331;
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 100;
int var6;
int var7;
int var8;
for (var6 = 0; var6 < var5; ++var6)
{
var7 = par3 + par2Random.nextInt(16);
var8 = par2Random.nextInt(30) + 30;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, mod_BiomesOPlenty.amethystOre.blockID, 0, 2);
}
}
for (var5 = 0; var5 < 12; ++var5)
{
var6 = par3 + par2Random.nextInt(16);
var7 = par2Random.nextInt(60);
var8 = par4 + par2Random.nextInt(16);
this.theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
}
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 50175;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,83 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree;
public class BiomeGenQuagmire extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenQuagmire(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.topBlock = (byte)mod_BiomesOPlenty.mud.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.mud.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 0;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.waterColorMultiplier = 13390080;
this.customBiomeDecorator.generateQuagmire = true;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenDeadTree(false);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 10390377;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 10390377;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 12436670;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,66 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityOcelot;
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 tdwp_ftw.biomesop.mobs.EntityJungleSpider;
import tdwp_ftw.biomesop.worldgen.WorldGenRainforestTree1;
public class BiomeGenRainforest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenRainforest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 14;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.pinkFlowersPerChunk = 2;
this.customBiomeDecorator.flowersPerChunk = 25;
this.customBiomeDecorator.rosesPerChunk = 10;
this.customBiomeDecorator.mushroomsPerChunk = 25;
this.customBiomeDecorator.orangeFlowersPerChunk = 6;
this.customBiomeDecorator.generatePumpkins = false;
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(15) == 0 ? this.worldGeneratorForest : (par1Random.nextInt(5) == 0 ? this.worldGeneratorBigTree : new WorldGenRainforestTree1(false)));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 1759340;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 1368687;
}
}

View file

@ -0,0 +1,45 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenRedwoodTree;
import tdwp_ftw.biomesop.worldgen.WorldGenRedwoodTree2;
import tdwp_ftw.biomesop.worldgen.WorldGenRedwood1;
import tdwp_ftw.biomesop.worldgen.WorldGenRedwood2;
public class BiomeGenRedwoodForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenRedwoodForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 16;
this.customBiomeDecorator.bushesPerChunk = 4;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenRedwood2() : new WorldGenRedwood1());
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenRedwoodTree(false) : new WorldGenRedwoodTree2(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
}

View file

@ -0,0 +1,102 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
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 tdwp_ftw.biomesop.mobs.EntityJungleSpider;
public class BiomeGenSacredSprings extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSacredSprings(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 30;
this.customBiomeDecorator.grassPerChunk = 4;
this.customBiomeDecorator.waterlilyPerChunk = 5;
this.customBiomeDecorator.violetsPerChunk = 1;
this.customBiomeDecorator.generatePumpkins = false;
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenShrub(0, 0);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = par2Random.nextInt(75);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(53) + 75;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID || var10 == Block.dirt.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.waterMoving.blockID, 0, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 39259;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 39259;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 1995007;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,45 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenAcacia;
public class BiomeGenSavanna extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSavanna(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.purpleFlowersPerChunk = 10;
this.customBiomeDecorator.tinyFlowersPerChunk = 2;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenShrub(0, 0) : new WorldGenAcacia(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
}

View file

@ -0,0 +1,43 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenScrubland;
public class BiomeGenScrubland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenScrubland(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 7;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.highGrassPerChunk = 2;
this.customBiomeDecorator.grassPerChunk = 30;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenShrub(0, 0) : new WorldGenScrubland(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(5) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 0) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
}

View file

@ -0,0 +1,66 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityWolf;
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 tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenAutumn;
import tdwp_ftw.biomesop.worldgen.WorldGenAutumn2;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree2;
import tdwp_ftw.biomesop.worldgen.WorldGenMaple;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
public class BiomeGenSeasonalForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSeasonalForest(int par1)
{
super(par1);
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 20;
this.customBiomeDecorator.grassPerChunk = 8;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.toadstoolsPerChunk = 4;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenAutumn2(false) : (par1Random.nextInt(3) == 0 ? new WorldGenAutumn(false) : (par1Random.nextInt(3) == 0 ? new WorldGenMaple(false) : (par1Random.nextInt(5) == 0 ? new WorldGenDeadTree2(false) : this.worldGeneratorTrees))));
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11781186;
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 12502092;
//return 12502595;
}
}

View file

@ -0,0 +1,69 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.block.Block;
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 tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
public class BiomeGenShield extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenShield(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 7;
this.customBiomeDecorator.grassPerChunk = 12;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.gravelPerChunk = 4;
this.customBiomeDecorator.gravelPerChunk2 = 4;
this.customBiomeDecorator.generateStoneInGrass2 = true;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenShrub(0,0) : new WorldGenTaiga5(false));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 6586168;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 7902787;
}
}

View file

@ -0,0 +1,12 @@
package tdwp_ftw.biomesop.biomes;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenShore extends BiomeGenBase
{
public BiomeGenShore(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
}
}

View file

@ -0,0 +1,43 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenShrubland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenShrubland(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 0;
this.customBiomeDecorator.flowersPerChunk = 0;
this.customBiomeDecorator.grassPerChunk = 5;
this.customBiomeDecorator.bushesPerChunk = 7;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenShrub(0, 0);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
}

View file

@ -0,0 +1,87 @@
package tdwp_ftw.biomesop.biomes;
import java.awt.Color;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree;
import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree2;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
public class BiomeGenSnowyWoods extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSnowyWoods(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 2;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.reedsPerChunk = -999;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(6) == 0 ? new WorldGenDeadTree2(false) : (par1Random.nextInt(3) == 0 ? new WorldGenTaiga5(false): new WorldGenDeadTree(false)));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 11176526;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11903827;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 9873591;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,36 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenTaiga2;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
import tdwp_ftw.biomesop.worldgen.WorldGenLarch1;
import tdwp_ftw.biomesop.worldgen.WorldGenLarch2;
public class BiomeGenSpruceWoods extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSpruceWoods(int par1)
{
super(par1);
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 8, 4, 4));
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 6;
this.customBiomeDecorator.sproutsPerChunk = 3;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenTaiga5(false) : new WorldGenTaiga2(false));
}
}

View file

@ -0,0 +1,46 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenSteppe extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSteppe(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.deadBushPerChunk = 7;
this.customBiomeDecorator.tinyCactiPerChunk = 1;
this.customBiomeDecorator.quicksandPerChunk = 1;
this.customBiomeDecorator.steppePerChunk = 6;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return (par1Random.nextInt(8) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : (par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1)));
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 13413215;
}
}

View file

@ -0,0 +1,79 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.world.ColorizerFoliage;
import net.minecraft.world.ColorizerGrass;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenWillow;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
import tdwp_ftw.biomesop.worldgen.WorldGenLog;
public class BiomeGenSwampNew extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSwampNew(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 4;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.deadBushPerChunk = 1;
this.customBiomeDecorator.mushroomsPerChunk = 8;
this.customBiomeDecorator.reedsPerChunk = 10;
this.customBiomeDecorator.clayPerChunk = 1;
this.customBiomeDecorator.waterlilyPerChunk = 4;
this.customBiomeDecorator.mudPerChunk = 9;
this.customBiomeDecorator.mudPerChunk2 = 9;
this.waterColorMultiplier = 14745456;
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenLog() : new WorldGenWillow());
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
double var1 = (double)this.getFloatTemperature();
double var3 = (double)this.getFloatRainfall();
return ((ColorizerGrass.getGrassColor(var1, var3) & 16711422) + 5115470) / 2;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
double var1 = (double)this.getFloatTemperature();
double var3 = (double)this.getFloatRainfall();
return ((ColorizerFoliage.getFoliageColor(var1, var3) & 16711422) + 5115470) / 2;
}
}

View file

@ -0,0 +1,84 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenMarsh;
import tdwp_ftw.biomesop.worldgen.WorldGenCypress;
import net.minecraft.world.gen.feature.WorldGenShrub;
public class BiomeGenSwampwoods extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSwampwoods(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 12;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.highGrassPerChunk = 10;
this.customBiomeDecorator.mudPerChunk = 2;
this.customBiomeDecorator.mudPerChunk2 = 2;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.algaePerChunk = 2;
this.customBiomeDecorator.waterlilyPerChunk = 4;
this.customBiomeDecorator.generatePumpkins = false;
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMarsh var5 = new WorldGenMarsh();
for (int var6 = 0; var6 < 5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 62;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenShrub(0,0) : new WorldGenCypress(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 1660473;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 2324303;
}
}

View file

@ -0,0 +1,48 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.entity.passive.EntityWolf;
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.WorldGenTaiga1;
import net.minecraft.world.gen.feature.WorldGenTaiga2;
import tdwp_ftw.biomesop.worldgen.WorldGenNorwaySpruce1;
import tdwp_ftw.biomesop.worldgen.WorldGenNorwaySpruce2;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenTaigaNew extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenTaigaNew(int par1)
{
super(par1);
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 8, 4, 4));
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 1;
this.customBiomeDecorator.violetsPerChunk = 1;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenTaiga1() : new WorldGenTaiga2(false));
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenNorwaySpruce1() : new WorldGenNorwaySpruce2());
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1);
}
}

View file

@ -0,0 +1,81 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraft.world.gen.feature.WorldGenShrub;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
import tdwp_ftw.biomesop.worldgen.WorldGenTemperate;
import tdwp_ftw.biomesop.worldgen.WorldGenThickTree;
import tdwp_ftw.biomesop.worldgen.WorldGenWillow;
import tdwp_ftw.biomesop.worldgen.WorldGenGrandFir1;
import tdwp_ftw.biomesop.worldgen.WorldGenGrandFir2;
import tdwp_ftw.biomesop.worldgen.WorldGenAlaskanCedar1;
import tdwp_ftw.biomesop.worldgen.WorldGenAlaskanCedar2;
public class BiomeGenTemperateRainforest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenTemperateRainforest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 22;
this.customBiomeDecorator.grassPerChunk = 25;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenGrandFir1() : (par1Random.nextInt(4) == 0 ? new WorldGenAlaskanCedar2() : (par1Random.nextInt(8) == 0 ? new WorldGenAlaskanCedar1() : (par1Random.nextInt(2) == 0 ? new WorldGenShrub(0,0) : new WorldGenGrandFir2()))));
return (WorldGenerator)(par1Random.nextInt(10) == 0 ? new WorldGenWillow() : (par1Random.nextInt(6) == 0 ? new WorldGenThickTree(false) : (par1Random.nextInt(2) == 0 ? new WorldGenTemperate(false) : new WorldGenShrub(0, 0))));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return (par1Random.nextInt(6) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : (par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : (par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(mod_BiomesOPlenty.mediumGrass.blockID, 1) : new WorldGenTallGrass(mod_BiomesOPlenty.shortGrass.blockID, 1))));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 11981671;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 12311907;
}
}

View file

@ -0,0 +1,51 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenThicket extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenThicket(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 17;
this.customBiomeDecorator.grassPerChunk = 1;
this.customBiomeDecorator.thornsPerChunk = 25;
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? this.worldGeneratorTrees : new WorldGenShrub(0, 0));
}
}

View file

@ -0,0 +1,111 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityOcelot;
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 tdwp_ftw.biomesop.mobs.EntityJungleSpider;
import tdwp_ftw.biomesop.worldgen.WorldGenRainforest1;
import tdwp_ftw.biomesop.worldgen.WorldGenRainforest2;
public class BiomeGenTropicalRainforest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenTropicalRainforest(int par1)
{
super(par1);
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 12;
this.customBiomeDecorator.grassPerChunk = 7;
this.customBiomeDecorator.highGrassPerChunk = 4;
this.customBiomeDecorator.reedsPerChunk = 10;
this.customBiomeDecorator.waterlilyPerChunk = 2;
this.customBiomeDecorator.orangeFlowersPerChunk = 10;
this.customBiomeDecorator.generatePumpkins = false;
this.customBiomeDecorator.generateMelons = true;
this.customBiomeDecorator.sproutsPerChunk = 2;
this.customBiomeDecorator.quicksandPerChunk = 3;
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
this.waterColorMultiplier = 6160128;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenRainforest2() : new WorldGenRainforest1(false));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlockAndMetadataWithNotify(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 11002176;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 8970560;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 12971089;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,72 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mobs.EntityJungleSpider;
import tdwp_ftw.biomesop.worldgen.WorldGenPalmTree1;
import tdwp_ftw.biomesop.worldgen.WorldGenPalmTree3;
import tdwp_ftw.biomesop.worldgen.WorldGenPalm1;
import tdwp_ftw.biomesop.worldgen.WorldGenPalm2;
public class BiomeGenTropics extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenTropics(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 8;
this.customBiomeDecorator.grassPerChunk = 7;
this.customBiomeDecorator.flowersPerChunk = 10;
this.customBiomeDecorator.sandPerChunk = 50;
this.customBiomeDecorator.sandPerChunk2 = 50;
this.customBiomeDecorator.orangeFlowersPerChunk = 10;
this.customBiomeDecorator.whiteFlowersPerChunk = 4;
this.customBiomeDecorator.generatePumpkins = false;
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
this.spawnableCreatureList.clear();
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenPalmTree1() : new WorldGenPalmTree3());
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 3333631;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,37 @@
package tdwp_ftw.biomesop.biomes;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenTundra extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenTundra(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = -999;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 11176526;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11903827;
}
}

View file

@ -0,0 +1,64 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenVolcano;
public class BiomeGenVolcano extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenVolcano(int par1)
{
super(par1);
this.spawnableCreatureList.clear();
this.topBlock = (byte)mod_BiomesOPlenty.ashStone.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.ashStone.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.grassPerChunk = -999;
this.customBiomeDecorator.lavaLakesPerChunk = 50;
this.customBiomeDecorator.generateAsh = true;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenVolcano();
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 8026746;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,72 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import java.awt.Color;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.worldgen.WorldGenSpire;
public class BiomeGenWasteland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenWasteland(int par1)
{
super(par1);
this.topBlock = (byte)mod_BiomesOPlenty.driedDirt.blockID;
this.fillerBlock = (byte)mod_BiomesOPlenty.driedDirt.blockID;
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = -999;
this.customBiomeDecorator.deadGrassPerChunk = 14;
this.waterColorMultiplier = 15073024;
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 10330232;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 10067541;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (mod_BiomesOPlenty.skyColors = true)
{
return 10465942;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}

View file

@ -0,0 +1,92 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenTaiga5;
import tdwp_ftw.biomesop.worldgen.WorldGenWillow;
import tdwp_ftw.biomesop.worldgen.WorldGenWillow1;
import tdwp_ftw.biomesop.worldgen.WorldGenWillow2;
import tdwp_ftw.biomesop.worldgen.WorldGenLarch1;
import tdwp_ftw.biomesop.worldgen.WorldGenLarch2;
import tdwp_ftw.biomesop.worldgen.WorldGenMoss;
public class BiomeGenWetland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenWetland(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 10;
this.customBiomeDecorator.grassPerChunk = 10;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.mushroomsPerChunk = 5;
this.customBiomeDecorator.toadstoolsPerChunk = 1;
this.customBiomeDecorator.reedsPerChunk = 15;
this.customBiomeDecorator.clayPerChunk = 2;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.mudPerChunk = 5;
this.customBiomeDecorator.mudPerChunk2 = 5;
this.customBiomeDecorator.waterlilyPerChunk = 6;
this.customBiomeDecorator.cattailsPerChunk = 20;
this.customBiomeDecorator.blueFlowersPerChunk = 6;
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.waterColorMultiplier = 6512772;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
//return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenWillow2() : (par1Random.nextInt(4) == 0 ? new WorldGenLarch1() : (par1Random.nextInt(2) == 0 ? new WorldGenLarch2() : new WorldGenWillow1())));
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenTaiga5(false) : new WorldGenWillow());
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(6) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 5935967;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 5215831;
}
}

View file

@ -0,0 +1,30 @@
package tdwp_ftw.biomesop.biomes;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenLog;
public class BiomeGenWoodland extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenWoodland(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 9;
this.customBiomeDecorator.grassPerChunk = 7;
this.customBiomeDecorator.toadstoolsPerChunk = 3;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenLog() : (par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : this.worldGeneratorTrees));
}
}

View file

@ -0,0 +1,331 @@
package tdwp_ftw.biomesop.blocks;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.world.ColorizerFoliage;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockAcaciaLeaves extends BlockLeavesBase
{
/**
* The base index in terrain.png corresponding to the fancy version of the leaf texture. This is stored so we can
* switch the displayed version between fancy and fast graphics (fast is this index + 1).
*/
private int baseIndexInPNG;
public static final String[] LEAF_TYPES = new String[] {"acacia"};
int[] adjacentTreeBlocks;
public BlockAcaciaLeaves(int par1)
{
super(par1, Material.leaves, false);
this.setBurnProperties(this.blockID, 30, 60);
this.setTickRandomly(true);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
public int getBlockColor()
{
double var1 = 0.5D;
double var3 = 1.0D;
return ColorizerFoliage.getFoliageColor(var1, var3);
}
/**
* Returns the color this block should be rendered. Used by leaves.
*/
public int getRenderColor(int par1)
{
return (par1 & 3) == 1 ? ColorizerFoliage.getFoliageColorPine() : ((par1 & 3) == 2 ? ColorizerFoliage.getFoliageColorBirch() : ColorizerFoliage.getFoliageColorBasic());
}
/**
* Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
* when first determining what to render.
*/
public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
int var6 = 0;
int var7 = 0;
int var8 = 0;
for (int var9 = -1; var9 <= 1; ++var9)
{
for (int var10 = -1; var10 <= 1; ++var10)
{
int var11 = par1IBlockAccess.getBiomeGenForCoords(par2 + var10, par4 + var9).getBiomeFoliageColor();
var6 += (var11 & 16711680) >> 16;
var7 += (var11 & 65280) >> 8;
var8 += var11 & 255;
}
}
return (var6 / 9 & 255) << 16 | (var7 / 9 & 255) << 8 | var8 / 9 & 255;
}
/**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
*/
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
{
byte b0 = 1;
int j1 = b0 + 1;
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
{
for (int k1 = -b0; k1 <= b0; ++k1)
{
for (int l1 = -b0; l1 <= b0; ++l1)
{
for (int i2 = -b0; i2 <= b0; ++i2)
{
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
if (Block.blocksList[j2] != null)
{
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
}
}
}
}
}
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (!par1World.isRemote)
{
int var6 = par1World.getBlockMetadata(par2, par3, par4);
if ((var6 & 8) != 0 && (var6 & 4) == 0)
{
byte var7 = 4;
int var8 = var7 + 1;
byte var9 = 32;
int var10 = var9 * var9;
int var11 = var9 / 2;
if (this.adjacentTreeBlocks == null)
{
this.adjacentTreeBlocks = new int[var9 * var9 * var9];
}
int var12;
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
{
int var13;
int var14;
int var15;
for (var12 = -var7; var12 <= var7; ++var12)
{
for (var13 = -var7; var13 <= var7; ++var13)
{
for (var14 = -var7; var14 <= var7; ++var14)
{
var15 = par1World.getBlockId(par2 + var12, par3 + var13, par4 + var14);
if (var15 == mod_BiomesOPlenty.acaciaWood.blockID)
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = 0;
}
else if (var15 == mod_BiomesOPlenty.acaciaLeaves.blockID)
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
}
else
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -1;
}
}
}
}
for (var12 = 1; var12 <= 4; ++var12)
{
for (var13 = -var7; var13 <= var7; ++var13)
{
for (var14 = -var7; var14 <= var7; ++var14)
{
for (var15 = -var7; var15 <= var7; ++var15)
{
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11] == var12 - 1)
{
if (this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] = var12;
}
}
}
}
}
}
}
var12 = this.adjacentTreeBlocks[var11 * var10 + var11 * var9 + var11];
if (var12 >= 0)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
}
else
{
this.removeLeaves(par1World, par2, par3, par4);
}
}
}
}
/**
* A randomly called display update to be able to add particles or other items for display
*/
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (par1World.canLightningStrikeAt(par2, par3 + 1, par4) && !par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && par5Random.nextInt(15) == 1)
{
double var6 = (double)((float)par2 + par5Random.nextFloat());
double var8 = (double)par3 - 0.05D;
double var10 = (double)((float)par4 + par5Random.nextFloat());
par1World.spawnParticle("dripWater", var6, var8, var10, 0.0D, 0.0D, 0.0D);
}
}
private void removeLeaves(World par1World, int par2, int par3, int par4)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockAndMetadataWithNotify(par2, par3, par4, this.blockID, 0, 2);
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return par1Random.nextInt(20) == 0 ? 1 : 0;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.acaciaSapling.blockID;
}
/**
* Drops the block items with a specified chance of dropping the specified items
*/
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
if (!par1World.isRemote)
{
byte var8 = 20;
if ((par5 & 3) == 3)
{
var8 = 40;
}
if (par1World.rand.nextInt(var8) == 0)
{
int var9 = this.idDropped(par5, par1World.rand, par7);
this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var9, 1, this.damageDropped(par5)));
}
}
}
/**
* Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
* block and l is the block's subtype/damage.
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{
if (!par1World.isRemote && par2EntityPlayer.getCurrentEquippedItem() != null && par2EntityPlayer.getCurrentEquippedItem().itemID == Item.shears.itemID)
{
par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
this.dropBlockAsItem_do(par1World, par3, par4, par5, new ItemStack(mod_BiomesOPlenty.acaciaLeaves.blockID, 1, par6 & 3));
}
else
{
super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
}
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1 & 3;
}
@Override
public boolean isOpaqueCube() {
return Block.leaves.isOpaqueCube();
}
//@Override
//public int getBlockTextureFromSideAndMetadata(int side, int metadata) {
//return blockIndexInTexture + (isOpaqueCube() ? 1 : 0);
//}
@Override
public void func_94332_a(IconRegister par1IconRegister)
{
this.field_94336_cN = (isOpaqueCube() ? par1IconRegister.func_94245_a("BiomesOPlenty:acaciaLeavesOpaque") : par1IconRegister.func_94245_a("BiomesOPlenty:acaciaLeaves"));
}
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
return true;
}
/**
* Pass true to draw this block using fancy graphics, or false for fast graphics.
*/
public void setGraphicsLevel(boolean par1)
{
this.graphicsLevel = par1;
}
}

View file

@ -0,0 +1,155 @@
package tdwp_ftw.biomesop.blocks;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockAcaciaLog extends Block
{
/** The type of tree this log came from. */
public static final String[] woodType = new String[] {"acacia"};
public BlockAcaciaLog(int par1)
{
super(par1, Material.wood);
this.blockIndexInTexture = 44;
this.setBurnProperties(this.blockID, 5, 5);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 31;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return 1;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.acaciaWood.blockID;
}
/**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
*/
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
{
byte var7 = 4;
int var8 = var7 + 1;
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
{
for (int var9 = -var7; var9 <= var7; ++var9)
{
for (int var10 = -var7; var10 <= var7; ++var10)
{
for (int var11 = -var7; var11 <= var7; ++var11)
{
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
if (var12 == mod_BiomesOPlenty.acaciaLeaves.blockID)
{
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
if ((var13 & 8) == 0)
{
par1World.setBlockMetadata(par2 + var9, par3 + var10, par4 + var11, var13 | 8);
}
}
}
}
}
}
}
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
{
int var10 = par9 & 3;
byte var11 = 0;
switch (par5)
{
case 0:
case 1:
var11 = 0;
break;
case 2:
case 3:
var11 = 8;
break;
case 4:
case 5:
var11 = 4;
}
return var10 | var11;
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
int var3 = par2 & 12;
int var4 = par2 & 3;
return var3 == 0 && (par1 == 1 || par1 == 0) ? 255 : (var3 == 4 && (par1 == 5 || par1 == 4) ? 255 : (var3 == 8 && (par1 == 2 || par1 == 3) ? 255 : (var4 == 1 ? 116 : (var4 == 2 ? 117 : (var4 == 3 ? 153 : 44)))));
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1 & 3;
}
/**
* returns a number between 0 and 3
*/
public static int limitToValidMetadata(int par0)
{
return par0 & 3;
}
/**
* Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage
* and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null.
*/
protected ItemStack createStackedBlock(int par1)
{
return new ItemStack(this.blockID, 1, limitToValidMetadata(par1));
}
@Override
public boolean canSustainLeaves(World world, int x, int y, int z)
{
return true;
}
@Override
public boolean isWood(World world, int x, int y, int z)
{
return true;
}
}

View file

@ -0,0 +1,29 @@
package tdwp_ftw.biomesop.blocks;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.IBlockAccess;
public class BlockAcaciaPlank extends Block
{
/** The type of tree this block came from. */
public static final String[] woodType = new String[] {"acacia"};
public BlockAcaciaPlank(int par1)
{
super(par1, 45, Material.wood);
this.setBurnProperties(this.blockID, 5, 20);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1;
}
}

View file

@ -0,0 +1,154 @@
package tdwp_ftw.biomesop.blocks;
import java.util.List;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.helpers.CreativeTabsBOP;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenAcacia;
import net.minecraft.util.AxisAlignedBB;
public class BlockAcaciaSapling extends BlockSapling
{
public static final String[] WOOD_TYPES = new String[] {"acacia"};
public BlockAcaciaSapling(int par1, int par2)
{
super(par1, par2);
float var3 = 0.4F;
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, var3 * 2.0F, 0.5F + var3);
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (!par1World.isRemote)
{
super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9 && par5Random.nextInt(7) == 0)
{
int var6 = par1World.getBlockMetadata(par2, par3, par4);
if ((var6 & 8) == 0)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 | 8);
}
else
{
this.growTree(par1World, par2, par3, par4, par5Random);
}
}
}
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
par2 &= 3;
return par2 == 1 ? 63 : (par2 == 2 ? 79 : (par2 == 3 ? 30 : super.getBlockTextureFromSideAndMetadata(par1, par2)));
}
/**
* Attempts to grow a sapling into a tree
*/
public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)
{
int var6 = par1World.getBlockMetadata(par2, par3, par4) & 3;
Object var7 = null;
int var8 = 0;
int var9 = 0;
boolean var10 = false;
for (var8 = 0; var8 >= -1; --var8)
{
for (var9 = 0; var9 >= -1; --var9)
{
if (this.isSameSapling(par1World, par2 + var8, par3, par4 + var9, 0) && this.isSameSapling(par1World, par2 + var8 + 1, par3, par4 + var9, 0) && this.isSameSapling(par1World, par2 + var8, par3, par4 + var9 + 1, 0) && this.isSameSapling(par1World, par2 + var8 + 1, par3, par4 + var9 + 1, 0))
{
break;
}
}
if (var7 != null)
{
break;
}
}
if (var7 == null)
{
var9 = 0;
var8 = 0;
var7 = new WorldGenAcacia(false);
}
if (var10)
{
par1World.setBlock(par2 + var8, par3, par4 + var9, 0);
par1World.setBlock(par2 + var8 + 1, par3, par4 + var9, 0);
par1World.setBlock(par2 + var8, par3, par4 + var9 + 1, 0);
par1World.setBlock(par2 + var8 + 1, par3, par4 + var9 + 1, 0);
}
else
{
par1World.setBlock(par2, par3, par4, 0);
}
if (!((WorldGenerator)var7).generate(par1World, par5Random, par2 + var8, par3, par4 + var9))
{
if (var10)
{
par1World.setBlockAndMetadata(par2 + var8, par3, par4 + var9, this.blockID, var6);
par1World.setBlockAndMetadata(par2 + var8 + 1, par3, par4 + var9, this.blockID, var6);
par1World.setBlockAndMetadata(par2 + var8, par3, par4 + var9 + 1, this.blockID, var6);
par1World.setBlockAndMetadata(par2 + var8 + 1, par3, par4 + var9 + 1, this.blockID, var6);
}
else
{
par1World.setBlockAndMetadata(par2, par3, par4, this.blockID, var6);
}
}
}
/**
* Determines if the same sapling is present at the given location.
*/
public boolean isSameSapling(World par1World, int par2, int par3, int par4, int par5)
{
return par1World.getBlockId(par2, par3, par4) == this.blockID && (par1World.getBlockMetadata(par2, par3, par4) & 3) == par5;
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1 & 3;
}
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
par3List.add(new ItemStack(par1, 1, 0));
}
}

View file

@ -0,0 +1,106 @@
package tdwp_ftw.biomesop.blocks;
import java.util.List;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.helpers.CreativeTabsBOP;
import net.minecraft.block.BlockHalfSlab;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockAcaciaSlab extends BlockHalfSlab
{
/** The type of tree this slab came from. */
public static final String[] woodType = new String[] {"acacia"};
public BlockAcaciaSlab(int par1, boolean par2)
{
super(par1, par2, Material.wood);
this.setBurnProperties(this.blockID, 5, 20);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
this.useNeighborBrightness[blockID] = true;
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
switch (par2 & 7)
{
case 1:
return 198;
case 2:
return 214;
case 3:
return 199;
default:
return 45;
}
}
/**
* Returns the block texture based on the side being looked at. Args: side
*/
public int getBlockTextureFromSide(int par1)
{
return this.getBlockTextureFromSideAndMetadata(par1, 0);
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.acaciaSingleSlab.blockID;
}
/**
* Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage
* and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null.
*/
protected ItemStack createStackedBlock(int par1)
{
return new ItemStack(mod_BiomesOPlenty.acaciaSingleSlab.blockID, 2, par1 & 7);
}
/**
* Returns the slab block name with step type.
*/
public String getFullSlabName(int par1)
{
if (par1 < 0 || par1 >= woodType.length)
{
par1 = 0;
}
return super.getBlockName() + "." + woodType[par1];
}
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
if (par1 != mod_BiomesOPlenty.acaciaDoubleSlab.blockID)
{
par3List.add(new ItemStack(par1, 1, 0));
}
}
/**
* only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)
*/
public int idPicked(World par1World, int par2, int par3, int par4)
{
return mod_BiomesOPlenty.acaciaSingleSlab.blockID;
}
}

View file

@ -0,0 +1,24 @@
package tdwp_ftw.biomesop.blocks;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.IBlockAccess;
public class BlockAcaciaStairs extends BlockStairs
{
/** The block that is used as model for the stair. */
private final Block modelBlock;
public BlockAcaciaStairs(int par1, Block par2Block, int par3)
{
super(par1, par2Block, par3);
blockIndexInTexture = par3;
this.modelBlock = par2Block;
this.setBurnProperties(this.blockID, 5, 20);
this.setLightOpacity(0);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
}

View file

@ -0,0 +1,111 @@
package tdwp_ftw.biomesop.blocks;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.material.Material;
import net.minecraft.world.ColorizerFoliage;
import net.minecraft.world.ColorizerGrass;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityBoat;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockAlgae extends BlockFlower
{
public BlockAlgae(int par1, int par2)
{
super(par1, par2);
float var3 = 0.5F;
float var4 = 0.015625F;
this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, var4, 0.5F + var3);
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 23;
}
public int getBlockColor()
{
double var1 = 0.5D;
double var3 = 1.0D;
return ColorizerFoliage.getFoliageColor(var1, var3);
}
/**
* Returns the color this block should be rendered. Used by leaves.
*/
public int getRenderColor(int par1)
{
return (par1 & 3) == 1 ? ColorizerFoliage.getFoliageColorPine() : ((par1 & 3) == 2 ? ColorizerFoliage.getFoliageColorBirch() : ColorizerFoliage.getFoliageColorBasic());
}
/**
* Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
* when first determining what to render.
*/
public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
int var6 = 0;
int var7 = 0;
int var8 = 0;
for (int var9 = -1; var9 <= 1; ++var9)
{
for (int var10 = -1; var10 <= 1; ++var10)
{
int var11 = par1IBlockAccess.getBiomeGenForCoords(par2 + var10, par4 + var9).getBiomeFoliageColor();
var6 += (var11 & 16711680) >> 16;
var7 += (var11 & 65280) >> 8;
var8 += var11 & 255;
}
}
return (var6 / 9 & 255) << 16 | (var7 / 9 & 255) << 8 | var8 / 9 & 255;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return 0;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return 0;
}
/**
* Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
* blockID passed in. Args: blockID
*/
protected boolean canThisPlantGrowOnThisBlockID(int par1)
{
return par1 == Block.waterStill.blockID;
}
/**
* Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
*/
public boolean canBlockStay(World par1World, int par2, int par3, int par4)
{
return par3 >= 0 && par3 < 256 ? par1World.getBlockMaterial(par2, par3 - 1, par4) == Material.water && par1World.getBlockMetadata(par2, par3 - 1, par4) == 0 : false;
}
}

View file

@ -0,0 +1,35 @@
package tdwp_ftw.biomesop.blocks;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.IBlockAccess;
public class BlockAmethystBlock extends Block
{
public BlockAmethystBlock(int par1, int par2)
{
super(par1, par2, Material.iron);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.amethystBlock.blockID;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return 1;
}
}

View file

@ -0,0 +1,75 @@
package tdwp_ftw.biomesop.blocks;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class BlockAmethystOre extends Block
{
public BlockAmethystOre(int par1, int par2)
{
super(par1, par2, Material.rock);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.amethyst.itemID;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return 1 + par1Random.nextInt(2);
}
/**
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive).
*/
public int quantityDroppedWithBonus(int par1, Random par2Random)
{
if (par1 > 0 && this.blockID != this.idDropped(0, par2Random, par1))
{
int var3 = par2Random.nextInt(par1 + 2) - 1;
if (var3 < 0)
{
var3 = 0;
}
return this.quantityDropped(par2Random) * (var3 + 1);
}
else
{
return this.quantityDropped(par2Random);
}
}
/**
* Drops the block items with a specified chance of dropping the specified items
*/
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
if (this.idDropped(par5, par1World.rand, par7) != this.blockID)
{
int var8 = 0;
var8 = MathHelper.getRandomIntegerInRange(par1World.rand, 1, 4);
this.dropXpOnBlockBreak(par1World, par2, par3, par4, var8);
}
}
}

View file

@ -0,0 +1,290 @@
package tdwp_ftw.biomesop.blocks;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockAppleLeaves extends BlockLeavesBase
{
/**
* The base index in terrain.png corresponding to the fancy version of the leaf texture. This is stored so we can
* switch the displayed version between fancy and fast graphics (fast is this index + 1).
*/
private int baseIndexInPNG;
public static final String[] LEAF_TYPES = new String[] {"apple"};
int[] adjacentTreeBlocks;
public BlockAppleLeaves(int par1)
{
super(par1, Material.leaves, false);
this.setTickRandomly(true);
this.setBurnProperties(this.blockID, 30, 60);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
*/
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
{
byte b0 = 1;
int j1 = b0 + 1;
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
{
for (int k1 = -b0; k1 <= b0; ++k1)
{
for (int l1 = -b0; l1 <= b0; ++l1)
{
for (int i2 = -b0; i2 <= b0; ++i2)
{
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
if (Block.blocksList[j2] != null)
{
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
}
}
}
}
}
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (!par1World.isRemote)
{
int var6 = par1World.getBlockMetadata(par2, par3, par4);
if ((var6 & 8) != 0 && (var6 & 4) == 0)
{
byte var7 = 4;
int var8 = var7 + 1;
byte var9 = 32;
int var10 = var9 * var9;
int var11 = var9 / 2;
if (this.adjacentTreeBlocks == null)
{
this.adjacentTreeBlocks = new int[var9 * var9 * var9];
}
int var12;
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
{
int var13;
int var14;
int var15;
for (var12 = -var7; var12 <= var7; ++var12)
{
for (var13 = -var7; var13 <= var7; ++var13)
{
for (var14 = -var7; var14 <= var7; ++var14)
{
var15 = par1World.getBlockId(par2 + var12, par3 + var13, par4 + var14);
if (var15 == Block.wood.blockID)
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = 0;
}
else if (var15 == mod_BiomesOPlenty.appleLeaves.blockID || var15 == mod_BiomesOPlenty.appleLeavesFruitless.blockID)
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
}
else
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -1;
}
}
}
}
for (var12 = 1; var12 <= 4; ++var12)
{
for (var13 = -var7; var13 <= var7; ++var13)
{
for (var14 = -var7; var14 <= var7; ++var14)
{
for (var15 = -var7; var15 <= var7; ++var15)
{
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11] == var12 - 1)
{
if (this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] = var12;
}
}
}
}
}
}
}
var12 = this.adjacentTreeBlocks[var11 * var10 + var11 * var9 + var11];
if (var12 >= 0)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
}
else
{
this.removeLeaves(par1World, par2, par3, par4);
}
}
}
}
/**
* A randomly called display update to be able to add particles or other items for display
*/
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (par1World.canLightningStrikeAt(par2, par3 + 1, par4) && !par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && par5Random.nextInt(15) == 1)
{
double var6 = (double)((float)par2 + par5Random.nextFloat());
double var8 = (double)par3 - 0.05D;
double var10 = (double)((float)par4 + par5Random.nextFloat());
par1World.spawnParticle("dripWater", var6, var8, var10, 0.0D, 0.0D, 0.0D);
}
}
private void removeLeaves(World par1World, int par2, int par3, int par4)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockAndMetadataWithNotify(par2, par3, par4, this.blockID, 0, 2);
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return par1Random.nextInt(20) == 0 ? 1 : 0;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.appleSapling.blockID;
}
/**
* Drops the block items with a specified chance of dropping the specified items
*/
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
if (!par1World.isRemote)
{
byte var8 = 20;
if ((par5 & 3) == 3)
{
var8 = 40;
}
if (par1World.rand.nextInt(var8) == 0)
{
int var9 = this.idDropped(par5, par1World.rand, par7);
this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var9, 1, this.damageDropped(par5)));
}
if ((par5 & 3) == 0 && par1World.rand.nextInt(2) == 0)
{
this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(Item.appleRed, 1, 0));
}
}
}
/**
* Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
* block and l is the block's subtype/damage.
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{
if (!par1World.isRemote && par2EntityPlayer.getCurrentEquippedItem() != null && par2EntityPlayer.getCurrentEquippedItem().itemID == Item.shears.itemID)
{
par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
this.dropBlockAsItem_do(par1World, par3, par4, par5, new ItemStack(mod_BiomesOPlenty.appleLeaves.blockID, 1, par6 & 3));
}
else
{
super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
}
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1 & 3;
}
@Override
public boolean isOpaqueCube() {
return Block.leaves.isOpaqueCube();
}
@Override
public void func_94332_a(IconRegister par1IconRegister)
{
this.field_94336_cN = (isOpaqueCube() ? par1IconRegister.func_94245_a("BiomesOPlenty:appleLeavesOpaque") : par1IconRegister.func_94245_a("BiomesOPlenty:appleLeaves"));
}
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
return true;
}
/**
* Pass true to draw this block using fancy graphics, or false for fast graphics.
*/
public void setGraphicsLevel(boolean par1)
{
this.graphicsLevel = par1;
}
}

View file

@ -0,0 +1,289 @@
package tdwp_ftw.biomesop.blocks;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockAppleLeavesFruitless extends BlockLeavesBase
{
/**
* The base index in terrain.png corresponding to the fancy version of the leaf texture. This is stored so we can
* switch the displayed version between fancy and fast graphics (fast is this index + 1).
*/
private int baseIndexInPNG;
public static final String[] LEAF_TYPES = new String[] {"apple"};
int[] adjacentTreeBlocks;
public BlockAppleLeavesFruitless(int par1)
{
super(par1, Material.leaves, false);
this.setBurnProperties(this.blockID, 30, 60);
this.setTickRandomly(true);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
*/
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
{
byte b0 = 1;
int j1 = b0 + 1;
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
{
for (int k1 = -b0; k1 <= b0; ++k1)
{
for (int l1 = -b0; l1 <= b0; ++l1)
{
for (int i2 = -b0; i2 <= b0; ++i2)
{
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
if (Block.blocksList[j2] != null)
{
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
}
}
}
}
}
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (!par1World.isRemote)
{
int var6 = par1World.getBlockMetadata(par2, par3, par4);
if ((var6 & 8) != 0 && (var6 & 4) == 0)
{
byte var7 = 4;
int var8 = var7 + 1;
byte var9 = 32;
int var10 = var9 * var9;
int var11 = var9 / 2;
if (this.adjacentTreeBlocks == null)
{
this.adjacentTreeBlocks = new int[var9 * var9 * var9];
}
int var12;
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
{
int var13;
int var14;
int var15;
for (var12 = -var7; var12 <= var7; ++var12)
{
for (var13 = -var7; var13 <= var7; ++var13)
{
for (var14 = -var7; var14 <= var7; ++var14)
{
var15 = par1World.getBlockId(par2 + var12, par3 + var13, par4 + var14);
if (var15 == Block.wood.blockID)
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = 0;
}
else if (var15 == mod_BiomesOPlenty.appleLeavesFruitless.blockID || var15 == mod_BiomesOPlenty.appleLeaves.blockID)
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
}
else
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -1;
}
}
}
}
for (var12 = 1; var12 <= 4; ++var12)
{
for (var13 = -var7; var13 <= var7; ++var13)
{
for (var14 = -var7; var14 <= var7; ++var14)
{
for (var15 = -var7; var15 <= var7; ++var15)
{
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11] == var12 - 1)
{
if (this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] = var12;
}
if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] == -2)
{
this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] = var12;
}
}
}
}
}
}
}
var12 = this.adjacentTreeBlocks[var11 * var10 + var11 * var9 + var11];
if (var12 >= 0)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
}
else
{
this.removeLeaves(par1World, par2, par3, par4);
}
}
}
}
/**
* A randomly called display update to be able to add particles or other items for display
*/
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (par1World.canLightningStrikeAt(par2, par3 + 1, par4) && !par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && par5Random.nextInt(15) == 1)
{
double var6 = (double)((float)par2 + par5Random.nextFloat());
double var8 = (double)par3 - 0.05D;
double var10 = (double)((float)par4 + par5Random.nextFloat());
par1World.spawnParticle("dripWater", var6, var8, var10, 0.0D, 0.0D, 0.0D);
}
}
private void removeLeaves(World par1World, int par2, int par3, int par4)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockAndMetadataWithNotify(par2, par3, par4, this.blockID, 0, 2);
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return par1Random.nextInt(20) == 0 ? 1 : 0;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.appleSapling.blockID;
}
/**
* Drops the block items with a specified chance of dropping the specified items
*/
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
if (!par1World.isRemote)
{
byte var8 = 20;
if ((par5 & 3) == 3)
{
var8 = 40;
}
if (par1World.rand.nextInt(var8) == 0)
{
int var9 = this.idDropped(par5, par1World.rand, par7);
this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var9, 1, this.damageDropped(par5)));
}
if ((par5 & 3) == 0 && par1World.rand.nextInt(100) == 0)
{
this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(Item.appleRed, 1, 0));
}
}
}
/**
* Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
* block and l is the block's subtype/damage.
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{
if (!par1World.isRemote && par2EntityPlayer.getCurrentEquippedItem() != null && par2EntityPlayer.getCurrentEquippedItem().itemID == Item.shears.itemID)
{
par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
this.dropBlockAsItem_do(par1World, par3, par4, par5, new ItemStack(mod_BiomesOPlenty.appleLeavesFruitless.blockID, 1, par6 & 3));
}
else
{
super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
}
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1 & 3;
}
@Override
public boolean isOpaqueCube() {
return Block.leaves.isOpaqueCube();
}
@Override
public void func_94332_a(IconRegister par1IconRegister)
{
this.field_94336_cN = (isOpaqueCube() ? par1IconRegister.func_94245_a("BiomesOPlenty:appleLeavesFruitlessOpaque") : par1IconRegister.func_94245_a("BiomesOPlenty:appleLeavesFruitless"));
}
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
return true;
}
/**
* Pass true to draw this block using fancy graphics, or false for fast graphics.
*/
public void setGraphicsLevel(boolean par1)
{
this.graphicsLevel = par1;
}
}

View file

@ -0,0 +1,153 @@
package tdwp_ftw.biomesop.blocks;
import java.util.List;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import tdwp_ftw.biomesop.worldgen.WorldGenApple;
import net.minecraft.util.AxisAlignedBB;
public class BlockAppleSapling extends BlockSapling
{
public static final String[] WOOD_TYPES = new String[] {"apple"};
public BlockAppleSapling(int par1, int par2)
{
super(par1, par2);
float var3 = 0.4F;
this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, var3 * 2.0F, 0.5F + var3);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (!par1World.isRemote)
{
super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9 && par5Random.nextInt(7) == 0)
{
int var6 = par1World.getBlockMetadata(par2, par3, par4);
if ((var6 & 8) == 0)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 | 8);
}
else
{
this.growTree(par1World, par2, par3, par4, par5Random);
}
}
}
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
par2 &= 3;
return par2 == 1 ? 63 : (par2 == 2 ? 79 : (par2 == 3 ? 30 : super.getBlockTextureFromSideAndMetadata(par1, par2)));
}
/**
* Attempts to grow a sapling into a tree
*/
public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)
{
int var6 = par1World.getBlockMetadata(par2, par3, par4) & 3;
Object var7 = null;
int var8 = 0;
int var9 = 0;
boolean var10 = false;
for (var8 = 0; var8 >= -1; --var8)
{
for (var9 = 0; var9 >= -1; --var9)
{
if (this.isSameSapling(par1World, par2 + var8, par3, par4 + var9, 0) && this.isSameSapling(par1World, par2 + var8 + 1, par3, par4 + var9, 0) && this.isSameSapling(par1World, par2 + var8, par3, par4 + var9 + 1, 0) && this.isSameSapling(par1World, par2 + var8 + 1, par3, par4 + var9 + 1, 0))
{
break;
}
}
if (var7 != null)
{
break;
}
}
if (var7 == null)
{
var9 = 0;
var8 = 0;
var7 = new WorldGenApple(false);
}
if (var10)
{
par1World.setBlock(par2 + var8, par3, par4 + var9, 0);
par1World.setBlock(par2 + var8 + 1, par3, par4 + var9, 0);
par1World.setBlock(par2 + var8, par3, par4 + var9 + 1, 0);
par1World.setBlock(par2 + var8 + 1, par3, par4 + var9 + 1, 0);
}
else
{
par1World.setBlock(par2, par3, par4, 0);
}
if (!((WorldGenerator)var7).generate(par1World, par5Random, par2 + var8, par3, par4 + var9))
{
if (var10)
{
par1World.setBlockAndMetadata(par2 + var8, par3, par4 + var9, this.blockID, var6);
par1World.setBlockAndMetadata(par2 + var8 + 1, par3, par4 + var9, this.blockID, var6);
par1World.setBlockAndMetadata(par2 + var8, par3, par4 + var9 + 1, this.blockID, var6);
par1World.setBlockAndMetadata(par2 + var8 + 1, par3, par4 + var9 + 1, this.blockID, var6);
}
else
{
par1World.setBlockAndMetadata(par2, par3, par4, this.blockID, var6);
}
}
}
/**
* Determines if the same sapling is present at the given location.
*/
public boolean isSameSapling(World par1World, int par2, int par3, int par4, int par5)
{
return par1World.getBlockId(par2, par3, par4) == this.blockID && (par1World.getBlockMetadata(par2, par3, par4) & 3) == par5;
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1 & 3;
}
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
par3List.add(new ItemStack(par1, 1, 0));
}
}

View file

@ -0,0 +1,60 @@
package tdwp_ftw.biomesop.blocks;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockAsh extends Block
{
public BlockAsh(int par1, int par2)
{
super(par1, par2, Material.sand);
this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty);
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
float var5 = 0.125F;
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)par2, (double)par3, (double)par4, (double)(par2 + 1), (double)((float)(par3 + 1) - var5), (double)(par4 + 1));
}
/**
* A randomly called display update to be able to add particles or other items for display
*/
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
super.randomDisplayTick(par1World, par2, par3, par4, par5Random);
if (par5Random.nextInt(2) == 0)
{
par1World.spawnParticle("smoke", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.1F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
}
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_BiomesOPlenty.ashes.itemID;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return 4;
}
}

Some files were not shown because too many files have changed in this diff Show more