Fix up Clay Block recipe

This commit is contained in:
Aidan Brady 2014-01-18 12:08:11 -05:00
parent 31fbf5ee14
commit ee2b81c3fd
6 changed files with 31 additions and 23 deletions

View file

@ -144,14 +144,14 @@ public final class RecipeHelper
/**
* Add a Chemical Injection Chamber recipe.
* @param input - input ItemStack
* @param input - input AdvancedInput
* @param output - output ItemStack
*/
public static void addChemicalInjectionChamberRecipe(ItemStack input, ItemStack output)
public static void addChemicalInjectionChamberRecipe(AdvancedInput input, ItemStack output)
{
try {
Class recipeClass = Class.forName("mekanism.common.recipe.RecipeHandler");
Method m = recipeClass.getMethod("addChemicalInjectionChamberRecipe", ItemStack.class, ItemStack.class);
Method m = recipeClass.getMethod("addChemicalInjectionChamberRecipe", AdvancedInput.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());

View file

@ -44,7 +44,7 @@ public class OsmiumCompressorRecipeHandler extends AdvancedMachineRecipeHandler
@Override
public List<ItemStack> getFuelStacks()
{
return ListUtils.asList(new ItemStack(Mekanism.Ingot, 1, 1), new ItemStack(Mekanism.BasicBlock, 1, 0));
return ListUtils.asList(new ItemStack(Mekanism.Ingot, 1, 1));
}
@Override

View file

@ -10,7 +10,7 @@ import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
import codechicken.multipart.handler.MultipartProxy;
import mekanism.api.AdvancedInput;
import mekanism.api.ChanceOutput;
import mekanism.api.ChemicalPair;
import mekanism.api.Coord4D;
@ -131,6 +131,7 @@ import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import rebelkeithy.mods.metallurgy.api.IOreInfo;
import rebelkeithy.mods.metallurgy.api.MetallurgyAPI;
import codechicken.multipart.handler.MultipartProxy;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
@ -664,7 +665,8 @@ public class Mekanism
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Item.gunpowder), new ItemStack(Dust, 1, 10));
//Chemical Injection Chamber Recipes
RecipeHandler.addChemicalInjectionChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Shard, 3, 6));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(new ItemStack(Block.obsidian), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Shard, 3, 6));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(new ItemStack(Block.dirt), GasRegistry.getGas("water")), new ItemStack(Block.blockClay));
//Precision Sawmill Recipes
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Block.ladder, 3), new ChanceOutput(new ItemStack(Item.stick, 7)));
@ -685,7 +687,7 @@ public class Mekanism
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("CARBON"), 10, new ItemStack(Item.ingotIron)), new ItemStack(EnrichedIron));
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("CARBON"), 10, new ItemStack(EnrichedIron)), new ItemStack(Dust, 1, 5));
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("REDSTONE"), 10, new ItemStack(Item.ingotIron)), new ItemStack(EnrichedAlloy));
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("FUNGI"), 10, new ItemStack(Block.dirt)), new ItemStack(Block.blockClay));
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("FUNGI"), 10, new ItemStack(Block.dirt)), new ItemStack(Block.mycelium));
if(InfuseRegistry.contains("BIO"))
{

View file

@ -4,9 +4,8 @@ import ic2.api.recipe.RecipeInputOreDict;
import ic2.api.recipe.Recipes;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mekanism.api.AdvancedInput;
import mekanism.api.ChanceOutput;
import mekanism.api.gas.GasRegistry;
import mekanism.api.gas.GasStack;
@ -220,49 +219,49 @@ public final class OreDictManager
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 2, 6));
RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Clump, 3, 3));
RecipeHandler.addChemicalInjectionChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Shard, 4, 3));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(MekanismUtils.size(ore, 1), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Mekanism.Shard, 4, 3));
}
for(ItemStack ore : OreDictionary.getOres("oreTin"))
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 2, 7));
RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Clump, 3, 4));
RecipeHandler.addChemicalInjectionChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Shard, 4, 4));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(MekanismUtils.size(ore, 1), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Mekanism.Shard, 4, 4));
}
for(ItemStack ore : OreDictionary.getOres("oreOsmium"))
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 2, 2));
RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Clump, 3, 2));
RecipeHandler.addChemicalInjectionChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Shard, 4, 2));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(MekanismUtils.size(ore, 1), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Mekanism.Shard, 4, 2));
}
for(ItemStack ore : OreDictionary.getOres("oreIron"))
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 2, 0));
RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Clump, 3, 0));
RecipeHandler.addChemicalInjectionChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Shard, 4, 0));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(MekanismUtils.size(ore, 1), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Mekanism.Shard, 4, 0));
}
for(ItemStack ore : OreDictionary.getOres("oreGold"))
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 2, 1));
RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Clump, 3, 1));
RecipeHandler.addChemicalInjectionChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Shard, 4, 1));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(MekanismUtils.size(ore, 1), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Mekanism.Shard, 4, 1));
}
for(ItemStack ore : OreDictionary.getOres("oreSilver"))
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 2, 8));
RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Clump, 3, 5));
RecipeHandler.addChemicalInjectionChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Shard, 4, 5));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(MekanismUtils.size(ore, 1), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Mekanism.Shard, 4, 5));
}
for(ItemStack ore : OreDictionary.getOres("oreLead"))
{
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 2, 9));
RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Clump, 3, 7));
RecipeHandler.addChemicalInjectionChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Shard, 4, 7));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(MekanismUtils.size(ore, 1), GasRegistry.getGas("sulfuricAcid")), new ItemStack(Mekanism.Shard, 4, 7));
}
for(ItemStack ore : OreDictionary.getOres("oreNickel"))

