Added ivy. Nerfed apple tree growth.

This commit is contained in:
Matt Caughey 2013-05-20 10:41:19 -04:00
parent ca54a1a0de
commit 5c53c46290
16 changed files with 744 additions and 119 deletions

View file

@ -128,6 +128,7 @@ public class BlockReferences {
treeMoss (Blocks.treeMoss, 0), treeMoss (Blocks.treeMoss, 0),
moss (Blocks.moss, 0), moss (Blocks.moss, 0),
willow (Blocks.willow, 0), willow (Blocks.willow, 0),
ivy (Blocks.ivy, 0),
clover (Blocks.flowers, 0), clover (Blocks.flowers, 0),
swampFlower (Blocks.flowers, 1), swampFlower (Blocks.flowers, 1),

View file

@ -70,6 +70,7 @@ public class Blocks
public static Optional<? extends Block> saplings = Optional.absent(); public static Optional<? extends Block> saplings = Optional.absent();
public static Optional<? extends Block> colorizedSaplings = Optional.absent(); public static Optional<? extends Block> colorizedSaplings = Optional.absent();
public static Optional<? extends Block> willow = Optional.absent(); public static Optional<? extends Block> willow = Optional.absent();
public static Optional<? extends Block> ivy = Optional.absent();
public static Optional<? extends Block> treeMoss = Optional.absent(); public static Optional<? extends Block> treeMoss = Optional.absent();
public static Optional<? extends Block> moss = Optional.absent(); public static Optional<? extends Block> moss = Optional.absent();
public static Optional<? extends Block> petals = Optional.absent(); public static Optional<? extends Block> petals = Optional.absent();

View file

@ -47,6 +47,7 @@ import biomesoplenty.worldgen.WorldGenMesa;
import biomesoplenty.worldgen.WorldGenMud; import biomesoplenty.worldgen.WorldGenMud;
import biomesoplenty.worldgen.WorldGenMycelium; import biomesoplenty.worldgen.WorldGenMycelium;
import biomesoplenty.worldgen.WorldGenNetherGrass; import biomesoplenty.worldgen.WorldGenNetherGrass;
import biomesoplenty.worldgen.WorldGenNetherLava;
import biomesoplenty.worldgen.WorldGenNetherVines; import biomesoplenty.worldgen.WorldGenNetherVines;
import biomesoplenty.worldgen.WorldGenNetherWart; import biomesoplenty.worldgen.WorldGenNetherWart;
import biomesoplenty.worldgen.WorldGenOasis; import biomesoplenty.worldgen.WorldGenOasis;
@ -335,6 +336,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
protected int pondsPerChunk; protected int pondsPerChunk;
protected int waterLakesPerChunk; protected int waterLakesPerChunk;
protected int lavaLakesPerChunk; protected int lavaLakesPerChunk;
protected int netherLavaPerChunk;
/** True if decorator should generate surface lava & water */ /** True if decorator should generate surface lava & water */
public boolean generateLakes; public boolean generateLakes;
@ -509,6 +511,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
this.pondsPerChunk = 0; this.pondsPerChunk = 0;
this.waterLakesPerChunk = 0; this.waterLakesPerChunk = 0;
this.lavaLakesPerChunk = 0; this.lavaLakesPerChunk = 0;
this.netherLavaPerChunk = 0;
this.quicksandPerChunk = 0; this.quicksandPerChunk = 0;
this.quicksand2PerChunk = 0; this.quicksand2PerChunk = 0;
this.crystalsPerChunk = 0; this.crystalsPerChunk = 0;
@ -590,6 +593,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator
var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
(new WorldGenLakes(Block.lavaMoving.blockID)).generate(this.currentWorld, this.randomGenerator, var3, var4, var5); (new WorldGenLakes(Block.lavaMoving.blockID)).generate(this.currentWorld, this.randomGenerator, var3, var4, var5);
} }
for (var2 = 0; var2 < netherLavaPerChunk; ++var2)
{
var3 = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
var4 = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(112) + 8) + 8);
var5 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
(new WorldGenNetherLava(Block.lavaMoving.blockID)).generate(this.currentWorld, this.randomGenerator, var3, var4, var5);
}
if (this.generateAsh) if (this.generateAsh)
{ {

View file

@ -38,7 +38,7 @@ public class BiomeGenLushSwamp extends BiomeGenBase
*/ */
public WorldGenerator getRandomWorldGenForTrees(Random par1Random) public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{ {
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenSwampTall() : this.worldGeneratorSwamp); return new WorldGenSwampTall();
} }
public void decorate(World par1World, Random par2Random, int par3, int par4) public void decorate(World par1World, Random par2Random, int par3, int par4)

View file

@ -28,14 +28,14 @@ public class BiomeGenNetherLava extends BiomeGenBase
this.topBlock = (byte)Block.netherrack.blockID; this.topBlock = (byte)Block.netherrack.blockID;
this.fillerBlock = (byte)Block.netherrack.blockID; this.fillerBlock = (byte)Block.netherrack.blockID;
this.customBiomeDecorator.grassPerChunk = 15; this.customBiomeDecorator.grassPerChunk = 15;
this.customBiomeDecorator.lavaLakesPerChunk = 20; this.customBiomeDecorator.netherLavaPerChunk = 20;
this.spawnableMonsterList.clear(); this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear(); this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear(); this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear(); this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityGhast.class, 50, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new SpawnListEntry(EntityPigZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new SpawnListEntry(EntityMagmaCube.class, 1, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityMagmaCube.class, 4, 4, 4));
this.theWorldGenerator = new WorldGenLavaSpring(Block.lavaMoving.blockID, 8); this.theWorldGenerator = new WorldGenLavaSpring(Block.lavaMoving.blockID, 8);
} }

View file

