aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/loaders/postload/GT_PostLoad.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/loaders/postload/GT_PostLoad.java')
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_PostLoad.java392
1 files changed, 310 insertions, 82 deletions
diff --git a/src/main/java/gregtech/loaders/postload/GT_PostLoad.java b/src/main/java/gregtech/loaders/postload/GT_PostLoad.java
index 5301a97b1e..6b59de3709 100644
--- a/src/main/java/gregtech/loaders/postload/GT_PostLoad.java
+++ b/src/main/java/gregtech/loaders/postload/GT_PostLoad.java
@@ -1,5 +1,7 @@
package gregtech.loaders.postload;
+import static gregtech.api.enums.GT_Values.MOD_ID_FR;
+
import com.google.common.base.Stopwatch;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ProgressManager;
@@ -24,15 +26,6 @@ import gregtech.common.items.behaviors.Behaviour_DataOrb;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Massfabricator;
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeOutput;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidContainerRegistry;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.HashSet;
@@ -41,8 +34,14 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
-
-import static gregtech.api.enums.GT_Values.MOD_ID_FR;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
public class GT_PostLoad {
public static void activateOreDictHandler() {
@@ -51,44 +50,86 @@ public class GT_PostLoad {
GT_Mod.gregtechproxy.activateOreDictHandler();
//noinspection UnstableApiUsage// Stable enough for this project
- GT_Mod.GT_FML_LOGGER.info("Congratulations, you have been waiting long enough (" + stopwatch.stop() + "). Have a Cake.");
- GT_Log.out.println("GT_Mod: List of Lists of Tool Recipes: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList_list.toString());
- GT_Log.out.println("GT_Mod: Vanilla Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sVanillaRecipeList_warntOutput.toString());
- GT_Log.out.println("GT_Mod: Single Non Block Damageable Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList_warntOutput.toString());
+ GT_Mod.GT_FML_LOGGER.info(
+ "Congratulations, you have been waiting long enough (" + stopwatch.stop() + "). Have a Cake.");
+ GT_Log.out.println("GT_Mod: List of Lists of Tool Recipes: "
+ + GT_ModHandler.sSingleNonBlockDamagableRecipeList_list.toString());
+ GT_Log.out.println("GT_Mod: Vanilla Recipe List -> Outputs null or stackSize <=0: "
+ + GT_ModHandler.sVanillaRecipeList_warntOutput.toString());
+ GT_Log.out.println("GT_Mod: Single Non Block Damageable Recipe List -> Outputs null or stackSize <=0: "
+ + GT_ModHandler.sSingleNonBlockDamagableRecipeList_warntOutput.toString());
}
-
- public static void removeIc2Recipes(Map<IRecipeInput, RecipeOutput> aMaceratorRecipeList, Map<IRecipeInput, RecipeOutput> aCompressorRecipeList, Map<IRecipeInput, RecipeOutput> aExtractorRecipeList, Map<IRecipeInput, RecipeOutput> aOreWashingRecipeList, Map<IRecipeInput, RecipeOutput> aThermalCentrifugeRecipeList) {
+ public static void removeIc2Recipes(
+ Map<IRecipeInput, RecipeOutput> aMaceratorRecipeList,
+ Map<IRecipeInput, RecipeOutput> aCompressorRecipeList,
+ Map<IRecipeInput, RecipeOutput> aExtractorRecipeList,
+ Map<IRecipeInput, RecipeOutput> aOreWashingRecipeList,
+ Map<IRecipeInput, RecipeOutput> aThermalCentrifugeRecipeList) {
@SuppressWarnings("UnstableApiUsage") // Stable enough for this project
Stopwatch stopwatch = Stopwatch.createStarted();
// remove gemIridium exploit
ItemStack iridiumOre = GT_ModHandler.getIC2Item("iridiumOre", 1);
aCompressorRecipeList.entrySet().parallelStream()
- .filter(e -> e.getKey().getInputs().size() == 1 && e.getKey().getInputs().get(0).isItemEqual(iridiumOre))
+ .filter(e -> e.getKey().getInputs().size() == 1
+ && e.getKey().getInputs().get(0).isItemEqual(iridiumOre))
.findAny()
.ifPresent(e -> aCompressorRecipeList.remove(e.getKey()));
- //Add default IC2 recipe to GT
- GT_ModHandler.addIC2RecipesToGT(aMaceratorRecipeList, GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, true, true, true);
- GT_ModHandler.addIC2RecipesToGT(aCompressorRecipeList, GT_Recipe.GT_Recipe_Map.sCompressorRecipes, true, true, true);
- GT_ModHandler.addIC2RecipesToGT(aExtractorRecipeList, GT_Recipe.GT_Recipe_Map.sExtractorRecipes, true, true, true);
- GT_ModHandler.addIC2RecipesToGT(aOreWashingRecipeList, GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, false, true, true);
- GT_ModHandler.addIC2RecipesToGT(aThermalCentrifugeRecipeList, GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, true, true, true);
+ // Add default IC2 recipe to GT
+ GT_ModHandler.addIC2RecipesToGT(
+ aMaceratorRecipeList, GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, true, true, true);
+ GT_ModHandler.addIC2RecipesToGT(
+ aCompressorRecipeList, GT_Recipe.GT_Recipe_Map.sCompressorRecipes, true, true, true);
+ GT_ModHandler.addIC2RecipesToGT(
+ aExtractorRecipeList, GT_Recipe.GT_Recipe_Map.sExtractorRecipes, true, true, true);
+ GT_ModHandler.addIC2RecipesToGT(
+ aOreWashingRecipeList, GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, false, true, true);
+ GT_ModHandler.addIC2RecipesToGT(
+ aThermalCentrifugeRecipeList, GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, true, true, true);
//noinspection UnstableApiUsage// Stable enough for this project
GT_Mod.GT_FML_LOGGER.info("IC2 Removal (" + stopwatch.stop() + "). Have a Cake.");
}
-
public static void registerFluidCannerRecipes() {
ItemStack iSData0 = new ItemStack(Items.potionitem, 1, 0);
ItemStack iLData0 = ItemList.Bottle_Empty.get(1L);
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
+ for (FluidContainerRegistry.FluidContainerData tData :
+ FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
- GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{iLData0}, new ItemStack[]{iSData0}, null, new FluidStack[]{Materials.Water.getFluid(250L)}, null, 4, 1, 0);
- GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{iSData0}, new ItemStack[]{iLData0}, null, null, null, 4, 1, 0);
+ GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(
+ true,
+ new ItemStack[] {iLData0},
+ new ItemStack[] {iSData0},
+ null,
+ new FluidStack[] {Materials.Water.getFluid(250L)},
+ null,
+ 4,
+ 1,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(
+ true, new ItemStack[] {iSData0}, new ItemStack[] {iLData0}, null, null, null, 4, 1, 0);
} else {
- GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{tData.emptyContainer}, new ItemStack[]{tData.filledContainer}, null, new FluidStack[]{tData.fluid}, null, tData.fluid.amount / 62, 1, 0);
- GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{tData.filledContainer}, new ItemStack[]{GT_Utility.getContainerItem(tData.filledContainer, true)}, null, null, new FluidStack[]{tData.fluid}, tData.fluid.amount / 62, 1, 0);
+ GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(
+ true,
+ new ItemStack[] {tData.emptyContainer},
+ new ItemStack[] {tData.filledContainer},
+ null,
+ new FluidStack[] {tData.fluid},
+ null,
+ tData.fluid.amount / 62,
+ 1,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(
+ true,
+ new ItemStack[] {tData.filledContainer},
+ new ItemStack[] {GT_Utility.getContainerItem(tData.filledContainer, true)},
+ null,
+ null,
+ new FluidStack[] {tData.fluid},
+ tData.fluid.amount / 62,
+ 1,
+ 0);
}
}
}
@@ -96,56 +137,229 @@ public class GT_PostLoad {
public static void addFakeRecipes() {
GT_Log.out.println("GT_Mod: Adding Fake Recipes for NEI");
- if (Loader.isModLoaded(MOD_ID_FR))
- GT_Forestry_Compat.populateFakeNeiRecipes();
+ if (Loader.isModLoaded(MOD_ID_FR)) GT_Forestry_Compat.populateFakeNeiRecipes();
if (ItemList.IC2_Crop_Seeds.get(1L) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWildcard(1L)}, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWithName(1L, "Scanned Seeds")}, null, null, null, 160, 8, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {ItemList.IC2_Crop_Seeds.getWildcard(1L)},
+ new ItemStack[] {ItemList.IC2_Crop_Seeds.getWithName(1L, "Scanned Seeds")},
+ null,
+ null,
+ null,
+ 160,
+ 8,
+ 0);
}
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{new ItemStack(Items.written_book, 1, 32767)}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Book Data")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 128, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{new ItemStack(Items.filled_map, 1, 32767)}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Map Data")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 128, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Orb to overwrite")}, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Copy of the Orb")}, ItemList.Tool_DataOrb.getWithName(0L, "Orb to copy"), null, null, 512, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Stick to overwrite")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Copy of the Stick")}, ItemList.Tool_DataStick.getWithName(0L, "Stick to copy"), null, null, 128, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Raw Prospection Data")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Analyzed Prospection Data")}, null, null, null, 1000, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {new ItemStack(Items.written_book, 1, 32767)},
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Scanned Book Data")},
+ ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"),
+ null,
+ null,
+ 128,
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {new ItemStack(Items.filled_map, 1, 32767)},
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Scanned Map Data")},
+ ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"),
+ null,
+ null,
+ 128,
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {ItemList.Tool_DataOrb.getWithName(1L, "Orb to overwrite")},
+ new ItemStack[] {ItemList.Tool_DataOrb.getWithName(1L, "Copy of the Orb")},
+ ItemList.Tool_DataOrb.getWithName(0L, "Orb to copy"),
+ null,
+ null,
+ 512,
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Stick to overwrite")},
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Copy of the Stick")},
+ ItemList.Tool_DataStick.getWithName(0L, "Stick to copy"),
+ null,
+ null,
+ 128,
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Raw Prospection Data")},
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Analyzed Prospection Data")},
+ null,
+ null,
+ null,
+ 1000,
+ 30,
+ 0);
if (Loader.isModLoaded("GalacticraftCore")) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{Objects.requireNonNull(GT_ModHandler.getModItem("GalacticraftCore", "item.schematic", 1, Short.MAX_VALUE)).setStackDisplayName("Any Schematic")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 36000, 480, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {
+ Objects.requireNonNull(GT_ModHandler.getModItem(
+ "GalacticraftCore", "item.schematic", 1, Short.MAX_VALUE))
+ .setStackDisplayName("Any Schematic")
+ },
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic")},
+ ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"),
+ null,
+ null,
+ 36000,
+ 480,
+ 0);
if (Loader.isModLoaded("GalacticraftMars"))
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{Objects.requireNonNull(GT_ModHandler.getModItem("GalacticraftMars", "item.schematic", 1, Short.MAX_VALUE)).setStackDisplayName("Any Schematic")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 36000, 480, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {
+ Objects.requireNonNull(GT_ModHandler.getModItem(
+ "GalacticraftMars", "item.schematic", 1, Short.MAX_VALUE))
+ .setStackDisplayName("Any Schematic")
+ },
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic")},
+ ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"),
+ null,
+ null,
+ 36000,
+ 480,
+ 0);
if (Loader.isModLoaded("GalaxySpace")) {
for (int i = 4; i < 9; i++) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{GT_ModHandler.getModItem("GalaxySpace", "item.SchematicTier" + i, 1).setStackDisplayName("Any Schematic")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 36000, 480, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {
+ GT_ModHandler.getModItem("GalaxySpace", "item.SchematicTier" + i, 1)
+ .setStackDisplayName("Any Schematic")
+ },
+ new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic")},
+ ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"),
+ null,
+ null,
+ 36000,
+ 480,
+ 0);
}
}
}
Materials.getMaterialsMap().values().forEach(tMaterial -> {
- if ((tMaterial.mElement != null) && (!tMaterial.mElement.mIsIsotope) && (tMaterial != Materials.Magic) && (tMaterial.getMass() > 0L)) {
+ if ((tMaterial.mElement != null)
+ && (!tMaterial.mElement.mIsIsotope)
+ && (tMaterial != Materials.Magic)
+ && (tMaterial.getMass() > 0L)) {
ItemStack tOutput = ItemList.Tool_DataOrb.get(1L);
Behaviour_DataOrb.setDataTitle(tOutput, "Elemental-Scan");
Behaviour_DataOrb.setDataName(tOutput, tMaterial.mElement.name());
ItemStack tInput = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, 1L);
- ItemStack[] iSMat0 = new ItemStack[]{tInput};
- ItemStack[] iSMat1 = new ItemStack[]{tOutput};
+ ItemStack[] iSMat0 = new ItemStack[] {tInput};
+ ItemStack[] iSMat1 = new ItemStack[] {tOutput};
if (tInput != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, iSMat0, iSMat1, ItemList.Tool_DataOrb.get(1L), null, null, (int) (tMaterial.getMass() * 8192L), 30, 0);
- GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, null, iSMat0, iSMat1, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 30, 0);
-
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ iSMat0,
+ iSMat1,
+ ItemList.Tool_DataOrb.get(1L),
+ null,
+ null,
+ (int) (tMaterial.getMass() * 8192L),
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(
+ false,
+ null,
+ iSMat0,
+ iSMat1,
+ new FluidStack[] {Materials.UUMatter.getFluid(tMaterial.getMass())},
+ null,
+ (int) (tMaterial.getMass() * 512L),
+ 30,
+ 0);
}
tInput = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L);
- iSMat0 = new ItemStack[]{tInput};
+ iSMat0 = new ItemStack[] {tInput};
if (tInput != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, iSMat0, iSMat1, ItemList.Tool_DataOrb.get(1L), null, null, (int) (tMaterial.getMass() * 8192L), 30, 0);
- GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, null, iSMat0, iSMat1, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(
+ false,
+ iSMat0,
+ iSMat1,
+ ItemList.Tool_DataOrb.get(1L),
+ null,
+ null,
+ (int) (tMaterial.getMass() * 8192L),
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(
+ false,
+ null,
+ iSMat0,
+ iSMat1,
+ new FluidStack[] {Materials.UUMatter.getFluid(tMaterial.getMass())},
+ null,
+ (int) (tMaterial.getMass() * 512L),
+ 30,
+ 0);
}
}
});
if (!GT_MetaTileEntity_Massfabricator.sRequiresUUA)
- GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes.addFakeRecipe(false, null, null, null, null, new FluidStack[]{Materials.UUMatter.getFluid(1L)}, GT_MetaTileEntity_Massfabricator.sDurationMultiplier, 256, 0);
- GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes.addFakeRecipe(false, new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, null, null, new FluidStack[]{Materials.UUAmplifier.getFluid(GT_MetaTileEntity_Massfabricator.sUUAperUUM)}, new FluidStack[]{Materials.UUMatter.getFluid(1L)}, GT_MetaTileEntity_Massfabricator.sDurationMultiplier / GT_MetaTileEntity_Massfabricator.sUUASpeedBonus, 256, 0);
- GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Side")}, new ItemStack[]{new ItemStack(
- Blocks.cobblestone, 1)}, null, null, null, 16, 30, 0);
- GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Top")}, new ItemStack[]{new ItemStack(Blocks.stone, 1)}, null, null, null, 16, 30, 0);
- GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L)}, new ItemStack[]{new ItemStack(Blocks.obsidian, 1)}, null, null, null, 128, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes.addFakeRecipe(
+ false,
+ null,
+ null,
+ null,
+ null,
+ new FluidStack[] {Materials.UUMatter.getFluid(1L)},
+ GT_MetaTileEntity_Massfabricator.sDurationMultiplier,
+ 256,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {GT_Utility.getIntegratedCircuit(1)},
+ null,
+ null,
+ new FluidStack[] {Materials.UUAmplifier.getFluid(GT_MetaTileEntity_Massfabricator.sUUAperUUM)},
+ new FluidStack[] {Materials.UUMatter.getFluid(1L)},
+ GT_MetaTileEntity_Massfabricator.sDurationMultiplier / GT_MetaTileEntity_Massfabricator.sUUASpeedBonus,
+ 256,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Side")},
+ new ItemStack[] {new ItemStack(Blocks.cobblestone, 1)},
+ null,
+ null,
+ null,
+ 16,
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Top")},
+ new ItemStack[] {new ItemStack(Blocks.stone, 1)},
+ null,
+ null,
+ null,
+ 16,
+ 30,
+ 0);
+ GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(
+ false,
+ new ItemStack[] {GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L)},
+ new ItemStack[] {new ItemStack(Blocks.obsidian, 1)},
+ null,
+ null,
+ null,
+ 128,
+ 30,
+ 0);
}
public static void nerfVanillaTools() {
@@ -187,20 +401,23 @@ public class GT_PostLoad {
@SuppressWarnings("UnstableApiUsage") // Stable enough for this project
Stopwatch stopwatch = Stopwatch.createStarted();
GT_Mod.GT_FML_LOGGER.info("Replacing Vanilla Materials in recipes, please wait.");
- Set<Materials> replaceVanillaItemsSet = GT_Mod.gregtechproxy.mUseGreatlyShrukenReplacementList ? Arrays.stream(Materials.values()).filter(GT_RecipeRegistrator::hasVanillaRecipes).collect(
- Collectors.toSet()) : new HashSet<>(Arrays.asList(Materials.values()));
+ Set<Materials> replaceVanillaItemsSet = GT_Mod.gregtechproxy.mUseGreatlyShrukenReplacementList
+ ? Arrays.stream(Materials.values())
+ .filter(GT_RecipeRegistrator::hasVanillaRecipes)
+ .collect(Collectors.toSet())
+ : new HashSet<>(Arrays.asList(Materials.values()));
@SuppressWarnings("deprecation") // stable API for MC 1.7.10
- ProgressManager.ProgressBar progressBar = ProgressManager.push("Register materials", replaceVanillaItemsSet.size());
- if (GT_Values.cls_enabled){
+ ProgressManager.ProgressBar progressBar =
+ ProgressManager.push("Register materials", replaceVanillaItemsSet.size());
+ if (GT_Values.cls_enabled) {
try {
GT_CLS_Compat.doActualRegistrationCLS(progressBar, replaceVanillaItemsSet);
GT_CLS_Compat.pushToDisplayProgress();
} catch (InvocationTargetException | IllegalAccessException e) {
GT_Mod.GT_FML_LOGGER.catching(e);
}
- }
- else {
+ } else {
replaceVanillaItemsSet.forEach(m -> {
progressBar.step(m.mDefaultLocalName);
doActualRegistration(m);
@@ -212,18 +429,14 @@ public class GT_PostLoad {
GT_Mod.GT_FML_LOGGER.info("Replaced Vanilla Materials (" + stopwatch.stop() + "). Have a Cake.");
}
- public static void doActualRegistration(Materials m){
+ public static void doActualRegistration(Materials m) {
String plateName = OrePrefixes.plate.get(m).toString();
boolean noSmash = !m.contains(SubTag.NO_SMASHING);
- if ((m.mTypes & 2) != 0)
- GT_RecipeRegistrator.registerUsagesForMaterials(plateName, noSmash, m.getIngots(1));
- if ((m.mTypes & 4) != 0)
- GT_RecipeRegistrator.registerUsagesForMaterials(plateName, noSmash, m.getGems(1));
- if (m.getBlocks(1) != null)
- GT_RecipeRegistrator.registerUsagesForMaterials(null, noSmash, m.getBlocks(1));
+ if ((m.mTypes & 2) != 0) GT_RecipeRegistrator.registerUsagesForMaterials(plateName, noSmash, m.getIngots(1));
+ if ((m.mTypes & 4) != 0) GT_RecipeRegistrator.registerUsagesForMaterials(plateName, noSmash, m.getGems(1));
+ if (m.getBlocks(1) != null) GT_RecipeRegistrator.registerUsagesForMaterials(null, noSmash, m.getBlocks(1));
}
-
public static void createGTtoolsCreativeTab() {
new CreativeTabs("GTtools") {
@SideOnly(Side.CLIENT)
@@ -243,15 +456,23 @@ public class GT_PostLoad {
public void displayAllReleventItems(List aList) {
for (int i = 0; i < 32766; i += 2) {
- if (GT_MetaGenerated_Tool_01.INSTANCE.getToolStats(new ItemStack(GT_MetaGenerated_Tool_01.INSTANCE, 1, i)) != null) {
+ if (GT_MetaGenerated_Tool_01.INSTANCE.getToolStats(
+ new ItemStack(GT_MetaGenerated_Tool_01.INSTANCE, 1, i))
+ != null) {
ItemStack tStack = new ItemStack(GT_MetaGenerated_Tool_01.INSTANCE, 1, i);
GT_MetaGenerated_Tool_01.INSTANCE.isItemStackUsable(tStack);
- aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(i, 1, Materials.Lead, Materials.Lead, null));
- aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(i, 1, Materials.Nickel, Materials.Nickel, null));
- aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(i, 1, Materials.Cobalt, Materials.Cobalt, null));
- aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(i, 1, Materials.Osmium, Materials.Osmium, null));
- aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(i, 1, Materials.Adamantium, Materials.Adamantium, null));
- aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(i, 1, Materials.Neutronium, Materials.Neutronium, null));
+ aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ i, 1, Materials.Lead, Materials.Lead, null));
+ aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ i, 1, Materials.Nickel, Materials.Nickel, null));
+ aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ i, 1, Materials.Cobalt, Materials.Cobalt, null));
+ aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ i, 1, Materials.Osmium, Materials.Osmium, null));
+ aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ i, 1, Materials.Adamantium, Materials.Adamantium, null));
+ aList.add(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ i, 1, Materials.Neutronium, Materials.Neutronium, null));
}
}
super.displayAllReleventItems(aList);
@@ -285,7 +506,8 @@ public class GT_PostLoad {
GT_OreDictUnificator.get(ItemList.Block_MSSFUEL.get(1)),
GT_OreDictUnificator.get(OrePrefixes.rod, Materials.Blaze, 1));
if (Loader.isModLoaded("Thaumcraft")) {
- GT_Recipe.GT_Recipe_Map.sLargeBoilerFakeFuels.addSolidRecipe(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1));
+ GT_Recipe.GT_Recipe_Map.sLargeBoilerFakeFuels.addSolidRecipe(
+ GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1));
}
}
@@ -293,9 +515,15 @@ public class GT_PostLoad {
final String[] steamCandidates = {"steam", "ic2steam"};
final String[] superHeatedSteamCandidates = {"ic2superheatedsteam"};
- GT_ModHandler.sAnySteamFluidIDs = Arrays.stream(steamCandidates).map(FluidRegistry::getFluid).filter(Objects::nonNull)
- .map(FluidRegistry::getFluidID).collect(Collectors.toList());
- GT_ModHandler.sSuperHeatedSteamFluidIDs = Arrays.stream(superHeatedSteamCandidates).map(FluidRegistry::getFluid).filter(Objects::nonNull)
- .map(FluidRegistry::getFluidID).collect(Collectors.toList());
+ GT_ModHandler.sAnySteamFluidIDs = Arrays.stream(steamCandidates)
+ .map(FluidRegistry::getFluid)
+ .filter(Objects::nonNull)
+ .map(FluidRegistry::getFluidID)
+ .collect(Collectors.toList());
+ GT_ModHandler.sSuperHeatedSteamFluidIDs = Arrays.stream(superHeatedSteamCandidates)
+ .map(FluidRegistry::getFluid)
+ .filter(Objects::nonNull)
+ .map(FluidRegistry::getFluidID)
+ .collect(Collectors.toList());
}
}