package net.minecraft.src;
import java.util.Random;
public class WorldGenTowerOne extends WorldGenerator
{
public WorldGenTowerOne()
{
}
public boolean generate(World world, Random rand, int i, int j, int k)
{
int bID = 2; /*2 is the block id for grass, so the structure going to spawn on grass*/
if(world.getBlockId(i, j, k) != bID || world.getBlockId(i, j + 1, k) != 0 || world.getBlockId(i + 7, j, k) != bID || world.getBlockId(i + 7, j, k + 7) != bID || world.getBlockId(i, j, k + 7) != bID || world.getBlockId(i + 7, j + 1, k) != 0 || world.getBlockId(i + 7, j + 1, k + 7) != 0 || world.getBlockId(i, j + 1, k + 7) != 0)
{
return false;
}
world.setBlock(i + 0, j + 0, k + 4, 98);
world.setBlock(i + 0, j + 0, k + 2, 109);
world.setBlock(i + 0, j + 0, k + 0, 98);
world.setBlock(i + 1, j + 0, k + 3, 48);
world.setBlock(i + 1, j + 0, k + 1, 48);
world.setBlock(i + 2, j + 0, k + 4, 109);
world.setBlock(i + 2, j + 0, k + 2, 54);
world.setBlock(i + 2, j + 0, k + 0, 109);
world.setBlock(i + 3, j + 0, k + 3, 48);
world.setBlock(i + 3, j + 0, k + 1, 48);
world.setBlock(i + 4, j + 0, k + 4, 98);
world.setBlock(i + 4, j + 0, k + 2, 109);
world.setBlock(i + 4, j + 0, k + 0, 98);
world.setBlock(i + 1, j + 1, k + 3, 48);
world.setBlock(i + 1, j + 1, k + 1, 48);
world.setBlock(i + 3, j + 1, k + 3, 48);
world.setBlock(i + 3, j + 1, k + 1, 48);
world.setBlock(i + 1, j + 2, k + 3, 4);
world.setBlock(i + 1, j + 2, k + 2, 4);
world.setBlock(i + 1, j + 2, k + 1, 98);
world.setBlock(i + 2, j + 2, k + 3, 4);
world.setBlock(i + 2, j + 2, k + 2, 98);
world.setBlock(i + 2, j + 2, k + 1, 4);
world.setBlock(i + 3, j + 2, k + 3, 4);
world.setBlock(i + 3, j + 2, k + 2, 98);
world.setBlock(i + 3, j + 2, k + 1, 4);
world.setBlock(i + 0, j + 3, k + 4, 98);
world.setBlock(i + 0, j + 3, k + 0, 98);
world.setBlock(i + 1, j + 3, k + 3, 98);
world.setBlock(i + 1, j + 3, k + 1, 98);
world.setBlock(i + 3, j + 3, k + 3, 4);
world.setBlock(i + 3, j + 3, k + 1, 98);
world.setBlock(i + 4, j + 3, k + 4, 98);
world.setBlock(i + 4, j + 3, k + 0, 98);
int chest = Block.chect.blockID;
world.setBlockWithNotify (i, j + 1, k, chest);
TileEntityChest tileentitychest = (TileEntityChest)world.getBlockTileEntity(i + 2, j + 0, k + 2,);
if (tileentitychect != null && tileentitychest.getSizeInventory() > 0) {
ItemStack itemstack = new ItemStack(Block.torchWood, 2);
ItemStack itemstack = new ItemStack(Item.Bucket, 1);
ItemStack itemstack = new ItemStack(Item.AppleGold, 1);
ItemStack itemstack = new ItemStack(Item.EnderPearl, 2);
ItemStack itemstack = new ItemStack(Item.Soup, 1);
ItemStack itemstack = new ItemStack(Block.Pumpkin, 2);
tileentitychect.setInventorySlotContents(0, itemstack);
}
return true;
}
}