View file

@ -114,9 +114,9 @@ public final class RecipeHandler
* @param input - input ItemStack
* @param output - output ItemStack
*/
public static void addChemicalInjectionChamberRecipe(ItemStack input, ItemStack output)
public static void addChemicalInjectionChamberRecipe(AdvancedInput input, ItemStack output)
{
Recipe.CHEMICAL_INJECTION_CHAMBER.put(new AdvancedInput(input, GasRegistry.getGas("sulfuricAcid")), output);
Recipe.CHEMICAL_INJECTION_CHAMBER.put(input, output);
}
/**

View file

@ -35,7 +35,8 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
{
if(MekanismUtils.getOreDictName(itemstack).contains("dustSulfur")) return new GasStack(GasRegistry.getGas("sulfuricAcid"), 2);
if(itemstack.itemID == Mekanism.GasTank.blockID && ((IGasItem)itemstack.getItem()).getGas(itemstack) != null &&
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("sulfuricAcid")) return new GasStack(GasRegistry.getGas("sulfuricAcid"), 1);
(((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("sulfuricAcid") ||
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("water"))) return new GasStack(GasRegistry.getGas("sulfuricAcid"), 1);
return null;
}
@ -43,7 +44,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
if(stack.getGas() == GasRegistry.getGas("sulfuricAcid"))
if(stack.getGas() == GasRegistry.getGas("sulfuricAcid") || stack.getGas() == GasRegistry.getGas("water"))
{
return gasTank.receive(stack, true);
}
@ -54,7 +55,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{
return type == GasRegistry.getGas("sulfuricAcid");
return type == GasRegistry.getGas("sulfuricAcid") || type == GasRegistry.getGas("water");
}
@Override
@ -62,8 +63,14 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
{
if(inventory[1] != null && gasTank.getNeeded() > 0 && inventory[1].getItem() instanceof IGasItem)
{
GasStack removed = GasTransmission.removeGas(inventory[1], GasRegistry.getGas("sulfuricAcid"), gasTank.getNeeded());
gasTank.receive(removed, true);
Gas gas = ((IGasItem)inventory[1].getItem()).getGas(inventory[1]).getGas();
if(gas == GasRegistry.getGas("sulfuricAcid") || gas == GasRegistry.getGas("water"))
{
GasStack removed = GasTransmission.removeGas(inventory[1], gas, gasTank.getNeeded());
gasTank.receive(removed, true);
}
return;
}