diff --git a/apis/thermalexpansion/api/ThermalExpansionInfo.java b/apis/thermalexpansion/api/ThermalExpansionInfo.java deleted file mode 100644 index 77dec2c61..000000000 --- a/apis/thermalexpansion/api/ThermalExpansionInfo.java +++ /dev/null @@ -1,53 +0,0 @@ - -package thermalexpansion.api; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.registry.GameRegistry; - -/** - * This class contains some general hooks that can be useful if Thermal Expansion is installed. - */ -public class ThermalExpansionInfo { - - public static ItemStack coal = new ItemStack(Item.coal, 1, 0); - public static ItemStack charcoal = new ItemStack(Item.coal, 1, 1); - - public static int lavaFuelValue = 18000; - - public static int getFuelValue(ItemStack theFuel) { - - if (theFuel == null) { - return 0; - } - if (theFuel.isItemEqual(coal)) { - return 4800; - } - if (theFuel.isItemEqual(charcoal)) { - return 3200; - } - int itemId = theFuel.getItem().itemID; - if (theFuel.getItem() instanceof ItemBlock && Block.blocksList[itemId].blockMaterial == Material.wood) { - return 450; - } - if (itemId == Item.stick.itemID) { - return 150; - } - if (itemId == Block.sapling.blockID) { - return 150; - } - return GameRegistry.getFuelValue(theFuel) * 3 / 2; - } - - /*public static int getFuelValue(LiquidStack theFuel) { - - if (theFuel.itemID == Block.lavaStill.blockID) { - return lavaFuelValue; - } - return 0; - }*/ - -} diff --git a/apis/thermalexpansion/api/crafting/CraftingHelpers.java b/apis/thermalexpansion/api/crafting/CraftingHelpers.java deleted file mode 100644 index aeb10bdb4..000000000 --- a/apis/thermalexpansion/api/crafting/CraftingHelpers.java +++ /dev/null @@ -1,106 +0,0 @@ - -package thermalexpansion.api.crafting; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import thermalexpansion.api.item.ItemRegistry; - -/** - * This class adds some basic and fool-proof recipe handlers that can help you out. They will add - * simple recipes that follow the TE defaults - they are not the only way of adding recipes. You can - * also use the more specific recipe functions defined in the Manager interfaces if necessary. Once - * again, only call these during @PostInit or things may not go so rosy. - */ -public class CraftingHelpers { - - private static ItemStack sawdust = ItemRegistry.getItem("sawdust", 1); - private static ItemStack slag = ItemRegistry.getItem("slag", 1); - private static ItemStack slagRich = ItemRegistry.getItem("slagRich", 1); - private static ItemStack fluxSand = new ItemStack(Block.sand); - - /** - * Ore x1 to Dust x2 conversion. 400 MJ. Will return false if recipe already exists. - */ - public static boolean addPulverizerOreToDustRecipe(ItemStack inputOre, ItemStack outputDust) { - - ItemStack ore = inputOre.copy(); - ore.stackSize = 1; - - ItemStack primaryDust = outputDust.copy(); - primaryDust.stackSize = 2; - - return CraftingManagers.pulverizerManager.addRecipe(400, ore, primaryDust, false); - } - - /** - * Ore x1 to Dust x2 conversion, 10% chance of Secondary x1 being generated. 400 MJ. Will return - * false if recipe already exists. - */ - public static boolean addPulverizerOreToDustRecipe(ItemStack inputOre, ItemStack outputDust, ItemStack outputSecondary) { - - ItemStack ore = inputOre.copy(); - ore.stackSize = 1; - - ItemStack primaryDust = outputDust.copy(); - primaryDust.stackSize = 2; - - ItemStack secondary = outputSecondary.copy(); - secondary.stackSize = 1; - - return CraftingManagers.pulverizerManager.addRecipe(400, ore, primaryDust, secondary, 10, false); - } - - /** - * Log x1 to Plank x6 conversion, 100% chance of Sawdust. 80 MJ. Will return false if recipe - * already exists. - */ - public static boolean addSawmillLogToPlankRecipe(ItemStack inputLog, ItemStack outputPlanks) { - - ItemStack log = inputLog.copy(); - log.stackSize = 1; - - ItemStack planks = outputPlanks.copy(); - planks.stackSize = 6; - - return CraftingManagers.sawmillManager.addRecipe(80, log, planks, sawdust, false); - } - - /** - * Dust x2, Sand x1 to Ingot x2, 25% chance of Slag. 80 MJ. Will return false if recipe already - * exists. - */ - public static boolean addSmelterDustToIngotsRecipe(ItemStack inputDust, ItemStack outputIngots) { - - ItemStack dust = inputDust.copy(); - dust.stackSize = 2; - - ItemStack ingots = outputIngots.copy(); - ingots.stackSize = 2; - - return CraftingManagers.smelterManager.addRecipe(80, dust, fluxSand, ingots, slag, 25, false); - } - - /** - * Ore x1, Sand x1 to Ingot x2, 5% chance of Rich Slag. 320 MJ. Also, Ore x1, Rich Slag x1 to - * Ingot x3, 75% chance of Slag. 400 MJ. Will return false if recipe already exists. - */ - public static boolean addSmelterOreToIngotsRecipe(ItemStack inputOre, ItemStack outputIngots) { - - ItemStack ore = inputOre.copy(); - ore.stackSize = 1; - - ItemStack ingots2 = outputIngots.copy(); - ingots2.stackSize = 2; - - ItemStack ingots3 = outputIngots.copy(); - ingots3.stackSize = 3; - - if (!CraftingManagers.smelterManager.addRecipe(320, ore, fluxSand, ingots2, slagRich, 5, false)) { - return false; - } - if (!CraftingManagers.smelterManager.addRecipe(400, ore, slagRich, ingots3, slag, 75, false)) { - return false; - } - return true; - } -} diff --git a/apis/thermalexpansion/api/crafting/CraftingManagers.java b/apis/thermalexpansion/api/crafting/CraftingManagers.java deleted file mode 100644 index 43d911496..000000000 --- a/apis/thermalexpansion/api/crafting/CraftingManagers.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -/** - * Allows access to all of the Thermal Expansion crafting managers. Add your recipes during @PostInit - * or risk a null pointer. :) - */ - -public class CraftingManagers { - - /** - * Allows you to add recipes to the Magma Crucible. See {@link ICrucibleManager} for details. - */ - public static ICrucibleManager crucibleManager; - - /** - * Allows you to add recipes to the Liquid Transposer. See {@link ITransposerManager} for - * details. - */ - public static ITransposerManager transposerManager; - - /** - * Allows you to add recipes to the Powered Furnace. See {@link IFurnaceManager} for details. - */ - public static IFurnaceManager furnaceManager; - - /** - * Allows you to add recipes to the Pulverizer. See {@link IPulverizerManager} for details. - */ - public static IPulverizerManager pulverizerManager; - - /** - * Allows you to add recipes to the Sawmill. See {@link ISawmillManager} for details. - */ - public static ISawmillManager sawmillManager; - - /** - * Allows you to add recipes to the Induction Smelter. See {@link ISmelterManager} for details. - */ - public static ISmelterManager smelterManager; -} diff --git a/apis/thermalexpansion/api/crafting/ICrucibleManager.java b/apis/thermalexpansion/api/crafting/ICrucibleManager.java deleted file mode 100644 index cd9b9762c..000000000 --- a/apis/thermalexpansion/api/crafting/ICrucibleManager.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - - -/** - * Provides an interface to the recipe manager of the Crucible. Accessible via - * {@link CraftingManagers.crucibleManager} - */ -public interface ICrucibleManager { - - /** - * Add a recipe to the Crucible. - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param output - * LiquidStack representing the output liquid. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - //public boolean addRecipe(int energy, ItemStack input, LiquidStack output, boolean overwrite); - - // public boolean addRecipe(int energy, ItemStack input, LiquidStack output); - - /** - * Access to the full list of recipes. - */ - ICrucibleRecipe[] getRecipeList(); -} diff --git a/apis/thermalexpansion/api/crafting/ICrucibleRecipe.java b/apis/thermalexpansion/api/crafting/ICrucibleRecipe.java deleted file mode 100644 index 0f72d4612..000000000 --- a/apis/thermalexpansion/api/crafting/ICrucibleRecipe.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -public interface ICrucibleRecipe { - - public ItemStack getInput(); - - //public LiquidStack getOutput(); - - public int getEnergy(); -} diff --git a/apis/thermalexpansion/api/crafting/IFurnaceManager.java b/apis/thermalexpansion/api/crafting/IFurnaceManager.java deleted file mode 100644 index ed2103506..000000000 --- a/apis/thermalexpansion/api/crafting/IFurnaceManager.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the Powered Furnace. Accessible via - * {@link CraftingManagers.FurnaceManager} - */ -public interface IFurnaceManager { - - /** - * Add a recipe to the Powered Furnace. - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param output - * ItemStack representing the output item. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack input, ItemStack output, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack input, ItemStack output); - - /** - * Access to the full list of recipes. - */ - IFurnaceRecipe[] getRecipeList(); -} diff --git a/apis/thermalexpansion/api/crafting/IFurnaceRecipe.java b/apis/thermalexpansion/api/crafting/IFurnaceRecipe.java deleted file mode 100644 index 10f954c7a..000000000 --- a/apis/thermalexpansion/api/crafting/IFurnaceRecipe.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -public interface IFurnaceRecipe { - - public ItemStack getInput(); - - public ItemStack getOutput(); - - public int getEnergy(); -} diff --git a/apis/thermalexpansion/api/crafting/IPulverizerManager.java b/apis/thermalexpansion/api/crafting/IPulverizerManager.java deleted file mode 100644 index c354ee727..000000000 --- a/apis/thermalexpansion/api/crafting/IPulverizerManager.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the Pulverizer. Accessible via - * {@link CraftingManagers.pulverizerManager} - */ -public interface IPulverizerManager { - - /** - * Add a recipe to the Pulverizer - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param primaryOutput - * ItemStack representing the primary (only) output product. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput); - - /** - * Add a recipe to the Pulverizer - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param primaryOutput - * ItemStack representing the primary output product. - * @param secondaryOutput - * ItemStack representing the secondary output product. Product % is taken to be 100. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput); - - /** - * Add a recipe to the Pulverizer - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param outputPrimary - * ItemStack representing the primary output product. - * @param outputSecondary - * ItemStack representing the secondary output product. - * @param secondaryChance - * Integer representing % chance (out of 100) of the secondary product being created. - * - @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance); - - /** - * Access to the list of recipes. - */ - IPulverizerRecipe[] getRecipeList(); -} diff --git a/apis/thermalexpansion/api/crafting/IPulverizerRecipe.java b/apis/thermalexpansion/api/crafting/IPulverizerRecipe.java deleted file mode 100644 index 47979ba51..000000000 --- a/apis/thermalexpansion/api/crafting/IPulverizerRecipe.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -public interface IPulverizerRecipe { - - public ItemStack getInput(); - - public ItemStack getPrimaryOutput(); - - public ItemStack getSecondaryOutput(); - - public int getSecondaryOutputChance(); - - public int getEnergy(); -} diff --git a/apis/thermalexpansion/api/crafting/ISawmillManager.java b/apis/thermalexpansion/api/crafting/ISawmillManager.java deleted file mode 100644 index dffc8c2d9..000000000 --- a/apis/thermalexpansion/api/crafting/ISawmillManager.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the Sawmill. Accessible via - * {@link CraftingManagers.sawmillManager} - */ -public interface ISawmillManager { - - /** - * Add a recipe to the Sawmill - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param primaryOutput - * ItemStack representing the primary (only) output product. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput); - - /** - * Add a recipe to the Sawmill - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param primaryOutput - * ItemStack representing the primary output product. - * @param secondaryOutput - * ItemStack representing the secondary output product. Product % is taken to be 100. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput); - - /** - * Add a recipe to the Sawmill - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param outputprimaryOutput - * ItemStack representing the primary output product. - * @param outputsecondaryOutput - * ItemStack representing the secondary output product. - * @param secondaryChance - * Integer representing % chance (out of 100) of the secondary product being created. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance); - - /** - * Access to the list of recipes. - */ - ISawmillRecipe[] getRecipeList(); -} diff --git a/apis/thermalexpansion/api/crafting/ISawmillRecipe.java b/apis/thermalexpansion/api/crafting/ISawmillRecipe.java deleted file mode 100644 index 3a5b8c43c..000000000 --- a/apis/thermalexpansion/api/crafting/ISawmillRecipe.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -public interface ISawmillRecipe { - - public ItemStack getInput(); - - public ItemStack getPrimaryOutput(); - - public ItemStack getSecondaryOutput(); - - public int getSecondaryOutputChance(); - - public int getEnergy(); -} diff --git a/apis/thermalexpansion/api/crafting/ISmelterManager.java b/apis/thermalexpansion/api/crafting/ISmelterManager.java deleted file mode 100644 index 192973a37..000000000 --- a/apis/thermalexpansion/api/crafting/ISmelterManager.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the Induction Smelter. Accessible via - * {@link CraftingManagers.smelterManager} - */ -public interface ISmelterManager { - - /** - * Add a recipe to the Induction Smelter - * - * @param energy - * Energy needed to process the item. - * @param primaryInput - * ItemStack representing the primary input item. - * @param secondaryInput - * ItemStack representing the secondary input item. - * @param primaryOutput - * ItemStack representing the primary (only) output product. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput); - - /** - * Add a recipe to the Induction Smelter - * - * @param energy - * Energy needed to process the item. - * @param primaryInput - * ItemStack representing the primary input item. - * @param secondaryInput - * ItemStack representing the secondary input item. - * @param primaryOutput - * ItemStack representing the primary output product. - * @param secondaryOutput - * ItemStack representing the secondary output product. Product % is taken to be 100. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, boolean overwrite); - - public boolean addRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput); - - /** - * Add a recipe to the Induction Smelter - * - * @param energy - * Energy needed to process the item. - * @param primaryInput - * ItemStack representing the primary input item. - * @param secondaryInput - * ItemStack representing the secondary input item. - * @param primaryOutput - * ItemStack representing the primary output product. - * @param secondaryOutput - * ItemStack representing the secondary output product. - * @param secondaryChance - * Integer representing % chance (out of 100) of the secondary product being created. - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - public boolean addRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance, - boolean overwrite); - - public boolean addRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance); - - /** - * Access to the list of recipes. - */ - ISmelterRecipe[] getRecipeList(); -} diff --git a/apis/thermalexpansion/api/crafting/ISmelterRecipe.java b/apis/thermalexpansion/api/crafting/ISmelterRecipe.java deleted file mode 100644 index 92eda1852..000000000 --- a/apis/thermalexpansion/api/crafting/ISmelterRecipe.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -public interface ISmelterRecipe { - - public ItemStack getPrimaryInput(); - - public ItemStack getSecondaryInput(); - - public ItemStack getPrimaryOutput(); - - public ItemStack getSecondaryOutput(); - - public int getSecondaryOutputChance(); - - public int getEnergy(); -} diff --git a/apis/thermalexpansion/api/crafting/ITransposerManager.java b/apis/thermalexpansion/api/crafting/ITransposerManager.java deleted file mode 100644 index 2cf82cee4..000000000 --- a/apis/thermalexpansion/api/crafting/ITransposerManager.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - - -/** - * Provides an interface to the recipe manager of the Liquid Transposer. Accessible via - * {@link CraftingManagers.transposerManager} - */ -public interface ITransposerManager { - - /** - * Add a recipe to the Liquid Transposer - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param output - * ItemStack representing the output item. - * @param liquid - * LiquidStack representing the required liquid. - * @param reversible - * Flag the recipe as reversible (container can be emptied). - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - //public boolean addFillRecipe(int energy, ItemStack input, ItemStack output, LiquidStack liquid, boolean reversible, boolean overwrite); - - //public boolean addFillRecipe(int energy, ItemStack input, ItemStack output, LiquidStack liquid, boolean reversible); - - /** - * Add a recipe to the Liquid Transposer - * - * @param energy - * Energy needed to process the item. - * @param input - * ItemStack representing the input item. - * @param output - * ItemStack representing the output item - this can be NULL if necessary, if the - * recipe is NOT reversible. - * @param liquid - * LiquidStack representing the required liquid. - * @param chance - * Integer representing % chance (out of 100) of receiving the item - liquid will - * always be extracted. If output is NULL, this MUST be set to 0. The recipe will not - * be added otherwise. - * @param reversible - * Flag the recipe as reversible (container can be filled). - * @param overwrite - * Flag to enable recipe overwriting. This will only be allowed if enabled in the - * Thermal Expansion Configuration file and will be logged for information purposes. - */ - //public boolean addExtractionRecipe(int energy, ItemStack input, ItemStack output, LiquidStack liquid, int chance, boolean reversible, boolean overwrite); - - //public boolean addExtractionRecipe(int energy, ItemStack input, ItemStack output, LiquidStack liquid, int chance, boolean reversible); - - /** - * Access to the list of recipes. - */ - ITransposerRecipe[] getFillRecipeList(); - - ITransposerRecipe[] getExtractionRecipeList(); -} diff --git a/apis/thermalexpansion/api/crafting/ITransposerRecipe.java b/apis/thermalexpansion/api/crafting/ITransposerRecipe.java deleted file mode 100644 index 074104c49..000000000 --- a/apis/thermalexpansion/api/crafting/ITransposerRecipe.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Team CoFH - * - * Thermal Expansion - */ - -package thermalexpansion.api.crafting; - -import net.minecraft.item.ItemStack; - -public interface ITransposerRecipe { - - public ItemStack getInput(); - - public ItemStack getOutput(); - - //public LiquidStack getLiquid(); - - public int getEnergy(); - - public int getChance(); -} diff --git a/apis/thermalexpansion/api/item/IChargeableItem.java b/apis/thermalexpansion/api/item/IChargeableItem.java deleted file mode 100644 index 65ed04dd5..000000000 --- a/apis/thermalexpansion/api/item/IChargeableItem.java +++ /dev/null @@ -1,52 +0,0 @@ - -package thermalexpansion.api.item; - -import net.minecraft.item.ItemStack; - -/** - * Implement this interface on Item classes that support external manipulation of their internal - * energy storages. This interface does not provide methods for the underlying internal energy - * usage. - */ - -public interface IChargeableItem { - - /** - * Adds energy to an item. Returns the quantity of energy that was accepted. This should always - * return 0 if the item cannot be externally charged. - * - * @param theItem - * ItemStack to be charged. - * @param energy - * Maximum amount of energy to be sent into the item. - * @param doReceive - * If false, the charge will only be simulated. - * @return Amount of energy that was accepted by the item. - */ - public float receiveEnergy(ItemStack theItem, float energy, boolean doReceive); - - /** - * Removes energy from an item. Returns the quantity of energy that was removed. This should - * always return 0 if the item cannot be externally discharged. - * - * @param theItem - * ItemStack to be discharged. - * @param energy - * Maximum amount of energy to be removed from the item. - * @param doTransfer - * If false, the discharge will only be simulated. - * @return Amount of energy that was removed from the item. - */ - public float transferEnergy(ItemStack theItem, float energy, boolean doTransfer); - - /** - * Get the amount of energy currently stored in the item. - */ - public float getEnergyStored(ItemStack theItem); - - /** - * Get the max amount of energy that can be stored in the item. - */ - public float getMaxEnergyStored(ItemStack theItem); - -} diff --git a/apis/thermalexpansion/api/item/ItemRegistry.java b/apis/thermalexpansion/api/item/ItemRegistry.java deleted file mode 100644 index e4d212370..000000000 --- a/apis/thermalexpansion/api/item/ItemRegistry.java +++ /dev/null @@ -1,123 +0,0 @@ - -package thermalexpansion.api.item; - -import java.util.Map; -import java.util.TreeMap; - -import net.minecraft.item.ItemStack; - -public final class ItemRegistry { - - private static final Map registry = new TreeMap(); - - /** - * Returns an ItemStack containing the item that corresponds to the provided name. - * - * @param name - * Name of the item. - * @param qty - * Requested quantity of the item. - */ - public static ItemStack getItem(String name, int qty) { - - ItemStack result = registry.get(name); - if (result != null) { - result = result.copy(); - result.stackSize = qty; - } - return result; - } - - /** - * Registers a new item with the ItemRegistry. - * - * @param name - * Name of the item. - * @param item - * ItemStack representing the item. - */ - public static void registerItem(String name, ItemStack item) { - - registry.put(name, item); - } - - /** - * Print a list of all currently registered items to the console. - */ - public static void printItemNames() { - - System.out.println("Printing all registered Thermal Expansion items:"); - for (String itemName : registry.keySet()) { - System.out.println(itemName); - } - } - - // String identifiers for obtaining Thermal Expansion Items: - - // dustIron - Dust obtained by pulverizing Iron Ore. - // dustGold - Dust obtained by pulverizing Gold Ore. - // dustObsidian - Dust obtained by pulverizing Obsidian. - // dustCopper - Dust obtained by pulverizing Copper Ore. - // dustTin - Dust obtained by pulverizing Tin Ore. - // dustSilver - Dust obtained by pulverizing Silver Ore. - // dustLead - Dust obtained by pulverizing Lead Ore. - // dustNickel - Dust obtained by pulverizing Ferrous Ore. - // dustPlatinum - Dust obtained as a secondary output from pulverizing Ferrous Ore (Shiny - // Ingots). - // dustElectrum - Dust obtained by crafting Gold and Silver Dusts together. - // dustInvar - Dust obtained by crafting 2 Iron Dusts and Ferrous Dust. - // dustBronze - Uncraftable - // dustBrass - Uncraftable - - // ingotCopper - Ingot obtained by smelting Copper Dust. - // ingotTin - Ingot obtained by smelting Tin Dust. - // ingotSilver - Ingot obtained by smelting Silver Dust. - // ingotLead - Ingot obtained by smelting Lead Dust. - // ingotNickel - Ingot obtained by smelting Ferrous Dust. - // ingotPlatinum - Ingot obtained by smelting Shiny Dust. - // ingotElectrum - Ingot obtained by smelting Electrum Dust. - // ingotInvar - Ingot obtained by smelting Invar Dust. - - // nuggetCopper - Nugget obtained from Copper Ingots. - // nuggetTin - Nugget obtained from Tin Ingots. - // nuggetSilver - Nugget obtained from Silver Ingots. - // nuggetLead - Nugget obtained from Lead Ingots. - // nuggetNickel - Nugget obtained from Ferrous Ingots. - // nuggetPlatinum - Nugget obtained from Shiny Ingots. - // nuggetElectrum - Nugget obtained from Electrum Ingots. - // nuggetInvar - Nugget obtained from Invar Ingots. - - // crystalSulfur - Sulfur - // crystalNiter - Niter - - // woodchips - Woodchips obtained by putting logs in a Pulverizer. - // sawdust - Sawdust obtained - // through the Sawmill. - // sawdustCompressed - Sawdust compressed into one item. - // slag - Slag obtained in Smelter which can be used to create rockwool. - // slagRich - Rich Slag obtained in Smelter which can be used to boost ore output. - - // pneumaticServo - Used in Thermal Expansion recipes for machines that do not use power. - // powerCoilGold - Used in Thermal Expansion recipes for machines that receive power. - // powerCoilSilver - Used in Thermal Expansion recipes for machines that send power. - // powerCoilElectrum - Used in Thermal Expansion recipes for machines that both send/receive - // power. - - // gearCopper - Copper Gear. - // gearTin - Tin Gear. - // gearInvar - Invar Gear. - - // wrench - Cresent Hammer, rotates and dismantles things. - // multimeter - Multimeter, used to read - // Redstone Energy Conduits and Liquiducts. - - // machineFrame - Used as a crafting recipe in many Thermal Expansion machines. - // energyCellFrameEmpty - Redstone Energy Cell before it has been filled with Liquid Redstone. - // energyCellFrameFull - Redstone Energy Cell after it has been filled with Liquid Redstone, but - // before it can be placed in the world. - // energyConduitEmpty - Redstone Energy Conduit before it is filled with Liquid Redstone. - // tesseractFrameEmpty - Tesseract before it has been filled with Liquid Ender. - // tesseractFrameFull - Tesseract after it has been filled with Liquid Ender, but before it can - // be placed in the world. - -} diff --git a/apis/thermalexpansion/api/tileentity/IAccessControl.java b/apis/thermalexpansion/api/tileentity/IAccessControl.java deleted file mode 100644 index aeef665ec..000000000 --- a/apis/thermalexpansion/api/tileentity/IAccessControl.java +++ /dev/null @@ -1,13 +0,0 @@ - -package thermalexpansion.api.tileentity; - -public interface IAccessControl { - - public boolean isPublic(); - - public boolean isFriends(); - - public boolean isPrivate(); - - public boolean setAccessMode(byte mode); -} diff --git a/apis/thermalexpansion/api/tileentity/IRedstoneControl.java b/apis/thermalexpansion/api/tileentity/IRedstoneControl.java deleted file mode 100644 index ae058b9fa..000000000 --- a/apis/thermalexpansion/api/tileentity/IRedstoneControl.java +++ /dev/null @@ -1,19 +0,0 @@ - -package thermalexpansion.api.tileentity; - -public interface IRedstoneControl { - - public boolean getRedstoneDisable(); - - public boolean getRedstoneState(); - - public boolean redstoneControl(); - - public boolean redstoneControlOrDisable(); - - public boolean setRedstoneDisable(boolean disable); - - public boolean setRedstoneState(boolean state); - - public boolean setRedstoneInfo(boolean disable, boolean state); -} diff --git a/apis/thermalexpansion/api/tileentity/ITesseract.java b/apis/thermalexpansion/api/tileentity/ITesseract.java deleted file mode 100644 index 78425a86a..000000000 --- a/apis/thermalexpansion/api/tileentity/ITesseract.java +++ /dev/null @@ -1,30 +0,0 @@ - -package thermalexpansion.api.tileentity; - -import java.util.List; - -import net.minecraft.tileentity.TileEntity; - -/** - * This interface is implemented on Tesseract Tile Entities. - * - * @author King Lemming - * - */ -public interface ITesseract { - - /** - * Returns a list of the connected input Tesseracts as Tile Entities. The list will only contain - * valid inputs; disabled Tesseracts will not be shown. This will allow you to determine where - * they are and what is around them. - */ - public List getValidInputLinks(); - - /** - * Returns a list of the connected output Tesseracts as Tile Entities. The list will only - * contain valid outputs; disabled Tesseracts will not be shown. This will allow you to - * determine where they are and what is around them. - */ - public List getValidOutputLinks(); - -} diff --git a/apis/thermalexpansion/readme-api.txt b/apis/thermalexpansion/readme-api.txt deleted file mode 100644 index 6df875014..000000000 --- a/apis/thermalexpansion/readme-api.txt +++ /dev/null @@ -1,37 +0,0 @@ -Hi there! Thanks for taking a look at the TE API. Now before you go -integrate TE with your mod (which is awesome btw), please read this. -It'll save us both some grief in the future I promise. - -When the API changes and other mods have directly included parts/all of -it, that's bad. :( Sometimes you have to include a file - if it's an -interface or something. No worries, just please don't include the whole -API. To interface with the crafting handlers, you don't have to include -anything. Here's an example of how to do that: - -if (Loader.isModLoaded("ThermalExpansion")) { - - try { - - - - } catch (Exception e) { - - System.out.println(": Thermal Expansion integration was - unsuccessful - please contact the author of this mod to let them know - that the API may have changed."); - } -} - -Again, that doesn't have to be exactly what you do, but if you follow -these two steps: - -1. Use Loader.isModLoaded -2. Use a try/catch block just to be safe. - -then you will NOT have to actually include the TE API in your zip file, -unless you are directly implementing / testing for an interface. - -This also holds with most other mods as well, so hopefully it may help -you clean up your own zips and allow you to redistribute on your -schedule, not when another mod updates their API. ;) - diff --git a/common/biomesoplenty/asm/BOPBiomeColourBlending.java b/common/biomesoplenty/asm/BOPBiomeColourBlending.java index 94af8bf40..365d68909 100644 --- a/common/biomesoplenty/asm/BOPBiomeColourBlending.java +++ b/common/biomesoplenty/asm/BOPBiomeColourBlending.java @@ -15,55 +15,50 @@ import cpw.mods.fml.relauncher.SideOnly; public class BOPBiomeColourBlending implements IClassTransformer { - private static String SIDE = FMLLaunchHandler.side().name(); - @Override public byte[] transform(String name, String newname, byte[] bytes) { - if (SIDE.equals("CLIENT")) + if (name.equals("net.minecraft.block.BlockFluid")) { - if (name.equals("net.minecraft.block.BlockFluid")) - { - return BlockFluid.patchColourMultiplier(newname, bytes, false); - } + return BlockFluid.patchColourMultiplier(newname, bytes, false); + } - if (name.equals("net.minecraft.block.BlockGrass")) - { - return BlockGrass.patchColourMultiplier(newname, bytes, false); - } + if (name.equals("net.minecraft.block.BlockGrass")) + { + return BlockGrass.patchColourMultiplier(newname, bytes, false); + } - if (name.equals("net.minecraft.block.BlockLeaves")) - { - return BlockLeaves.patchColourMultiplier(newname, bytes, false); - } + if (name.equals("net.minecraft.block.BlockLeaves")) + { + return BlockLeaves.patchColourMultiplier(newname, bytes, false); + } - if (name.equals("net.minecraft.block.BlockTallGrass")) - { - return BlockTallGrass.patchColourMultiplier(newname, bytes, false); - } + if (name.equals("net.minecraft.block.BlockTallGrass")) + { + return BlockTallGrass.patchColourMultiplier(newname, bytes, false); + } - if (name.equals("apc")) - { - return BlockFluid.patchColourMultiplier(newname, bytes, true); - } + if (name.equals("apc")) + { + return BlockFluid.patchColourMultiplier(newname, bytes, true); + } - if (name.equals("aon")) - { - return BlockGrass.patchColourMultiplier(newname, bytes, true); - } + if (name.equals("aon")) + { + return BlockGrass.patchColourMultiplier(newname, bytes, true); + } - if (name.equals("aoz")) - { - return BlockLeaves.patchColourMultiplier(newname, bytes, true); - } + if (name.equals("aoz")) + { + return BlockLeaves.patchColourMultiplier(newname, bytes, true); + } - if (name.equals("aqv")) - { - return BlockTallGrass.patchColourMultiplier(newname, bytes, true); - } + if (name.equals("aqv")) + { + return BlockTallGrass.patchColourMultiplier(newname, bytes, true); } return bytes; diff --git a/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java b/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java index c17bf4de4..34cc1e1d1 100644 --- a/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java +++ b/common/biomesoplenty/asm/BOPFMLLoadingPlugin.java @@ -4,12 +4,15 @@ import java.io.File; import java.util.Map; import codechicken.core.launch.DepLoader; +import cpw.mods.fml.relauncher.FMLLaunchHandler; import cpw.mods.fml.relauncher.IFMLLoadingPlugin; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions; @TransformerExclusions({ "biomesoplenty.asm" }) public class BOPFMLLoadingPlugin implements IFMLLoadingPlugin { + private static String SIDE = FMLLaunchHandler.side().name(); + public BOPFMLLoadingPlugin() { DepLoader.load(); @@ -26,7 +29,12 @@ public class BOPFMLLoadingPlugin implements IFMLLoadingPlugin @Override public String[] getASMTransformerClass() { - return new String[] {BOPBiomeColourBlending.class.getName()}; + if (SIDE.equals("CLIENT")) + { + return new String[] {BOPBiomeColourBlending.class.getName()}; + } + + return null; } @Override diff --git a/common/biomesoplenty/integration/BOPCrossIntegration.java b/common/biomesoplenty/integration/BOPCrossIntegration.java index c9fdf242c..6b994b43b 100644 --- a/common/biomesoplenty/integration/BOPCrossIntegration.java +++ b/common/biomesoplenty/integration/BOPCrossIntegration.java @@ -81,7 +81,7 @@ public class BOPCrossIntegration { if (Loader.isModLoaded("ThermalExpansion")) { try { -// TEIntegration.init(); + TEIntegration.init(); } catch (Exception e) { System.out.println("[BiomesOPlenty] There was an error while integrating Thermal Expansion with Biomes O' Plenty!"); diff --git a/common/biomesoplenty/integration/TEIntegration.java b/common/biomesoplenty/integration/TEIntegration.java index 2d4552260..f1fc2d30f 100644 --- a/common/biomesoplenty/integration/TEIntegration.java +++ b/common/biomesoplenty/integration/TEIntegration.java @@ -2,20 +2,19 @@ package biomesoplenty.integration; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import thermalexpansion.api.crafting.CraftingHelpers; -import thermalexpansion.api.crafting.CraftingManagers; -import thermalexpansion.api.item.ItemRegistry; +import net.minecraft.nbt.NBTTagCompound; import biomesoplenty.api.Blocks; +import cpw.mods.fml.common.event.FMLInterModComms; public class TEIntegration { protected static void init() { - addSawMillRecipes(); + //addSawMillRecipes(); addPulverizerRecipes(); } - private static void addSawMillRecipes() + /*private static void addSawMillRecipes() { CraftingHelpers.addSawmillLogToPlankRecipe(new ItemStack(Blocks.logs1.get(), 1, 0), new ItemStack(Blocks.planks.get(), 6, 0)); CraftingHelpers.addSawmillLogToPlankRecipe(new ItemStack(Blocks.logs1.get(), 1, 1), new ItemStack(Blocks.planks.get(), 6, 1)); @@ -27,11 +26,11 @@ public class TEIntegration CraftingHelpers.addSawmillLogToPlankRecipe(new ItemStack(Blocks.logs2.get(), 1, 3), new ItemStack(Blocks.planks.get(), 6, 7)); CraftingHelpers.addSawmillLogToPlankRecipe(new ItemStack(Blocks.logs3.get(), 1, 0), new ItemStack(Blocks.planks.get(), 6, 8)); CraftingHelpers.addSawmillLogToPlankRecipe(new ItemStack(Blocks.logs3.get(), 1, 1), new ItemStack(Blocks.planks.get(), 6, 9)); - } + }*/ private static void addPulverizerRecipes() { - ItemStack woodchips = ItemRegistry.getItem("woodchips", 1); + /*ItemStack woodchips = ItemRegistry.getItem("woodchips", 1); CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.logs1.get(), 1, 0), woodchips); CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.logs1.get(), 1, 1), woodchips); @@ -43,10 +42,38 @@ public class TEIntegration CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.logs2.get(), 1, 3), woodchips); CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.logs3.get(), 1, 0), woodchips); CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.logs3.get(), 1, 1), woodchips); - CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.logs3.get(), 1, 2), woodchips); + CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.logs3.get(), 1, 2), woodchips);*/ - CraftingManagers.pulverizerManager.addRecipe(160, new ItemStack(Blocks.bones.get(), 1, 0), new ItemStack(Item.dyePowder, 6, 15)); - CraftingManagers.pulverizerManager.addRecipe(220, new ItemStack(Blocks.bones.get(), 1, 1), new ItemStack(Item.dyePowder, 12, 15)); - CraftingManagers.pulverizerManager.addRecipe(280, new ItemStack(Blocks.bones.get(), 1, 2), new ItemStack(Item.dyePowder, 24, 15)); + addPulverizerRecipe(160, new ItemStack(Blocks.bones.get(), 1, 0), new ItemStack(Item.dyePowder, 6, 15)); + addPulverizerRecipe(220, new ItemStack(Blocks.bones.get(), 1, 1), new ItemStack(Item.dyePowder, 12, 15)); + addPulverizerRecipe(280, new ItemStack(Blocks.bones.get(), 1, 2), new ItemStack(Item.dyePowder, 24, 15)); + } + + /*private static void addSawmillRecipe() + { + FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", value) + }*/ + + private static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) + { + addPulverizerRecipe(energy, input, primaryOutput, null, 0); + } + + private static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) + { + addPulverizerRecipe(energy, input, primaryOutput, secondaryOutput, 0); + } + + private static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) + { + NBTTagCompound pulverizerCompound = new NBTTagCompound(); + + pulverizerCompound.setInteger("energy", energy); + input.writeToNBT(pulverizerCompound.getCompoundTag("input")); + primaryOutput.writeToNBT(pulverizerCompound.getCompoundTag("primaryOutput")); + if (secondaryOutput != null) secondaryOutput.writeToNBT(pulverizerCompound.getCompoundTag("secondaryOutput")); + if (secondaryOutput != null && secondaryChance != 0) pulverizerCompound.setInteger("secondaryChance", secondaryChance); + + FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", pulverizerCompound); } }