Replaced the Purified Grass/Dirt/Tall Grass blocks with new ones for the End

This commit is contained in:
Matt Caughey 2014-05-15 08:00:25 -04:00
parent 6cb2af3e6d
commit 53db3a416c
26 changed files with 24 additions and 652 deletions

View file

@ -223,7 +223,7 @@ public class BlockBOPFlower extends BOPBlockWorldDecor
return block == Blocks.waterlily; return block == Blocks.waterlily;
case 11: // Rainbow Flower case 11: // Rainbow Flower
return block == BOPBlockHelper.get("grass") || block == BOPBlockHelper.get("holyDirt") || block == Blocks.grass || block == Blocks.dirt; return block == BOPBlockHelper.get("grass") || block == Blocks.grass || block == Blocks.dirt;
case 12: // Bromeliad case 12: // Bromeliad
return block == BOPBlockHelper.get("hardDirt") || block == Blocks.hardened_clay || block == Blocks.sand; return block == BOPBlockHelper.get("hardDirt") || block == Blocks.hardened_clay || block == Blocks.sand;

View file

@ -14,7 +14,7 @@ public class BlockBOPGeneric extends Block
{ {
public enum BlockType public enum BlockType
{ {
ASH_STONE, HARD_SAND, HARD_DIRT, HARD_ICE, DRIED_DIRT, CRAG_ROCK, MUD_BRICK, HOLY_DIRT, CRYSTAL; ASH_STONE, HARD_SAND, HARD_DIRT, HARD_ICE, DRIED_DIRT, CRAG_ROCK, MUD_BRICK, SPECTRAL_SOIL, CRYSTAL;
} }
private IIcon texture; private IIcon texture;
@ -85,7 +85,7 @@ public class BlockBOPGeneric extends Block
this.setStepSound(Block.soundTypePiston); this.setStepSound(Block.soundTypePiston);
break; break;
case HOLY_DIRT: case SPECTRAL_SOIL:
//TODO: this.setHardness //TODO: this.setHardness
this.setHardness(0.6F); this.setHardness(0.6F);
//TODO setStepSound(Block.soundGravelFootstep) //TODO setStepSound(Block.soundGravelFootstep)
@ -142,8 +142,8 @@ public class BlockBOPGeneric extends Block
texture = iconRegister.registerIcon("biomesoplenty:mudbrick"); texture = iconRegister.registerIcon("biomesoplenty:mudbrick");
break; break;
case HOLY_DIRT: case SPECTRAL_SOIL:
texture = iconRegister.registerIcon("biomesoplenty:holydirt"); texture = iconRegister.registerIcon("biomesoplenty:spectralsoil");
break; break;
case CRYSTAL: case CRYSTAL:

View file

@ -47,13 +47,13 @@ public class BlockBOPGrass extends Block
//TODO: registerIcons() //TODO: registerIcons()
public void registerBlockIcons(IIconRegister iconRegister) public void registerBlockIcons(IIconRegister iconRegister)
{ {
this.icon[0][0] = iconRegister.registerIcon("biomesoplenty:holydirt"); this.icon[0][0] = iconRegister.registerIcon("biomesoplenty:spectralsoil");
this.icon[0][1] = iconRegister.registerIcon("biomesoplenty:holygrass_top"); this.icon[0][1] = iconRegister.registerIcon("biomesoplenty:spectralmoss_top");
this.icon[0][2] = iconRegister.registerIcon("biomesoplenty:holygrass_side"); this.icon[0][2] = iconRegister.registerIcon("biomesoplenty:spectralmoss_side");
this.icon[0][3] = iconRegister.registerIcon("biomesoplenty:holygrass_side"); this.icon[0][3] = iconRegister.registerIcon("biomesoplenty:spectralmoss_side");
this.icon[0][4] = iconRegister.registerIcon("biomesoplenty:holygrass_side"); this.icon[0][4] = iconRegister.registerIcon("biomesoplenty:spectralmoss_side");
this.icon[0][5] = iconRegister.registerIcon("biomesoplenty:holygrass_side"); this.icon[0][5] = iconRegister.registerIcon("biomesoplenty:spectralmoss_side");
this.icon[1][0] = iconRegister.registerIcon("biomesoplenty:smolderinggrass_bottom"); this.icon[1][0] = iconRegister.registerIcon("biomesoplenty:smolderinggrass_bottom");
this.icon[1][1] = iconRegister.registerIcon("biomesoplenty:smolderinggrass_top"); this.icon[1][1] = iconRegister.registerIcon("biomesoplenty:smolderinggrass_top");
@ -165,7 +165,7 @@ public class BlockBOPGrass extends Block
if (world.getBlockLightValue(x, y + 1, z) < 4 && world.getBlockLightOpacity(x, y + 1, z) > 2) if (world.getBlockLightValue(x, y + 1, z) < 4 && world.getBlockLightOpacity(x, y + 1, z) > 2)
{ {
//TODO: setBlock() //TODO: setBlock()
world.setBlock(x, y, z, BOPBlockHelper.get("holyDirt"), 0, 2); world.setBlock(x, y, z, BOPBlockHelper.get("spectralSoil"), 0, 2);
} }
else if (world.getBlockLightValue(x, y + 1, z) >= 9) else if (world.getBlockLightValue(x, y + 1, z) >= 9)
{ {
@ -178,7 +178,7 @@ public class BlockBOPGrass extends Block
Block block = world.getBlock(rX, rY + 1, rZ); Block block = world.getBlock(rX, rY + 1, rZ);
//TODO: getBlock() //TODO: getBlock()
if (world.getBlock(rX, rY, rZ) == BOPBlockHelper.get("holyDirt") && world.getBlockLightValue(rX, rY + 1, rZ) >= 4 && world.getBlockLightOpacity(rX, rY + 1, rZ) <= 2) if (world.getBlock(rX, rY, rZ) == BOPBlockHelper.get("spectralSoil") && world.getBlockLightValue(rX, rY + 1, rZ) >= 4 && world.getBlockLightOpacity(rX, rY + 1, rZ) <= 2)
{ {
//TODO: setBlock() //TODO: setBlock()
world.setBlock(rX, rY, rZ, BOPBlockHelper.get("grass"), 0, 2); world.setBlock(rX, rY, rZ, BOPBlockHelper.get("grass"), 0, 2);
@ -217,7 +217,7 @@ public class BlockBOPGrass extends Block
public Item getItemDropped(int metadata, Random random, int fortune) public Item getItemDropped(int metadata, Random random, int fortune)
{ {
//TODO: getItemFromBlock() getItemFromBlock() //TODO: getItemFromBlock() getItemFromBlock()
return metadata == 0 ? Item.getItemFromBlock(BOPBlockHelper.get("holyDirt")) : Item.getItemFromBlock(Blocks.dirt); return metadata == 0 ? Item.getItemFromBlock(BOPBlockHelper.get("spectralSoil")) : Item.getItemFromBlock(Blocks.dirt);
} }
} }

View file

@ -34,7 +34,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPPlant extends BOPBlockWorldDecor implements IShearable public class BlockBOPPlant extends BOPBlockWorldDecor implements IShearable
{ {
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed", "root"}; private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "spectralfern", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed", "root"};
private IIcon[] textures; private IIcon[] textures;
public IIcon reedbottom; public IIcon reedbottom;
@ -141,7 +141,7 @@ public class BlockBOPPlant extends BOPBlockWorldDecor implements IShearable
case 3: // Dune Grass case 3: // Dune Grass
return block == Blocks.sand; return block == Blocks.sand;
case 4: // Holy Tall Grass case 4: // Spectral Fern
return block == BOPBlockHelper.get("grass"); return block == BOPBlockHelper.get("grass");
case 5: // Thorns case 5: // Thorns
@ -172,7 +172,7 @@ public class BlockBOPPlant extends BOPBlockWorldDecor implements IShearable
return block == Blocks.water && reedwater != Blocks.water; return block == Blocks.water && reedwater != Blocks.water;
case 15: // Root case 15: // Root
return root != Blocks.air && (root == Blocks.grass || root == Blocks.dirt || root == Blocks.farmland || root == BOPBlockHelper.get("longGrass") || root == BOPBlockHelper.get("grass") || root == BOPBlockHelper.get("holyDirt")); return root != Blocks.air && (root == Blocks.grass || root == Blocks.dirt || root == Blocks.farmland || root == BOPBlockHelper.get("longGrass") || root == BOPBlockHelper.get("grass") || root == BOPBlockHelper.get("spectralSoil"));
default: default:
return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block == BOPBlockHelper.get("overgrownNetherrack"); return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block == BOPBlockHelper.get("overgrownNetherrack");

View file

@ -80,7 +80,7 @@ public class BlockBOPSapling extends BlockSapling
switch (metadata) switch (metadata)
{ {
case 7: // Loftwood case 7: // Loftwood
return block == BOPBlockHelper.get("grass") || block == BOPBlockHelper.get("holyDirt"); return block == BOPBlockHelper.get("grass");
default: default:
return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this); return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);

View file

@ -142,7 +142,7 @@ public class BOPBlocks
registerBlock(new BlockBOPGeneric(Material.sand, BlockType.HARD_SAND).setBlockName("hardSand")); registerBlock(new BlockBOPGeneric(Material.sand, BlockType.HARD_SAND).setBlockName("hardSand"));
registerBlock(new BlockBOPGeneric(Material.rock, BlockType.HARD_DIRT).setBlockName("hardDirt")); registerBlock(new BlockBOPGeneric(Material.rock, BlockType.HARD_DIRT).setBlockName("hardDirt"));
registerBlock(new BlockBOPGeneric(Material.sand, BlockType.HOLY_DIRT).setBlockName("holyDirt")); registerBlock(new BlockBOPGeneric(Material.sand, BlockType.SPECTRAL_SOIL).setBlockName("spectralSoil"));
registerBlock(new BlockBOPGeneric(Material.glass, BlockType.CRYSTAL).setBlockName("crystal")); registerBlock(new BlockBOPGeneric(Material.glass, BlockType.CRYSTAL).setBlockName("crystal"));

View file

@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack;
public class ItemBlockGrass extends ItemBlock public class ItemBlockGrass extends ItemBlock
{ {
private static final String[] types = new String[] {"holygrass", "smolderinggrass"}; private static final String[] types = new String[] {"spectralmoss", "smolderinggrass"};
public ItemBlockGrass(Block block) public ItemBlockGrass(Block block)
{ {

View file

@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemBlockPlant extends ItemBlock public class ItemBlockPlant extends ItemBlock
{ {
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed", "root"}; private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "spectralfern", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed", "root"};
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private IIcon[] textures; private IIcon[] textures;

View file

@ -1,146 +0,0 @@
package biomesoplenty.common.world.features.trees;
import java.util.Random;
import biomesoplenty.api.BOPBlockHelper;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenPromisedTree extends WorldGenAbstractTree
{
public WorldGenPromisedTree(boolean par1)
{
super(par1);
}
@Override
public boolean generate(World world, Random par2Random, int par3, int par4, int par5)
{
int var6 = par2Random.nextInt(9) + 9;
int var7 = 2 + par2Random.nextInt(4);
int var8 = var6 - var7;
int var9 = 2 + par2Random.nextInt(2);
boolean var10 = true;
Block block;
if (par4 >= 1 && par4 + var6 + 1 <= 256)
{
int var11;
int var13;
//int var15;
int var21;
for (var11 = par4; var11 <= par4 + 1 + var6 && var10; ++var11)
{
boolean var12 = true;
if (var11 - par4 < var7)
{
var21 = 0;
}
else
{
var21 = var9;
}
for (var13 = par3 - var21; var13 <= par3 + var21 && var10; ++var13)
{
for (int var14 = par5 - var21; var14 <= par5 + var21 && var10; ++var14)
{
if (var11 >= 0 && var11 < 256)
{
block = world.getBlock(var13, var11, var14);
if (!(block.isAir(world, var13, var11, var14) || block.isLeaves(world, var13, var11, var14)))
{
var10 = false;
}
}
else
{
var10 = false;
}
}
}
}
if (!var10)
return false;
else
{
//var11 = world.getBlockId(par3, par4 - 1, par5);
block = world.getBlock(par3, par4 - 1, par5);
if ((block == BOPBlockHelper.get("grass") || block == BOPBlockHelper.get("holyDirt")) && par4 < 256 - var6 - 1)
{
//this.setBlockAndMetadata(world, par3, par4 - 1, par5, Blocks.holyDirt.get().blockID, 0);
this.setBlockAndNotifyAdequately(world, par3, par4 - 1, par5, BOPBlockHelper.get("holyDirt"), 0);
var21 = par2Random.nextInt(2);
var13 = 1;
byte var22 = 0;
int var17;
int var16;
int var15;
for (var15 = 0; var15 <= var8; ++var15)
{
var16 = par4 + var6 - var15;
for (var17 = par3 - var21; var17 <= par3 + var21; ++var17)
{
int var18 = var17 - par3;
for (int var19 = par5 - var21; var19 <= par5 + var21; ++var19)
{
int var20 = var19 - par5;
if ((Math.abs(var18) != var21 || Math.abs(var20) != var21 || var21 <= 0) && !world.getBlock(var17, var16, var19).isOpaqueCube())
{
//this.setBlockAndMetadata(world, var17, var16, var19, Blocks.leaves2.get().blockID, 2);
this.setBlockAndNotifyAdequately(world, var17, var16, var19, BOPBlockHelper.get("leaves2"), 2);
}
}
}
if (var21 >= var13)
{
var21 = var22;
var22 = 1;
++var13;
if (var13 > var9)
{
var13 = var9;
}
}
else
{
++var21;
}
}
var15 = par2Random.nextInt(3);
for (var16 = 0; var16 < var6 - var15; ++var16)
{
//var17 = world.getBlockId(par3, par4 + var16, par5);
block = world.getBlock(par3, par4 + var16, par5);
if (block.isAir(world, par3, par4 + var16, par5) || block.isLeaves(world, par3, par4 + var16, par5))
{
//this.setBlockAndMetadata(world, par3, par4 + var16, par5, Blocks.logs2.get().blockID,0);
this.setBlockAndNotifyAdequately(world, par3, par4 + var16, par5, BOPBlockHelper.get("logs2"), 0);
}
}
return true;
} else
return false;
}
} else
return false;
}
}

View file

@ -1,123 +0,0 @@
package biomesoplenty.common.world.features.trees;
import java.util.Random;
import biomesoplenty.api.BOPBlockHelper;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenPromisedTree2 extends WorldGenAbstractTree
{
public WorldGenPromisedTree2(boolean par1)
{
super(par1);
}
@Override
public boolean generate(World world, Random par2Random, int par3, int par4, int par5)
{
int var6 = par2Random.nextInt(3) + 5;
boolean var7 = true;
Block block;
if (par4 >= 1 && par4 + var6 + 1 <= 256)
{
int var8;
int var10;
int var11;
int var12;
for (var8 = par4; var8 <= par4 + 1 + var6; ++var8)
{
byte var9 = 1;
if (var8 == par4)
{
var9 = 0;
}
if (var8 >= par4 + 1 + var6 - 2)
{
var9 = 2;
}
for (var10 = par3 - var9; var10 <= par3 + var9 && var7; ++var10)
{
for (var11 = par5 - var9; var11 <= par5 + var9 && var7; ++var11)
{
if (var8 >= 0 && var8 < 256)
{
//var12 = world.getBlockId(var10, var8, var11);
block = world.getBlock(var10, var8, var11);
//if (var12 != 0 && var12 != Blocks.leaves1.get().blockID)
//{
if (block.isAir(world, var10, var8, var11) || block.isLeaves(world, var10, var8, var11))
{
var7 = false;
}
}
else
{
var7 = false;
}
}
}
}
if (!var7)
return false;
else
{
block = world.getBlock(par3, par4 - 1, par5);
if ((block == BOPBlockHelper.get("grass") || block == BOPBlockHelper.get("holyDirt")) && par4 < 256 - var6 - 1)
{
//this.setBlockAndMetadata(world, par3, par4 - 1, par5, Blocks.holyDirt.get().blockID, 0);
this.setBlockAndNotifyAdequately(world, par3, par4 - 1, par5, BOPBlockHelper.get("holyDirt"), 0);
int var16;
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)
{
var10 = var16 - (par4 + var6);
var11 = 1 - var10 / 2;
for (var12 = par3 - var11; var12 <= par3 + var11; ++var12)
{
int var13 = var12 - par3;
for (int var14 = par5 - var11; var14 <= par5 + var11; ++var14)
{
int var15 = var14 - par5;
if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !world.getBlock(var12, var16, var14).isOpaqueCube())
{
//this.setBlockAndMetadata(world, var12, var16, var14, Blocks.leaves1.get().blockID, 2);
this.setBlockAndNotifyAdequately(world, var12, var16, var14, BOPBlockHelper.get("leaves1"), 2);}
}
}
}
for (var16 = 0; var16 < var6; ++var16)
{
//var10 = world.getBlockId(par3, par4 + var16, par5);
block = world.getBlock(par3, par4 + var16, par5);
if (!(block.isAir(world, par3, par4 + var16, par5) || block.isLeaves(world, par3, par4 + var16, par5)))
{
//this.setBlockAndMetadata(world, par3, par4 + var16, par5, Blocks.logs2.get().blockID,1);
this.setBlockAndNotifyAdequately(world, par3, par4 + var16, par5, BOPBlockHelper.get("logs2"), 1);
}
}
return true;
} else
return false;
}
} else
return false;
}
}

View file

@ -1,165 +0,0 @@
package biomesoplenty.common.world.features.trees;
import java.util.Random;
import biomesoplenty.api.BOPBlockHelper;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenPromisedTree3 extends WorldGenAbstractTree
{
public WorldGenPromisedTree3(boolean var1)
{
super(var1);
}
@Override
public boolean generate(World world, Random var2, int var3, int var4, int var5)
{
int var6 = var2.nextInt(20) + 30;
int var7 = var2.nextInt(5) + 10;
int var8 = var6 - var7;
int var9 = 2 + var2.nextInt(3);
boolean var10 = true;
if (var4 >= 1 && var4 + var6 + 1 <= 256)
{
int var11;
int var13;
int var14;
//int var15;
int var24;
for (var11 = var4; var11 <= var4 + 1 + var6 && var10; ++var11)
{
boolean var12 = true;
if (var11 - var4 < var7)
{
var24 = 0;
}
else
{
var24 = var9;
}
for (var13 = var3 - var24; var13 <= var3 + var24 && var10; ++var13)
{
for (var14 = var5 - var24; var14 <= var5 + var24 && var10; ++var14)
{
if (var11 >= 0 && var11 < 256)
{
Block block = world.getBlock(var13, var11, var14);
if (block.isAir(world, var13, var11, var14) || block.isLeaves(world, var13, var11, var14))
{
var10 = false;
}
}
else
{
var10 = false;
}
}
}
}
if (!var10)
return false;
else
{
Block block11 = world.getBlock(var3, var4 - 1, var5);
Block block24 = world.getBlock(var3 - 1, var4 - 1, var5);
Block block13 = world.getBlock(var3, var4 - 1, var5 - 1);
Block block14 = world.getBlock(var3 - 1, var4 - 1, var5 - 1);
if ((block11 == BOPBlockHelper.get("grass") || block11 == BOPBlockHelper.get("holyDirt")) && var4 < 256 - var6 - 1)
{
if ((block24 == BOPBlockHelper.get("grass") || block24 == BOPBlockHelper.get("holyDirt")) && var4 < 256 - var6 - 1)
{
if ((block13 == BOPBlockHelper.get("grass") || block13 == BOPBlockHelper.get("holyDirt")) && var4 < 256 - var6 - 1)
{
if ((block14 == BOPBlockHelper.get("grass") | block14 == BOPBlockHelper.get("holyDirt")) && var4 < 256 - var6 - 1)
{
world.setBlock(var3, var4 - 1, var5, BOPBlockHelper.get("holyDirt"), 0, 2);
world.setBlock(var3 - 1, var4 - 1, var5, BOPBlockHelper.get("holyDirt"), 0, 2);
world.setBlock(var3, var4 - 1, var5 - 1, BOPBlockHelper.get("holyDirt"), 0, 2);
world.setBlock(var3 - 1, var4 - 1, var5 - 1, BOPBlockHelper.get("holyDirt"), 0, 2);
int var15 = var2.nextInt(2);
int var16 = 1;
boolean var17 = false;
int var19;
int var18;
int var20;
for (var18 = 0; var18 <= var8; ++var18)
{
var19 = var4 + var6 - var18;
for (var20 = var3 - var15; var20 <= var3 + var15; ++var20)
{
int var21 = var20 - var3;
for (int var22 = var5 - var15; var22 <= var5 + var15; ++var22)
{
int var23 = var22 - var5;
if ((Math.abs(var21) != var15 || Math.abs(var23) != var15 || var15 <= 0) && !world.getBlock(var20, var19, var22).isOpaqueCube())
{
this.setBlockAndNotifyAdequately(world, var20, var19, var22, Blocks.leaves, 0);
this.setBlockAndNotifyAdequately(world, var20 - 1, var19, var22, Blocks.leaves, 0);
this.setBlockAndNotifyAdequately(world, var20, var19, var22 - 1, Blocks.leaves, 0);
this.setBlockAndNotifyAdequately(world, var20 - 1, var19, var22 - 1, Blocks.leaves, 0);
}
}
}
if (var15 >= var16)
{
var15 = var17 ? 1 : 0;
var17 = true;
++var16;
if (var16 > var9)
{
var16 = var9;
}
}
else
{
++var15;
}
}
var18 = var2.nextInt(3);
for (var19 = 0; var19 < var6 - var18; ++var19)
{
Block block = world.getBlock(var3, var4 + var19, var5);
if (block.isAir(world, var3, var4 + var19, var5) || block == Blocks.leaves)
{
this.setBlockAndNotifyAdequately(world, var3, var4 + var19, var5, Blocks.log, 0);
this.setBlockAndNotifyAdequately(world, var3 - 1, var4 + var19, var5, Blocks.log, 0);
this.setBlockAndNotifyAdequately(world, var3, var4 + var19, var5 - 1, Blocks.log, 0);
this.setBlockAndNotifyAdequately(world, var3 - 1, var4 + var19, var5 - 1, Blocks.log, 0);
}
}
return true;
} else
return false;
} else
return false;
} else
return false;
} else
return false;
}
} else
return false;
}
}

View file

@ -1,194 +0,0 @@
package biomesoplenty.common.world.features.trees;
import java.util.Random;
import biomesoplenty.api.BOPBlockHelper;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenPromisedWillowTree extends WorldGenAbstractTree
{
public WorldGenPromisedWillowTree(boolean p_i45448_1_) {
super(p_i45448_1_);
// TODO Auto-generated constructor stub
}
@Override
public boolean generate(World world, Random par2Random, int par3, int par4, int par5)
{
int var6;
Block block;
for (var6 = par2Random.nextInt(8) + 6; world.getBlock(par3, par4 - 1, par5) == Blocks.water; --par4)
{
;
}
boolean var7 = true;
if (par4 >= 1 && par4 + var6 + 1 <= 128)
{
int var8;
int var10;
int var11;
int var12;
for (var8 = par4; var8 <= par4 + 1 + var6; ++var8)
{
byte var9 = 1;
if (var8 == par4)
{
var9 = 0;
}
if (var8 >= par4 + 1 + var6 - 2)
{
var9 = 3;
}
for (var10 = par3 - var9; var10 <= par3 + var9 && var7; ++var10)
{
for (var11 = par5 - var9; var11 <= par5 + var9 && var7; ++var11)
{
if (var8 >= 0 && var8 < 128)
{
block = world.getBlock(var10, var8, var11);
if (block.isAir(world, var10, var8, var11) || block.isLeaves(world, var10, var8, var11))
{
if (block != Blocks.water)
{
var7 = false;
}
else if (var8 > par4)
{
var7 = false;
}
}
}
else
{
var7 = false;
}
}
}
}
if (!var7)
return false;
else
{
block = world.getBlock(par3, par4 - 1, par5);
if ((block == BOPBlockHelper.get("holyGrass") || block == BOPBlockHelper.get("holyDirt")) && par4 < 128 - var6 - 1)
{
this.setBlockAndNotifyAdequately(world, par3, par4 - 1, par5, BOPBlockHelper.get("holyDirt"), 0);
int var13;
int var16;
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)
{
var10 = var16 - (par4 + var6);
var11 = 2 - var10 / 2;
for (var12 = par3 - var11; var12 <= par3 + var11; ++var12)
{
var13 = var12 - par3;
for (int var14 = par5 - var11; var14 <= par5 + var11; ++var14)
{
int var15 = var14 - par5;
if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !world.getBlock(var12, var16, var14).isOpaqueCube())
{
this.setBlockAndNotifyAdequately(world, var12, var16, var14, Blocks.leaves, 4);
}
}
}
}
for (var16 = 0; var16 < var6; ++var16)
{
Block block2 = world.getBlock(par3, par4 + var16, par5);
//if (var10 == 0 || var10 == Block.leaves.blockID || block2 == Blocks.water)
if (block.isAir(world, par3, par4 + var16, par5) || block.isLeaves(world, par3, par4 + var16, par5) || block2 == Blocks.water)
{
this.setBlockAndNotifyAdequately(world, par3, par4 + var16, par5, Blocks.log, 0);
}
}
var16 = par4 - 3 + var6;
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)
{
var10 = var16 - (par4 + var6);
var11 = 2 - var10 / 2;
for (var12 = par3 - var11; var12 <= par3 + var11; ++var12)
{
for (var13 = par5 - var11; var13 <= par5 + var11; ++var13)
{
//if (world.getBlockId(var12, var16, var13) == Block.leaves.blockID)
Block block2 = world.getBlock(var12, var16, var13);
if (!(block.isAir(world, var12, var16, var13) || block.isLeaves(world, var12, var16, var13)))
{
if (par2Random.nextInt(4) == 0 && world.getBlock(var12 - 1, var16, var13).isAir(world, var12 - 1, var16, var13))
{
this.generateVines(world, var12 - 1, var16, var13, 8);
}
if (par2Random.nextInt(4) == 0 && world.getBlock(var12 + 1, var16, var13).isAir(world, var12 + 1, var16, var13))
{ {
this.generateVines(world, var12 + 1, var16, var13, 2);
}
if (par2Random.nextInt(4) == 0 && world.getBlock(var12, var16, var13 - 1).isAir(world, var12, var16, var13 - 1))
{
this.generateVines(world, var12, var16, var13 - 1, 1);
}
if (par2Random.nextInt(4) == 0 && world.getBlock(var12, var16, var13 + 1).isAir(world, var12, var16, var13 + 1))
{
this.generateVines(world, var12, var16, var13 + 1, 4);
}
}
}
}
}
return true;
}
}
else
return false;
}
} else
return false;
return false;
}
/**
* Generates vines at the given position until it hits a block.
*/
private void generateVines(World par1World, int par2, int par3, int par4, int par5)
{
this.setBlockAndNotifyAdequately(par1World, par2, par3, par4, Blocks.leaves, 4);
int var6 = 24;
while (true)
{
--par3;
if (!par1World.getBlock(par2, par3, par4).isAir(par1World, par2, par3, par4) || var6 <= 0)
return;
this.setBlockAndNotifyAdequately(par1World, par2, par3, par4, Blocks.leaves, 4);
--var6;
}
}
}

View file

@ -8,7 +8,7 @@ tile.hardIce.name=Hardened Ice
tile.driedDirt.name=Dried Dirt tile.driedDirt.name=Dried Dirt
tile.cragRock.name=Crag Rock tile.cragRock.name=Crag Rock
tile.mudBricks.name=Mud Bricks tile.mudBricks.name=Mud Bricks
tile.holyDirt.name=Purified Dirt tile.spectralSoil.name=Spectral Soil
tile.crystal.name=Celestial Crystal tile.crystal.name=Celestial Crystal
tile.rocks.limestone.name=Limestone tile.rocks.limestone.name=Limestone
@ -25,7 +25,7 @@ tile.plants.deadgrass.name=Dead Grass
tile.plants.desertgrass.name=Desert Grass tile.plants.desertgrass.name=Desert Grass
tile.plants.desertsprouts.name=Desert Sprouts tile.plants.desertsprouts.name=Desert Sprouts
tile.plants.dunegrass.name=Dune Grass tile.plants.dunegrass.name=Dune Grass
tile.plants.holytallgrass.name=Purified Tall Grass tile.plants.spectralfern.name=Spectral Fern
tile.plants.thorn.name=Thorns tile.plants.thorn.name=Thorns
tile.plants.barley.name=Barley tile.plants.barley.name=Barley
tile.plants.cattail.name=Cattail tile.plants.cattail.name=Cattail
@ -135,7 +135,7 @@ tile.coral.bluecoral.name=Blue Coral
tile.coral.glowcoral.name=Glowing Coral tile.coral.glowcoral.name=Glowing Coral
tile.coral.algae.name=Algae tile.coral.algae.name=Algae
tile.holyGrass.holygrass.name=Purified Grass Block tile.holyGrass.spectralmoss.name=Spectral Moss Block
tile.holyGrass.smolderinggrass.name=Smoldering Grass Block tile.holyGrass.smolderinggrass.name=Smoldering Grass Block
tile.gemOre.amethystore.name=Ender Amethyst Ore tile.gemOre.amethystore.name=Ender Amethyst Ore

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B