A few recipe enhancements

This commit is contained in:
Aidan C. Brady 2014-01-18 14:04:51 -05:00
parent 740f4581b0
commit 8c05c53b40
4 changed files with 16 additions and 8 deletions

View file

@ -58,6 +58,10 @@ public class ChemicalInjectionChamberRecipeHandler extends AdvancedMachineRecipe
{ {
return ListUtils.asList(MekanismUtils.getFullGasTank(GasRegistry.getGas("water"))); return ListUtils.asList(MekanismUtils.getFullGasTank(GasRegistry.getGas("water")));
} }
else if(gasType == GasRegistry.getGas("hydrogenChloride"))
{
return ListUtils.asList(MekanismUtils.getFullGasTank(GasRegistry.getGas("hydrogenChloride")));
}
return new ArrayList<ItemStack>(); return new ArrayList<ItemStack>();
} }

View file

@ -192,7 +192,7 @@ public class ElectrolyticSeparatorRecipeHandler extends BaseRecipeHandler
GasStack gas = null; GasStack gas = null;
FluidStack fluid = null; FluidStack fluid = null;
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11+7 && yAxis <= 22+7) if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11+7 && yAxis <= 69+7)
{ {
fluid = ((CachedIORecipe)arecipes.get(recipe)).fluidInput; fluid = ((CachedIORecipe)arecipes.get(recipe)).fluidInput;
} }
@ -254,7 +254,7 @@ public class ElectrolyticSeparatorRecipeHandler extends BaseRecipeHandler
GasStack gas = null; GasStack gas = null;
FluidStack fluid = null; FluidStack fluid = null;
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11+7 && yAxis <= 22+7) if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11+7 && yAxis <= 69+7)
{ {
fluid = ((CachedIORecipe)arecipes.get(recipe)).fluidInput; fluid = ((CachedIORecipe)arecipes.get(recipe)).fluidInput;
} }

View file

@ -662,11 +662,11 @@ public class Mekanism
//Purification Chamber Recipes //Purification Chamber Recipes
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Clump, 2, 6)); RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Clump, 2, 6));
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.gravel), new ItemStack(Item.flint)); RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.gravel), new ItemStack(Item.flint));
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Item.gunpowder), new ItemStack(Dust, 1, 10));
//Chemical Injection Chamber Recipes //Chemical Injection Chamber Recipes
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(new ItemStack(Block.obsidian), GasRegistry.getGas("sulfuricAcid")), 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)); RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(new ItemStack(Block.dirt), GasRegistry.getGas("water")), new ItemStack(Block.blockClay));
RecipeHandler.addChemicalInjectionChamberRecipe(new AdvancedInput(new ItemStack(Item.gunpowder), GasRegistry.getGas("hydrogenChloride")), new ItemStack(Mekanism.Dust, 1, 10));
//Precision Sawmill Recipes //Precision Sawmill Recipes
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Block.ladder, 3), new ChanceOutput(new ItemStack(Item.stick, 7))); RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Block.ladder, 3), new ChanceOutput(new ItemStack(Item.stick, 7)));

View file

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