String mod = "TConstruct";
String blockName = "ore.berries.two";
Block cropBlock = GameRegistry.findBlock(mod, blockName);
if(cropBlock != null) {
Item seedItem = GameRegistry.findItem(mod, blockName);
if(seedItem != null) {
for (int i = 0; i < 2; i++) {
PickableFarmer farmer = new NaturaBerryFarmer(cropBlock, i, 12 + i, new ItemStack(seedItem, 1, 8 + i));
farmer.setRequiresFarmland(false);
FarmersCommune.joinCommune(farmer);
}
}
}
blockName = "ore.berries.one";
cropBlock = GameRegistry.findBlock(mod, blockName);
if(cropBlock != null) {
Item seedItem = GameRegistry.findItem(mod, blockName);
if(seedItem != null) {
for (int i = 0; i < 4; i++) {
PickableFarmer farmer = new NaturaBerryFarmer(cropBlock, i, 12 + i, new ItemStack(seedItem, 1, 8 + i));
farmer.setRequiresFarmland(false);
FarmersCommune.joinCommune(farmer);