Skip to content

Commit

Permalink
Updated Forestry API. Removed obsolete integration for old farms, upd…
Browse files Browse the repository at this point in the history
…ated fermentation values to new baseline.
  • Loading branch information
SirSengir committed Apr 9, 2013
1 parent 35c00eb commit b593cec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 173 deletions.
80 changes: 0 additions & 80 deletions common/extrabiomes/module/amica/forestry/CropProviderSapling.java

This file was deleted.

78 changes: 0 additions & 78 deletions common/extrabiomes/module/amica/forestry/CropSapling.java

This file was deleted.

20 changes: 5 additions & 15 deletions common/extrabiomes/module/amica/forestry/ForestryPlugin.java
Expand Up @@ -38,13 +38,10 @@ public class ForestryPlugin {
private Object carpenterManager;
private static boolean enabled = true;

private ArrayList arborealCrops;
private ArrayList plainFlowers;
private ArrayList leafBlockIds;
private ArrayList[] backpackItems;

public static ArrayList loggerWindfall;

/**
* public void addRecipe(int packagingTime, LiquidStack liquid,
* ItemStack box, ItemStack product, Object materials[]);
Expand All @@ -71,6 +68,8 @@ public class ForestryPlugin {

private static final int FORESTER = 2;

private static final int BIOMASS_SAPLINGS = 200;

static ItemStack getBlock(String name) {
try {
return (ItemStack) getForestryBlock.get().invoke(null, name);
Expand Down Expand Up @@ -98,11 +97,11 @@ private void addBasicFlowers() {
}

private void addFermenterRecipeSapling(ItemStack resource) throws Exception {
fermenterAddRecipe.get().invoke(fermenterManager, resource, 800, 1.0f,
fermenterAddRecipe.get().invoke(fermenterManager, resource, BIOMASS_SAPLINGS, 1.0f,
getLiquidStack("liquidBiomass"), new LiquidStack(Block.waterStill.blockID, 1, 0));
fermenterAddRecipe.get().invoke(fermenterManager, resource, 800, 1.5f,
fermenterAddRecipe.get().invoke(fermenterManager, resource, BIOMASS_SAPLINGS, 1.5f,
getLiquidStack("liquidBiomass"), getLiquidStack("liquidJuice"));
fermenterAddRecipe.get().invoke(fermenterManager, resource, 800, 1.5f,
fermenterAddRecipe.get().invoke(fermenterManager, resource, BIOMASS_SAPLINGS, 1.5f,
getLiquidStack("liquidBiomass"), getLiquidStack("liquidHoney"));
}

Expand Down Expand Up @@ -130,7 +129,6 @@ private void addSaplings() {
TreeSoilRegistry.addValidSoil(Block.blocksList[soil.get().itemID]);
BlockCustomSapling.setForestrySoilID(soil.get().itemID);
}
arborealCrops.add(new CropProviderSapling());

for(ItemStack sapling : ForestryModHelper.getSaplings())
FMLInterModComms.sendMessage("Forestry", "add-farmable-sapling", String.format("farmArboreal@%s.%s", sapling.itemID, sapling.getItemDamage()));
Expand Down Expand Up @@ -173,14 +171,6 @@ public void preInit(PluginEvent.Pre event) {
fld = cls.getField("carpenterManager");
carpenterManager = fld.get(null);

cls = Class.forName("forestry.api.core.ForestryAPI");
fld = cls.getField("loggerWindfall");
loggerWindfall = (ArrayList) fld.get(null);

cls = Class.forName("forestry.api.cultivation.CropProviders");
fld = cls.getField("arborealCrops");
arborealCrops = (ArrayList) fld.get(null);

cls = Class.forName("forestry.api.apiculture.FlowerManager");
fld = cls.getField("plainFlowers");
plainFlowers = (ArrayList) fld.get(null);
Expand Down

0 comments on commit b593cec

Please sign in to comment.