This commit is contained in:
Modmuss50 2015-09-23 17:27:41 +01:00
parent 111c5e6d5c
commit 3f4b59faaf
5 changed files with 77 additions and 3 deletions
src/main
java/techreborn
resources/assets/techreborn/textures/items/cells

View file

@ -1164,6 +1164,14 @@ public class RecipesIC2 implements ICompatModule {
40, 60 40, 60
)); ));
} }
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("NaKCoolantSimple"),
"TST", "PCP", "TST",
'T', "ingotTin",
'S', ItemCells.getCellByName("sodium"),
'P', ItemCells.getCellByName("potassium"),
'C', IC2Items.getItem("reactorCoolantSimple")
);
} }
static void removeIc2Recipes() { static void removeIc2Recipes() {

View file

@ -38,10 +38,12 @@ import techreborn.items.ItemRods;
import techreborn.util.CraftingHelper; import techreborn.util.CraftingHelper;
import techreborn.util.LogHelper; import techreborn.util.LogHelper;
import techreborn.util.OreUtil; import techreborn.util.OreUtil;
import techreborn.util.RecipeUtils;
import java.security.InvalidParameterException; import java.security.InvalidParameterException;
public class ModRecipes { public class
ModRecipes {
public static ConfigTechReborn config; public static ConfigTechReborn config;
public static void init() { public static void init() {
@ -192,6 +194,40 @@ public class ModRecipes {
'A', "ingotAluminum" 'A', "ingotAluminum"
); );
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("heliumCoolantSimple"),
" T ", "TCT", " T ",
'T', "ingotTin",
'C', ItemCells.getCellByName("helium", 1, false)
);
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("HeliumCoolantTriple"),
"TTT", "CCC", "TTT",
'T', "ingotTin",
'C', ItemParts.getPartByName("heliumCoolantSimple")
);
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("HeliumCoolantSix"),
"THT", "TCT", "THT",
'T', "ingotTin",
'C', "ingotCopper",
'H', ItemParts.getPartByName("HeliumCoolantTriple")
);
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("NaKCoolantTriple"),
"TTT", "CCC", "TTT",
'T', "ingotTin",
'C', ItemParts.getPartByName("NaKCoolantSimple")
);
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("NaKCoolantSix"),
"THT", "TCT", "THT",
'T', "ingotTin",
'C', "ingotCopper",
'H', ItemParts.getPartByName("NaKCoolantTriple")
);
GameRegistry.addShapelessRecipe(ItemCells.getCellByName("heliumPlasma"), ItemCells.getCellByName("tritium"), ItemCells.getCellByName("deuterium"));
LogHelper.info("Shapped Recipes Added"); LogHelper.info("Shapped Recipes Added");
} }
@ -996,6 +1032,9 @@ public class ModRecipes {
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("tetrahedrite", 8), null, ItemDusts.getDustByName("copper", 3), ItemDusts.getDustByName("antimony", 1), ItemDusts.getDustByName("sulfur", 3), ItemDusts.getDustByName("iron", 1), 3640, 5)); RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("tetrahedrite", 8), null, ItemDusts.getDustByName("copper", 3), ItemDusts.getDustByName("antimony", 1), ItemDusts.getDustByName("sulfur", 3), ItemDusts.getDustByName("iron", 1), 3640, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("lapis", 16), null, ItemDusts.getDustByName("lazurite", 12), ItemDusts.getDustByName("sodalite", 2), ItemDusts.getDustByName("pyrite", 7), ItemDusts.getDustByName("calcite", 1), 3580, 5)); RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("lapis", 16), null, ItemDusts.getDustByName("lazurite", 12), ItemDusts.getDustByName("sodalite", 2), ItemDusts.getDustByName("pyrite", 7), ItemDusts.getDustByName("calcite", 1), 3580, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.glowstone_dust, 16), RecipeUtils.getEmptyCell(1), ItemCells.getCellByName("helium", 1, false), ItemDusts.getDustByName("gold", 8), new ItemStack(Items.redstone), null, 25000, 20));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("endstone", 16), RecipeUtils.getEmptyCell(2), ItemCells.getCellByName("helium3", 1, false), ItemCells.getCellByName("helium", 1, false), ItemDustsTiny.getTinyDustByName("Tungsten"), new ItemStack(Blocks.sand, 12), 4800, 5));
} }
static void addIndustrialGrinderRecipes() { static void addIndustrialGrinderRecipes() {
@ -1509,4 +1548,7 @@ public class ModRecipes {
FarmTree.harvestableLogs.add(Blocks.log); FarmTree.harvestableLogs.add(Blocks.log);
FarmTree.harvestableLogs.add(Blocks.log2); FarmTree.harvestableLogs.add(Blocks.log2);
} }
} }

View file

@ -19,8 +19,13 @@ import java.util.List;
public class ItemCells extends ItemTR { public class ItemCells extends ItemTR {
public static ItemStack getCellByName(String name, int count) { public static ItemStack getCellByName(String name, int count) {
return getCellByName(name, count, true);
}
public static ItemStack getCellByName(String name, int count, boolean lookForIC2) {
Fluid fluid = FluidRegistry.getFluid("fluid" + name.toLowerCase()); Fluid fluid = FluidRegistry.getFluid("fluid" + name.toLowerCase());
if (IC2Items.getItem("FluidCell") != null) { if (lookForIC2 && IC2Items.getItem("FluidCell") != null) {
if (fluid != null) { if (fluid != null) {
ItemStack stack = IC2Items.getItem("FluidCell").copy(); ItemStack stack = IC2Items.getItem("FluidCell").copy();
if (stack != null && stack.getItem() instanceof IFluidContainerItem) { if (stack != null && stack.getItem() instanceof IFluidContainerItem) {
@ -54,7 +59,7 @@ public class ItemCells extends ItemTR {
"mercury", "methane", "nitrocarbon", "nitroCoalfuel", "mercury", "methane", "nitrocarbon", "nitroCoalfuel",
"nitroDiesel", "nitrogen", "nitrogenDioxide", "oil", "potassium", "nitroDiesel", "nitrogen", "nitrogenDioxide", "oil", "potassium",
"seedOil", "silicon", "sodium", "sodiumPersulfate", "seedOil", "silicon", "sodium", "sodiumPersulfate",
"sodiumSulfide", "sulfur", "sulfuricAcid", "tritium", "wolframium",}; "sodiumSulfide", "sulfur", "sulfuricAcid", "tritium", "wolframium", "empty"};
private IIcon[] textures; private IIcon[] textures;

View file

@ -0,0 +1,19 @@
package techreborn.util;
import cpw.mods.fml.common.Loader;
import ic2.api.item.IC2Items;
import net.minecraft.item.ItemStack;
import techreborn.items.ItemCells;
public class RecipeUtils {
public static ItemStack getEmptyCell(int stackSize){
if(Loader.isModLoaded("IC2")){
ItemStack cell = IC2Items.getItem("cell").copy();
cell.stackSize = stackSize;
return cell;
} else {
return ItemCells.getCellByName("empty", stackSize);
}
}
}

Binary file not shown.

After

(image error) Size: 486 B