@ -106,9 +106,14 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
return; return;
int meta = world.getBlockMetadata(x, y, z); int meta = world.getBlockMetadata(x, y, z);
if (random.nextInt(5) == 0) if (random.nextInt(10) == 0)
if ((meta & 3) < 3) if (meta > 0)
world.setBlock(x, y, z, blockID, ++meta, 3); {
if ((meta & 3) < 3)
{
world.setBlock(x, y, z, blockID, ++meta, 3);
}
}
if ((meta & 8) != 0/* && (meta & 4) == 0*/) if ((meta & 8) != 0/* && (meta & 4) == 0*/)
{ {

View file

@ -241,18 +241,6 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
{ {
super.harvestBlock(world, player, x, y, z, meta); super.harvestBlock(world, player, x, y, z, meta);
} }
@Override
public void updateTick(World world, int x, int y, int z, Random random)
{
if (world.isRemote)
return;
int meta = world.getBlockMetadata(x, y, z);
if (random.nextInt(13) == 0)
if (meta == 4)
world.setBlock(x, y, z, blockID, 8, 3);
}
@Override @Override
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)

View file

@ -0,0 +1,376 @@
package biomesoplenty.blocks;
import java.util.ArrayList;
import java.util.Random;
import biomesoplenty.BiomesOPlenty;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Direction;
import net.minecraft.world.ColorizerFoliage;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.IShearable;
public class BlockIvy extends Block implements IShearable
{
public BlockIvy(int par1)
{
super(par1, Material.vine);
this.setTickRandomly(true);
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
}
@Override
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:ivy");
}
/**
* Sets the block's bounds for rendering it as an item
*/
public void setBlockBoundsForItemRender()
{
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 20;
}
/**
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
return false;
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
/**
* Updates the blocks bounds based on its current state. Args: world, x, y, z
*/
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
int var6 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
float var7 = 1.0F;
float var8 = 1.0F;
float var9 = 1.0F;
float var10 = 0.0F;
float var11 = 0.0F;
float var12 = 0.0F;
boolean var13 = var6 > 0;
if ((var6 & 2) != 0)
{
var10 = Math.max(var10, 0.0625F);
var7 = 0.0F;
var8 = 0.0F;
var11 = 1.0F;
var9 = 0.0F;
var12 = 1.0F;
var13 = true;
}
if ((var6 & 8) != 0)
{
var7 = Math.min(var7, 0.9375F);
var10 = 1.0F;
var8 = 0.0F;
var11 = 1.0F;
var9 = 0.0F;
var12 = 1.0F;
var13 = true;
}
if ((var6 & 4) != 0)
{
var12 = Math.max(var12, 0.0625F);
var9 = 0.0F;
var7 = 0.0F;
var10 = 1.0F;
var8 = 0.0F;
var11 = 1.0F;
var13 = true;
}
if ((var6 & 1) != 0)
{
var9 = Math.min(var9, 0.9375F);
var12 = 1.0F;
var7 = 0.0F;
var10 = 1.0F;
var8 = 0.0F;
var11 = 1.0F;
var13 = true;
}
if (!var13 && this.canBePlacedOn(par1IBlockAccess.getBlockId(par2, par3 + 1, par4)))
{
var8 = Math.min(var8, 0.9375F);
var11 = 1.0F;
var7 = 0.0F;
var10 = 1.0F;
var9 = 0.0F;
var12 = 1.0F;
}
this.setBlockBounds(var7, var8, var9, var10, var11, var12);
}
/**
* 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)
{
return null;
}
/**
* checks to see if you can place this block can be placed on that side of a block: BlockLever overrides
*/
public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)
{
switch (par5)
{
case 1:
return this.canBePlacedOn(par1World.getBlockId(par2, par3 + 1, par4));
case 2:
return this.canBePlacedOn(par1World.getBlockId(par2, par3, par4 + 1));
case 3:
return this.canBePlacedOn(par1World.getBlockId(par2, par3, par4 - 1));
case 4:
return this.canBePlacedOn(par1World.getBlockId(par2 + 1, par3, par4));
case 5:
return this.canBePlacedOn(par1World.getBlockId(par2 - 1, par3, par4));
default:
return false;
}
}
/**
* returns true if a vine can be placed on that block (checks for render as normal block and if it is solid)
*/
private boolean canBePlacedOn(int par1)
{
if (par1 == 0)
{
return false;
}
else
{
Block var2 = Block.blocksList[par1];
return var2.renderAsNormalBlock() && var2.blockMaterial.blocksMovement();
}
}
/**
* Returns if the vine can stay in the world. It also changes the metadata according to neighboring blocks.
*/
private boolean canVineStay(World par1World, int par2, int par3, int par4)
{
int var5 = par1World.getBlockMetadata(par2, par3, par4);
int var6 = var5;
if (var5 > 0)
{
for (int var7 = 0; var7 <= 3; ++var7)
{
int var8 = 1 << var7;
if ((var5 & var8) != 0 && !this.canBePlacedOn(par1World.getBlockId(par2 + Direction.offsetX[var7], par3, par4 + Direction.offsetZ[var7])) && (par1World.getBlockId(par2, par3 + 1, par4) != this.blockID || (par1World.getBlockMetadata(par2, par3 + 1, par4) & var8) == 0))
{
var6 &= ~var8;
}
}
}
if (var6 == 0 && !this.canBePlacedOn(par1World.getBlockId(par2, par3 + 1, par4)))
{
return false;
}
else
{
if (var6 != var5)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6, 2);
}
return true;
}
}
public int getBlockColor()
{
return ColorizerFoliage.getFoliageColorBasic();
}
/**
* Returns the color this block should be rendered. Used by leaves.
*/
@Override
public int getRenderColor(int par1)
{
return 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)
{
return par1IBlockAccess.getBiomeGenForCoords(par2, par4).getBiomeFoliageColor();
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor blockID
*/
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
{
if (!par1World.isRemote && !this.canVineStay(par1World, par2, par3, par4))
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlock(par2, par3, par4, 0);
}
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
}
/**
* called before onBlockPlacedBy by ItemBlock and ItemReed
*/
public void updateBlockMetadata(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8)
{
byte var9 = 0;
switch (par5)
{
case 2:
var9 = 1;
break;
case 3:
var9 = 4;
break;
case 4:
var9 = 8;
break;
case 5:
var9 = 2;
}
if (var9 != 0)
{
par1World.setBlockMetadataWithNotify(par2, par3, par4, var9, 2);
}
}
/**
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
*/
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
{
byte b0 = 0;
switch (par5)
{
case 2:
b0 = 1;
break;
case 3:
b0 = 4;
break;
case 4:
b0 = 8;
break;
case 5:
b0 = 2;
}
return b0 != 0 ? b0 : par9;
}
/**
* 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;
}
/**
* 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)
{
super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
}
@Override
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
{
return true;
}
@Override
public ArrayList<ItemStack> onSheared(ItemStack item, World world, int x, int y, int z, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
ret.add(new ItemStack(this, 1, 0));
return ret;
}
@Override
public boolean isBlockReplaceable(World world, int x, int y, int z)
{
return true;
}
@Override
public boolean isLadder(World world, int x, int y, int z)
{
return true;
}
}

View file

@ -33,6 +33,7 @@ import biomesoplenty.blocks.BlockBOPStairs;
import biomesoplenty.blocks.BlockBOPStairs.Category; import biomesoplenty.blocks.BlockBOPStairs.Category;
import biomesoplenty.blocks.BlockBamboo; import biomesoplenty.blocks.BlockBamboo;
import biomesoplenty.blocks.BlockCloud; import biomesoplenty.blocks.BlockCloud;
import biomesoplenty.blocks.BlockIvy;
import biomesoplenty.blocks.BlockMoss; import biomesoplenty.blocks.BlockMoss;
import biomesoplenty.blocks.BlockMud; import biomesoplenty.blocks.BlockMud;
import biomesoplenty.blocks.BlockOriginGrass; import biomesoplenty.blocks.BlockOriginGrass;
@ -47,6 +48,7 @@ import biomesoplenty.items.ItemBOPColorizedSapling;
import biomesoplenty.items.ItemBOPFlower; import biomesoplenty.items.ItemBOPFlower;
import biomesoplenty.items.ItemBOPFoliage; import biomesoplenty.items.ItemBOPFoliage;
import biomesoplenty.items.ItemBOPGrass; import biomesoplenty.items.ItemBOPGrass;
import biomesoplenty.items.ItemBOPIvy;
import biomesoplenty.items.ItemBOPLeaves; import biomesoplenty.items.ItemBOPLeaves;
import biomesoplenty.items.ItemBOPLog; import biomesoplenty.items.ItemBOPLog;
import biomesoplenty.items.ItemBOPMoss; import biomesoplenty.items.ItemBOPMoss;
@ -105,6 +107,7 @@ public class BOPBlocks {
Blocks.flowers = Optional.of((new BlockBOPFlower(BOPConfiguration.flowersID)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("flowers")); Blocks.flowers = Optional.of((new BlockBOPFlower(BOPConfiguration.flowersID)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("flowers"));
Blocks.mushrooms = Optional.of((new BlockBOPMushroom(BOPConfiguration.mushroomsID)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("mushrooms")); Blocks.mushrooms = Optional.of((new BlockBOPMushroom(BOPConfiguration.mushroomsID)).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("mushrooms"));
Blocks.willow = Optional.of((new BlockWillow(BOPConfiguration.willowID)).setHardness(0.2F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("willow")); Blocks.willow = Optional.of((new BlockWillow(BOPConfiguration.willowID)).setHardness(0.2F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("willow"));
Blocks.ivy = Optional.of((new BlockIvy(BOPConfiguration.ivyID)).setHardness(0.2F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("ivy"));
Blocks.leaves1 = Optional.of((new BlockBOPLeaves(BOPConfiguration.leaves1ID, LeafCategory.CAT1)).setUnlocalizedName("leaves1")); Blocks.leaves1 = Optional.of((new BlockBOPLeaves(BOPConfiguration.leaves1ID, LeafCategory.CAT1)).setUnlocalizedName("leaves1"));
Blocks.leaves2 = Optional.of((new BlockBOPLeaves(BOPConfiguration.leaves2ID, LeafCategory.CAT2)).setUnlocalizedName("leaves2")); Blocks.leaves2 = Optional.of((new BlockBOPLeaves(BOPConfiguration.leaves2ID, LeafCategory.CAT2)).setUnlocalizedName("leaves2"));
Blocks.foliage = Optional.of((new BlockBOPFoliage(BOPConfiguration.foliageID)).setUnlocalizedName("foliage")); Blocks.foliage = Optional.of((new BlockBOPFoliage(BOPConfiguration.foliageID)).setUnlocalizedName("foliage"));
@ -177,6 +180,7 @@ public class BOPBlocks {
GameRegistry.registerBlock(Blocks.flowers.get(), ItemBOPFlower.class, "flowers"); GameRegistry.registerBlock(Blocks.flowers.get(), ItemBOPFlower.class, "flowers");
GameRegistry.registerBlock(Blocks.mushrooms.get(), ItemBOPMushroom.class, "mushrooms"); GameRegistry.registerBlock(Blocks.mushrooms.get(), ItemBOPMushroom.class, "mushrooms");
GameRegistry.registerBlock(Blocks.willow.get(), ItemBOPWillow.class, "willow"); GameRegistry.registerBlock(Blocks.willow.get(), ItemBOPWillow.class, "willow");
GameRegistry.registerBlock(Blocks.ivy.get(), ItemBOPIvy.class, "ivy");
GameRegistry.registerBlock(Blocks.leaves1.get(), ItemBOPLeaves.class, "leaves1"); GameRegistry.registerBlock(Blocks.leaves1.get(), ItemBOPLeaves.class, "leaves1");
GameRegistry.registerBlock(Blocks.leaves2.get(), ItemBOPLeaves.class, "leaves2"); GameRegistry.registerBlock(Blocks.leaves2.get(), ItemBOPLeaves.class, "leaves2");
GameRegistry.registerBlock(Blocks.foliage.get(), ItemBOPFoliage.class, "foliage"); GameRegistry.registerBlock(Blocks.foliage.get(), ItemBOPFoliage.class, "foliage");
@ -260,6 +264,7 @@ public class BOPBlocks {
LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,7), "Cattail"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,7), "Cattail");
LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,8), "Reed"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,8), "Reed");
LanguageRegistry.addName(Blocks.willow.get(), "Willow"); LanguageRegistry.addName(Blocks.willow.get(), "Willow");
LanguageRegistry.addName(Blocks.ivy.get(), "Ivy");
LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,0), "Yellow Autumn Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,0), "Yellow Autumn Leaves");
LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,5), "Thorns"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,5), "Thorns");
LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,3), "High Grass"); LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,3), "High Grass");

View file

@ -124,6 +124,7 @@ public class BOPConfiguration {
public static int flowersID; public static int flowersID;
public static int mushroomsID; public static int mushroomsID;
public static int willowID; public static int willowID;
public static int ivyID;
public static int leaves1ID; public static int leaves1ID;
public static int leaves2ID; public static int leaves2ID;
@ -648,6 +649,8 @@ public class BOPConfiguration {
promisedLandPortalID = config.getBlock("Promised Land Portal ID", 1941, null).getInt(); promisedLandPortalID = config.getBlock("Promised Land Portal ID", 1941, null).getInt();
amethystOreID = config.getBlock("Amethyst Ore ID", 1942, null).getInt(); amethystOreID = config.getBlock("Amethyst Ore ID", 1942, null).getInt();
ivyID = config.getBlock("Ivy ID", 1943, null).getInt();
mossID = config.getBlock("Moss ID", 391, null).getInt(); mossID = config.getBlock("Moss ID", 391, null).getInt();
planksID = config.getBlock("Planks ID", 1947, null).getInt(); planksID = config.getBlock("Planks ID", 1947, null).getInt();

View file

@ -0,0 +1,38 @@
package biomesoplenty.items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.ItemColored;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import biomesoplenty.api.Blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemBOPIvy extends ItemColored
{
@SideOnly(Side.CLIENT)
private Icon texture;
public ItemBOPIvy(int par1)
{
super(par1, false);
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
texture = iconRegister.registerIcon("BiomesOPlenty:ivy");
}
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack itemStack, int par2)
{
return Blocks.ivy.get().getRenderColor(itemStack.getItemDamage());
}
@Override
public Icon getIconFromDamage(int meta)
{
return texture;
}
}

View file

@ -94,9 +94,29 @@ public class WorldGenApple extends WorldGenerator
if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var12, var16, var14)]) if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var12, var16, var14)])
{ {
var99 = par2Random.nextInt(6); var99 = par2Random.nextInt(15);
if (var99 == 0) if (var99 == 0)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 3);
}
else if (var99 == 1)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 2);
}
else if (var99 == 2)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 2);
}
else if (var99 == 3)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1);
}
else if (var99 == 4)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1);
}
else if (var99 == 5)
{ {
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1); this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1);
} }

View file

@ -0,0 +1,174 @@
package biomesoplenty.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenNetherLava extends WorldGenerator
{
private int blockIndex;
public WorldGenNetherLava(int par1)
{
this.blockIndex = par1;
}
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
par3 -= 8;
for (par5 -= 8; par4 > 5 && par1World.isAirBlock(par3, par4, par5); --par4)
{
;
}
if (par4 <= 4)
{
return false;
}
else
{
par4 -= 4;
boolean[] aboolean = new boolean[2048];
int l = par2Random.nextInt(4) + 4;
int i1;
for (i1 = 0; i1 < l; ++i1)
{
double d0 = par2Random.nextDouble() * 6.0D + 3.0D;
double d1 = par2Random.nextDouble() * 4.0D + 2.0D;
double d2 = par2Random.nextDouble() * 6.0D + 3.0D;
double d3 = par2Random.nextDouble() * (16.0D - d0 - 2.0D) + 1.0D + d0 / 2.0D;
double d4 = par2Random.nextDouble() * (8.0D - d1 - 4.0D) + 2.0D + d1 / 2.0D;
double d5 = par2Random.nextDouble() * (16.0D - d2 - 2.0D) + 1.0D + d2 / 2.0D;
for (int j1 = 1; j1 < 15; ++j1)
{
for (int k1 = 1; k1 < 15; ++k1)
{
for (int l1 = 1; l1 < 7; ++l1)
{
double d6 = ((double)j1 - d3) / (d0 / 2.0D);
double d7 = ((double)l1 - d4) / (d1 / 2.0D);
double d8 = ((double)k1 - d5) / (d2 / 2.0D);
double d9 = d6 * d6 + d7 * d7 + d8 * d8;
if (d9 < 1.0D)
{
aboolean[(j1 * 16 + k1) * 8 + l1] = true;
}
}
}
}
}
int i2;
int j2;
boolean flag;
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
for (i2 = 0; i2 < 8; ++i2)
{
flag = !aboolean[(i1 * 16 + j2) * 8 + i2] && (i1 < 15 && aboolean[((i1 + 1) * 16 + j2) * 8 + i2] || i1 > 0 && aboolean[((i1 - 1) * 16 + j2) * 8 + i2] || j2 < 15 && aboolean[(i1 * 16 + j2 + 1) * 8 + i2] || j2 > 0 && aboolean[(i1 * 16 + (j2 - 1)) * 8 + i2] || i2 < 7 && aboolean[(i1 * 16 + j2) * 8 + i2 + 1] || i2 > 0 && aboolean[(i1 * 16 + j2) * 8 + (i2 - 1)]);
if (flag)
{
Material material = par1World.getBlockMaterial(par3 + i1, par4 + i2, par5 + j2);
if (i2 >= 4 && material.isLiquid())
{
return false;
}
if (i2 < 4 && !material.isSolid() && par1World.getBlockId(par3 + i1, par4 + i2, par5 + j2) != this.blockIndex)
{
return false;
}
}
}
}
}
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
for (i2 = 0; i2 < 8; ++i2)
{
if (aboolean[(i1 * 16 + j2) * 8 + i2])
{
par1World.setBlock(par3 + i1, par4 + i2, par5 + j2, i2 >= 4 ? 0 : this.blockIndex, 0, 2);
}
}
}
}
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
for (i2 = 4; i2 < 8; ++i2)
{
if (aboolean[(i1 * 16 + j2) * 8 + i2] && par1World.getBlockId(par3 + i1, par4 + i2 - 1, par5 + j2) == Block.dirt.blockID && par1World.getSavedLightValue(EnumSkyBlock.Sky, par3 + i1, par4 + i2, par5 + j2) > 0)
{
BiomeGenBase biomegenbase = par1World.getBiomeGenForCoords(par3 + i1, par5 + j2);
if (biomegenbase.topBlock == Block.mycelium.blockID)
{
par1World.setBlock(par3 + i1, par4 + i2 - 1, par5 + j2, Block.netherrack.blockID, 0, 2);
}
else
{
par1World.setBlock(par3 + i1, par4 + i2 - 1, par5 + j2, Block.netherrack.blockID, 0, 2);
}
}
}
}
}
if (Block.blocksList[this.blockIndex].blockMaterial == Material.lava)
{
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
for (i2 = 0; i2 < 8; ++i2)
{
flag = !aboolean[(i1 * 16 + j2) * 8 + i2] && (i1 < 15 && aboolean[((i1 + 1) * 16 + j2) * 8 + i2] || i1 > 0 && aboolean[((i1 - 1) * 16 + j2) * 8 + i2] || j2 < 15 && aboolean[(i1 * 16 + j2 + 1) * 8 + i2] || j2 > 0 && aboolean[(i1 * 16 + (j2 - 1)) * 8 + i2] || i2 < 7 && aboolean[(i1 * 16 + j2) * 8 + i2 + 1] || i2 > 0 && aboolean[(i1 * 16 + j2) * 8 + (i2 - 1)]);
if (flag && (i2 < 4 || par2Random.nextInt(2) != 0) && par1World.getBlockMaterial(par3 + i1, par4 + i2, par5 + j2).isSolid())
{
par1World.setBlock(par3 + i1, par4 + i2, par5 + j2, Block.netherrack.blockID, 0, 2);
}
}
}
}
}
if (Block.blocksList[this.blockIndex].blockMaterial == Material.water)
{
for (i1 = 0; i1 < 16; ++i1)
{
for (j2 = 0; j2 < 16; ++j2)
{
byte b0 = 4;
if (par1World.isBlockFreezable(par3 + i1, par4 + b0, par5 + j2))
{
par1World.setBlock(par3 + i1, par4 + b0, par5 + j2, Block.ice.blockID, 0, 2);
}
}
}
}
return true;
}
}
}

View file

@ -39,382 +39,382 @@ public class WorldGenNetherVines extends WorldGenerator
if (var1.isAirBlock(var3 - 1, var4, var5)) if (var1.isAirBlock(var3 - 1, var4, var5))
{ {
var1.setBlock(var3 - 1, var4, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 1, var5)) if (var1.isAirBlock(var3 - 1, var4 - 1, var5))
{ {
var1.setBlock(var3 - 1, var4 - 1, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 1, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 2, var5)) if (var1.isAirBlock(var3 - 1, var4 - 2, var5))
{ {
var1.setBlock(var3 - 1, var4 - 2, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 2, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 3, var5)) if (var1.isAirBlock(var3 - 1, var4 - 3, var5))
{ {
var1.setBlock(var3 - 1, var4 - 3, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 3, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 4, var5)) if (var1.isAirBlock(var3 - 1, var4 - 4, var5))
{ {
var1.setBlock(var3 - 1, var4 - 4, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 4, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 5, var5)) if (var1.isAirBlock(var3 - 1, var4 - 5, var5))
{ {
var1.setBlock(var3 - 1, var4 - 5, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 5, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 6, var5)) if (var1.isAirBlock(var3 - 1, var4 - 6, var5))
{ {
var1.setBlock(var3 - 1, var4 - 6, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 6, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 7, var5)) if (var1.isAirBlock(var3 - 1, var4 - 7, var5))
{ {
var1.setBlock(var3 - 1, var4 - 7, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 7, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 8, var5)) if (var1.isAirBlock(var3 - 1, var4 - 8, var5))
{ {
var1.setBlock(var3 - 1, var4 - 8, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 8, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 9, var5)) if (var1.isAirBlock(var3 - 1, var4 - 9, var5))
{ {
var1.setBlock(var3 - 1, var4 - 9, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 9, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 10, var5)) if (var1.isAirBlock(var3 - 1, var4 - 10, var5))
{ {
var1.setBlock(var3 - 1, var4 - 10, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 10, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 11, var5)) if (var1.isAirBlock(var3 - 1, var4 - 11, var5))
{ {
var1.setBlock(var3 - 1, var4 - 11, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 11, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 12, var5)) if (var1.isAirBlock(var3 - 1, var4 - 12, var5))
{ {
var1.setBlock(var3 - 1, var4 - 12, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 12, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 13, var5)) if (var1.isAirBlock(var3 - 1, var4 - 13, var5))
{ {
var1.setBlock(var3 - 1, var4 - 13, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 13, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 14, var5)) if (var1.isAirBlock(var3 - 1, var4 - 14, var5))
{ {
var1.setBlock(var3 - 1, var4 - 14, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 14, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 - 1, var4 - 15, var5)) if (var1.isAirBlock(var3 - 1, var4 - 15, var5))
{ {
var1.setBlock(var3 - 1, var4 - 15, var5, Block.vine.blockID, 8, 2); var1.setBlock(var3 - 1, var4 - 15, var5, Blocks.ivy.get().blockID, 8, 2);
} }
if (var1.isAirBlock(var3 + 1, var4, var5)) if (var1.isAirBlock(var3 + 1, var4, var5))
{ {
var1.setBlock(var3 + 1, var4, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 1, var5)) if (var1.isAirBlock(var3 + 1, var4 - 1, var5))
{ {
var1.setBlock(var3 + 1, var4 - 1, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 1, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 2, var5)) if (var1.isAirBlock(var3 + 1, var4 - 2, var5))
{ {
var1.setBlock(var3 + 1, var4 - 2, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 2, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 3, var5)) if (var1.isAirBlock(var3 + 1, var4 - 3, var5))
{ {
var1.setBlock(var3 + 1, var4 - 3, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 3, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 4, var5)) if (var1.isAirBlock(var3 + 1, var4 - 4, var5))
{ {
var1.setBlock(var3 + 1, var4 - 4, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 4, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 5, var5)) if (var1.isAirBlock(var3 + 1, var4 - 5, var5))
{ {
var1.setBlock(var3 + 1, var4 - 5, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 5, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 6, var5)) if (var1.isAirBlock(var3 + 1, var4 - 6, var5))
{ {
var1.setBlock(var3 + 1, var4 - 6, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 6, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 7, var5)) if (var1.isAirBlock(var3 + 1, var4 - 7, var5))
{ {
var1.setBlock(var3 + 1, var4 - 7, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 7, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 8, var5)) if (var1.isAirBlock(var3 + 1, var4 - 8, var5))
{ {
var1.setBlock(var3 + 1, var4 - 8, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 8, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 9, var5)) if (var1.isAirBlock(var3 + 1, var4 - 9, var5))
{ {
var1.setBlock(var3 + 1, var4 - 9, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 9, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 10, var5)) if (var1.isAirBlock(var3 + 1, var4 - 10, var5))
{ {
var1.setBlock(var3 + 1, var4 - 10, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 10, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 11, var5)) if (var1.isAirBlock(var3 + 1, var4 - 11, var5))
{ {
var1.setBlock(var3 + 1, var4 - 11, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 11, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 12, var5)) if (var1.isAirBlock(var3 + 1, var4 - 12, var5))
{ {
var1.setBlock(var3 + 1, var4 - 12, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 12, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 13, var5)) if (var1.isAirBlock(var3 + 1, var4 - 13, var5))
{ {
var1.setBlock(var3 + 1, var4 - 13, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 13, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 14, var5)) if (var1.isAirBlock(var3 + 1, var4 - 14, var5))
{ {
var1.setBlock(var3 + 1, var4 - 14, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 14, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 15, var5)) if (var1.isAirBlock(var3 + 1, var4 - 15, var5))
{ {
var1.setBlock(var3 + 1, var4 - 15, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 15, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 16, var5)) if (var1.isAirBlock(var3 + 1, var4 - 16, var5))
{ {
var1.setBlock(var3 + 1, var4 - 16, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 16, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 17, var5)) if (var1.isAirBlock(var3 + 1, var4 - 17, var5))
{ {
var1.setBlock(var3 + 1, var4 - 17, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 17, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 18, var5)) if (var1.isAirBlock(var3 + 1, var4 - 18, var5))
{ {
var1.setBlock(var3 + 1, var4 - 18, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 18, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 19, var5)) if (var1.isAirBlock(var3 + 1, var4 - 19, var5))
{ {
var1.setBlock(var3 + 1, var4 - 19, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 19, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3 + 1, var4 - 20, var5)) if (var1.isAirBlock(var3 + 1, var4 - 20, var5))
{ {
var1.setBlock(var3 + 1, var4 - 20, var5, Block.vine.blockID, 2, 2); var1.setBlock(var3 + 1, var4 - 20, var5, Blocks.ivy.get().blockID, 2, 2);
} }
if (var1.isAirBlock(var3, var4, var5 - 1)) if (var1.isAirBlock(var3, var4, var5 - 1))
{ {
var1.setBlock(var3, var4, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 1, var5 - 1)) if (var1.isAirBlock(var3, var4 - 1, var5 - 1))
{ {
var1.setBlock(var3, var4 - 1, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 1, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 2, var5 - 1)) if (var1.isAirBlock(var3, var4 - 2, var5 - 1))
{ {
var1.setBlock(var3, var4 - 2, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 2, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 3, var5 - 1)) if (var1.isAirBlock(var3, var4 - 3, var5 - 1))
{ {
var1.setBlock(var3, var4 - 3, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 3, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 4, var5 - 1)) if (var1.isAirBlock(var3, var4 - 4, var5 - 1))
{ {
var1.setBlock(var3, var4 - 4, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 4, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 5, var5 - 1)) if (var1.isAirBlock(var3, var4 - 5, var5 - 1))
{ {
var1.setBlock(var3, var4 - 5, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 5, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 6, var5 - 1)) if (var1.isAirBlock(var3, var4 - 6, var5 - 1))
{ {
var1.setBlock(var3, var4 - 6, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 6, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 7, var5 - 1)) if (var1.isAirBlock(var3, var4 - 7, var5 - 1))
{ {
var1.setBlock(var3, var4 - 7, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 7, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 8, var5 - 1)) if (var1.isAirBlock(var3, var4 - 8, var5 - 1))
{ {
var1.setBlock(var3, var4 - 8, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 8, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 9, var5 - 1)) if (var1.isAirBlock(var3, var4 - 9, var5 - 1))
{ {
var1.setBlock(var3, var4 - 9, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 9, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 10, var5 - 1)) if (var1.isAirBlock(var3, var4 - 10, var5 - 1))
{ {
var1.setBlock(var3, var4 - 10, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 10, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 11, var5 - 1)) if (var1.isAirBlock(var3, var4 - 11, var5 - 1))
{ {
var1.setBlock(var3, var4 - 11, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 11, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 12, var5 - 1)) if (var1.isAirBlock(var3, var4 - 12, var5 - 1))
{ {
var1.setBlock(var3, var4 - 12, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 12, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 13, var5 - 1)) if (var1.isAirBlock(var3, var4 - 13, var5 - 1))
{ {
var1.setBlock(var3, var4 - 13, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 13, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 14, var5 - 1)) if (var1.isAirBlock(var3, var4 - 14, var5 - 1))
{ {
var1.setBlock(var3, var4 - 14, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 14, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 15, var5 - 1)) if (var1.isAirBlock(var3, var4 - 15, var5 - 1))
{ {
var1.setBlock(var3, var4 - 15, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 15, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 16, var5 - 1)) if (var1.isAirBlock(var3, var4 - 16, var5 - 1))
{ {
var1.setBlock(var3, var4 - 16, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 16, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 17, var5 - 1)) if (var1.isAirBlock(var3, var4 - 17, var5 - 1))
{ {
var1.setBlock(var3, var4 - 17, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 17, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 18, var5 - 1)) if (var1.isAirBlock(var3, var4 - 18, var5 - 1))
{ {
var1.setBlock(var3, var4 - 18, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 18, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 19, var5 - 1)) if (var1.isAirBlock(var3, var4 - 19, var5 - 1))
{ {
var1.setBlock(var3, var4 - 19, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 19, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 20, var5 - 1)) if (var1.isAirBlock(var3, var4 - 20, var5 - 1))
{ {
var1.setBlock(var3, var4 - 20, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 20, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 21, var5 - 1)) if (var1.isAirBlock(var3, var4 - 21, var5 - 1))
{ {
var1.setBlock(var3, var4 - 21, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 21, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 22, var5 - 1)) if (var1.isAirBlock(var3, var4 - 22, var5 - 1))
{ {
var1.setBlock(var3, var4 - 22, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 22, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 23, var5 - 1)) if (var1.isAirBlock(var3, var4 - 23, var5 - 1))
{ {
var1.setBlock(var3, var4 - 23, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 23, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 24, var5 - 1)) if (var1.isAirBlock(var3, var4 - 24, var5 - 1))
{ {
var1.setBlock(var3, var4 - 24, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 24, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4 - 25, var5 - 1)) if (var1.isAirBlock(var3, var4 - 25, var5 - 1))
{ {
var1.setBlock(var3, var4 - 25, var5 - 1, Block.vine.blockID, 1, 2); var1.setBlock(var3, var4 - 25, var5 - 1, Blocks.ivy.get().blockID, 1, 2);
} }
if (var1.isAirBlock(var3, var4, var5 + 1)) if (var1.isAirBlock(var3, var4, var5 + 1))
{ {
var1.setBlock(var3, var4, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 1, var5 + 1)) if (var1.isAirBlock(var3, var4 - 1, var5 + 1))
{ {
var1.setBlock(var3, var4 - 1, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 1, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 2, var5 + 1)) if (var1.isAirBlock(var3, var4 - 2, var5 + 1))
{ {
var1.setBlock(var3, var4 - 2, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 2, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 3, var5 + 1)) if (var1.isAirBlock(var3, var4 - 3, var5 + 1))
{ {
var1.setBlock(var3, var4 - 3, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 3, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 4, var5 + 1)) if (var1.isAirBlock(var3, var4 - 4, var5 + 1))
{ {
var1.setBlock(var3, var4 - 4, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 4, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 5, var5 + 1)) if (var1.isAirBlock(var3, var4 - 5, var5 + 1))
{ {
var1.setBlock(var3, var4 - 5, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 5, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 6, var5 + 1)) if (var1.isAirBlock(var3, var4 - 6, var5 + 1))
{ {
var1.setBlock(var3, var4 - 6, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 6, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 7, var5 + 1)) if (var1.isAirBlock(var3, var4 - 7, var5 + 1))
{ {
var1.setBlock(var3, var4 - 7, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 7, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 8, var5 + 1)) if (var1.isAirBlock(var3, var4 - 8, var5 + 1))
{ {
var1.setBlock(var3, var4 - 8, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 8, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 9, var5 + 1)) if (var1.isAirBlock(var3, var4 - 9, var5 + 1))
{ {
var1.setBlock(var3, var4 - 9, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 9, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 10, var5 + 1)) if (var1.isAirBlock(var3, var4 - 10, var5 + 1))
{ {
var1.setBlock(var3, var4 - 10, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 10, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 11, var5 + 1)) if (var1.isAirBlock(var3, var4 - 11, var5 + 1))
{ {
var1.setBlock(var3, var4 - 11, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 11, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 12, var5 + 1)) if (var1.isAirBlock(var3, var4 - 12, var5 + 1))
{ {
var1.setBlock(var3, var4 - 12, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 12, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 13, var5 + 1)) if (var1.isAirBlock(var3, var4 - 13, var5 + 1))
{ {
var1.setBlock(var3, var4 - 13, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 13, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 14, var5 + 1)) if (var1.isAirBlock(var3, var4 - 14, var5 + 1))
{ {
var1.setBlock(var3, var4 - 14, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 14, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 15, var5 + 1)) if (var1.isAirBlock(var3, var4 - 15, var5 + 1))
{ {
var1.setBlock(var3, var4 - 15, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 15, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 16, var5 + 1)) if (var1.isAirBlock(var3, var4 - 16, var5 + 1))
{ {
var1.setBlock(var3, var4 - 16, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 16, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 17, var5 + 1)) if (var1.isAirBlock(var3, var4 - 17, var5 + 1))
{ {
var1.setBlock(var3, var4 - 17, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 17, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 18, var5 + 1)) if (var1.isAirBlock(var3, var4 - 18, var5 + 1))
{ {
var1.setBlock(var3, var4 - 18, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 18, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 19, var5 + 1)) if (var1.isAirBlock(var3, var4 - 19, var5 + 1))
{ {
var1.setBlock(var3, var4 - 19, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 19, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 20, var5 + 1)) if (var1.isAirBlock(var3, var4 - 20, var5 + 1))
{ {
var1.setBlock(var3, var4 - 20, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 20, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 21, var5 + 1)) if (var1.isAirBlock(var3, var4 - 21, var5 + 1))
{ {
var1.setBlock(var3, var4 - 21, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 21, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 22, var5 + 1)) if (var1.isAirBlock(var3, var4 - 22, var5 + 1))
{ {
var1.setBlock(var3, var4 - 22, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 22, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 23, var5 + 1)) if (var1.isAirBlock(var3, var4 - 23, var5 + 1))
{ {
var1.setBlock(var3, var4 - 23, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 23, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 24, var5 + 1)) if (var1.isAirBlock(var3, var4 - 24, var5 + 1))
{ {
var1.setBlock(var3, var4 - 24, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 24, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 25, var5 + 1)) if (var1.isAirBlock(var3, var4 - 25, var5 + 1))
{ {
var1.setBlock(var3, var4 - 25, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 25, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 26, var5 + 1)) if (var1.isAirBlock(var3, var4 - 26, var5 + 1))
{ {
var1.setBlock(var3, var4 - 26, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 26, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 27, var5 + 1)) if (var1.isAirBlock(var3, var4 - 27, var5 + 1))
{ {
var1.setBlock(var3, var4 - 27, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 27, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 28, var5 + 1)) if (var1.isAirBlock(var3, var4 - 28, var5 + 1))
{ {
var1.setBlock(var3, var4 - 28, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 28, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 29, var5 + 1)) if (var1.isAirBlock(var3, var4 - 29, var5 + 1))
{ {
var1.setBlock(var3, var4 - 29, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 29, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
if (var1.isAirBlock(var3, var4 - 30, var5 + 1)) if (var1.isAirBlock(var3, var4 - 30, var5 + 1))
{ {
var1.setBlock(var3, var4 - 30, var5 + 1, Block.vine.blockID, 4, 2); var1.setBlock(var3, var4 - 30, var5 + 1, Blocks.ivy.get().blockID, 4, 2);
} }
return true; return true;

View file

@ -2,6 +2,9 @@ package biomesoplenty.worldgen;
import java.util.Random; import java.util.Random;
import biomesoplenty.api.Blocks;
import biomesoplenty.configuration.BOPBlocks;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -125,22 +128,22 @@ public class WorldGenSwampTall extends WorldGenerator
{ {
if (par1World.getBlockId(var12, var16, var13) == Block.leaves.blockID) if (par1World.getBlockId(var12, var16, var13) == Block.leaves.blockID)
{ {
if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var12 - 1, var16, var13) == 0) if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12 - 1, var16, var13) == 0)
{ {
this.generateVines(par1World, var12 - 1, var16, var13, 8); this.generateVines(par1World, var12 - 1, var16, var13, 8);
} }
if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var12 + 1, var16, var13) == 0) if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12 + 1, var16, var13) == 0)
{ {
this.generateVines(par1World, var12 + 1, var16, var13, 2); this.generateVines(par1World, var12 + 1, var16, var13, 2);
} }
if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var12, var16, var13 - 1) == 0) if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12, var16, var13 - 1) == 0)
{ {
this.generateVines(par1World, var12, var16, var13 - 1, 1); this.generateVines(par1World, var12, var16, var13 - 1, 1);
} }
if (par2Random.nextInt(4) == 0 && par1World.getBlockId(var12, var16, var13 + 1) == 0) if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12, var16, var13 + 1) == 0)
{ {
this.generateVines(par1World, var12, var16, var13 + 1, 4); this.generateVines(par1World, var12, var16, var13 + 1, 4);
} }
@ -168,7 +171,7 @@ public class WorldGenSwampTall extends WorldGenerator
*/ */
private void generateVines(World par1World, int par2, int par3, int par4, int par5) private void generateVines(World par1World, int par2, int par3, int par4, int par5)
{ {
this.setBlockAndMetadata(par1World, par2, par3, par4, Block.vine.blockID, par5); this.setBlockAndMetadata(par1World, par2, par3, par4, Blocks.ivy.get().blockID, par5);
int var6 = 8; int var6 = 8;
while (true) while (true)
@ -180,7 +183,7 @@ public class WorldGenSwampTall extends WorldGenerator
return; return;
} }
this.setBlockAndMetadata(par1World, par2, par3, par4, Block.vine.blockID, par5); this.setBlockAndMetadata(par1World, par2, par3, par4, Blocks.ivy.get().blockID, par5);
--var6; --var6;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B