public ContainerTerraformer(InventoryPlayer par1InventoryPlayer, TileEntityTerraformer tileEntity)
{
this.tileEntity = tileEntity;
this.addSlotToContainer(new SlotSpecific(tileEntity, 0, 25, 19, new ItemStack(Items.water_bucket), new ItemStack(Items.bucket)));
this.addSlotToContainer(new SlotSpecific(tileEntity, 1, 25, 39, ItemElectricBase.class));
int var6;
int var7;
for (var6 = 0; var6 < 3; ++var6)
{
List<ItemStack> stacks = new ArrayList<ItemStack>();
if (var6 == 0)
{
stacks.add(new ItemStack(Items.dye, 1, 15));
}
else if (var6 == 1)
{
if (ContainerTerraformer.saplingList == null)
{
ContainerTerraformer.saplingList = new LinkedList();
Iterator iterator = Block.blockRegistry.getKeys().iterator();
while (iterator.hasNext())
{
Block b = (Block) Block.blockRegistry.getObject((String)iterator.next());
if (b instanceof BlockBush)
{
try {
Item item = Item.getItemFromBlock(b);
if (item != null)
{
//item.getSubItems(item, null, subItemsList); - can't use because clientside only
ContainerTerraformer.saplingList.add(new ItemStack(item, 1, 0));
String basicName = item.getUnlocalizedName(new ItemStack(item, 1, 0));
for (int i = 1; i < 16; i++)
{
ItemStack testStack = new ItemStack(item, 1, i);
String testName = item.getUnlocalizedName(testStack);
if (testName == null || testName.equals("") || testName.equals(basicName))
break;
ContainerTerraformer.saplingList.add(testStack);
}
}
} catch (Exception e) { }
}
}
}
stacks.addAll(ContainerTerraformer.saplingList);
}
else if (var6 == 2)
{
stacks.add(new ItemStack(Items.wheat_seeds));
}
for (var7 = 0; var7 < 4; ++var7)
{
this.addSlotToContainer(new SlotSpecific(tileEntity, var7 + var6 * 4 + 2, 25 + var7 * 18, 63 + var6 * 24, stacks.toArray(new ItemStack[stacks.size()])));
}
}
for (var6 = 0; var6 < 3; ++var6)
{