aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/GT_Mod.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/GT_Mod.java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java149
1 files changed, 108 insertions, 41 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index fabc76d581..ca00a5373f 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -222,7 +222,10 @@ public class GT_Mod implements IGT_Mod {
Configuration tMainConfig = GT_PreLoad.getConfiguration(aEvent.getModConfigurationDirectory());
GT_PreLoad.initCompat();
- GT_PreLoad.createLogFiles(aEvent.getModConfigurationDirectory().getParentFile(), tMainConfig);
+ GT_PreLoad.createLogFiles(
+ aEvent.getModConfigurationDirectory()
+ .getParentFile(),
+ tMainConfig);
gregtechproxy.onPreLoad();
@@ -239,7 +242,9 @@ public class GT_Mod implements IGT_Mod {
GT_Log.out.println("GT_Mod: Saving Main Config");
tMainConfig.save();
- GT_PreLoad.initLocalization(aEvent.getModConfigurationDirectory().getParentFile());
+ GT_PreLoad.initLocalization(
+ aEvent.getModConfigurationDirectory()
+ .getParentFile());
GT_PreLoad.adjustScrap();
EntityRegistry.registerModEntity(GT_Entity_Arrow.class, "GT_Entity_Arrow", 1, GT_Values.GT, 160, 1, true);
@@ -279,7 +284,10 @@ public class GT_Mod implements IGT_Mod {
}
}
- if (FMLCommonHandler.instance().getEffectiveSide().isServer()) GT_Assemblyline_Server.fillMap(aEvent);
+ if (FMLCommonHandler.instance()
+ .getEffectiveSide()
+ .isServer())
+ GT_Assemblyline_Server.fillMap(aEvent);
}
@Mod.EventHandler
@@ -441,8 +449,10 @@ public class GT_Mod implements IGT_Mod {
aThermalCentrifugeRecipeList);
if (GT_Values.D1) {
- GT_ModHandler.sSingleNonBlockDamagableRecipeList
- .forEach(iRecipe -> GT_Log.out.println("=> " + iRecipe.getRecipeOutput().getDisplayName()));
+ GT_ModHandler.sSingleNonBlockDamagableRecipeList.forEach(
+ iRecipe -> GT_Log.out.println(
+ "=> " + iRecipe.getRecipeOutput()
+ .getDisplayName()));
}
new GT_CraftingRecipeLoader().run();
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2forgehammer", true)) {
@@ -463,8 +473,13 @@ public class GT_Mod implements IGT_Mod {
}
if (GregTech_API.mAE2) {
GT_MetaTileEntity_DigitalChestBase.registerAEIntegration();
- ItemStack facade = AEApi.instance().definitions().items().facade().maybeItem()
- .transform(i -> new ItemStack(i, 1, GT_Values.W)).orNull();
+ ItemStack facade = AEApi.instance()
+ .definitions()
+ .items()
+ .facade()
+ .maybeItem()
+ .transform(i -> new ItemStack(i, 1, GT_Values.W))
+ .orNull();
if (facade != null) {
GregTech_API.registerCover(facade, null, new GT_Cover_FacadeAE());
}
@@ -474,10 +489,13 @@ public class GT_Mod implements IGT_Mod {
new String[] { "blastfurnace", "blockcutter", "inductionFurnace", "generator", "windMill", "waterMill",
"solarPanel", "centrifuge", "electrolyzer", "compressor", "electroFurnace", "extractor",
"macerator", "recycler", "metalformer", "orewashingplant", "massFabricator", "replicator", })
- .filter(
- tName -> GregTech_API.sRecipeFile
- .get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + tName, true))
- .map(tName -> GT_ModHandler.getIC2Item(tName, 1L)).forEach(GT_ModHandler::removeRecipeByOutputDelayed);
+ .filter(
+ tName -> GregTech_API.sRecipeFile.get(
+ ConfigCategories.Recipes.disabledrecipes,
+ aTextIC2 + tName,
+ true))
+ .map(tName -> GT_ModHandler.getIC2Item(tName, 1L))
+ .forEach(GT_ModHandler::removeRecipeByOutputDelayed);
GT_PostLoad.nerfVanillaTools();
new GT_ExtremeDieselFuelLoader().run();
@@ -595,61 +613,110 @@ public class GT_Mod implements IGT_Mod {
ArrayList<ItemStack> tStacks = new ArrayList<>(10000);
GT_Log.out.println("GT_Mod: IC2 Machines");
- ic2.api.recipe.Recipes.cannerBottle.getRecipes().values().stream().map(t -> t.items).forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.centrifuge.getRecipes().values().stream().map(t -> t.items).forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.compressor.getRecipes().values().stream().map(t -> t.items).forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.extractor.getRecipes().values().stream().map(t -> t.items).forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.macerator.getRecipes().values().stream().map(t -> t.items).forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.metalformerCutting.getRecipes().values().stream().map(t -> t.items)
- .forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.metalformerExtruding.getRecipes().values().stream().map(t -> t.items)
- .forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.metalformerRolling.getRecipes().values().stream().map(t -> t.items)
- .forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.matterAmplifier.getRecipes().values().stream().map(t -> t.items)
- .forEach(tStacks::addAll);
- ic2.api.recipe.Recipes.oreWashing.getRecipes().values().stream().map(t -> t.items).forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.cannerBottle.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.centrifuge.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.compressor.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.extractor.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.macerator.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.metalformerCutting.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.metalformerExtruding.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.metalformerRolling.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.matterAmplifier.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
+ ic2.api.recipe.Recipes.oreWashing.getRecipes()
+ .values()
+ .stream()
+ .map(t -> t.items)
+ .forEach(tStacks::addAll);
GT_Log.out.println("GT_Mod: Dungeon Loot");
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("dungeonChest").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("dungeonChest")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("bonusChest").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("bonusChest")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("villageBlacksmith").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("villageBlacksmith")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCrossing").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCrossing")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdLibrary").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdLibrary")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCorridor").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCorridor")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidJungleDispenser")
- .getItems(new XSTR())) {
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidJungleChest").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidJungleChest")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidDesertyChest").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidDesertyChest")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("mineshaftCorridor").getItems(new XSTR())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("mineshaftCorridor")
+ .getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
GT_Log.out.println("GT_Mod: Smelting");
// noinspection unchecked// Deal with legacy Minecraft raw types
- FurnaceRecipes.smelting().getSmeltingList().values().forEach(k -> tStacks.add((ItemStack) k));
+ FurnaceRecipes.smelting()
+ .getSmeltingList()
+ .values()
+ .forEach(k -> tStacks.add((ItemStack) k));
if (gregtechproxy.mCraftingUnification) {
GT_Log.out.println("GT_Mod: Crafting Recipes");
- for (Object tRecipe : CraftingManager.getInstance().getRecipeList()) {
+ for (Object tRecipe : CraftingManager.getInstance()
+ .getRecipeList()) {
if ((tRecipe instanceof IRecipe)) {
tStacks.add(((IRecipe) tRecipe).getRecipeOutput());
}
@@ -662,8 +729,8 @@ public class GT_Mod implements IGT_Mod {
"A Recipe used an OreDict Item as Output directly, without copying it before!!! This is a typical CallByReference/CallByValue Error");
GT_FML_LOGGER.error(
"Said Item will be renamed to make the invalid Recipe visible, so that you can report it properly.");
- GT_FML_LOGGER
- .error("Please check all Recipes outputting this Item, and report the Recipes to their Owner.");
+ GT_FML_LOGGER.error(
+ "Please check all Recipes outputting this Item, and report the Recipes to their Owner.");
GT_FML_LOGGER.error(
"The Owner of the ==>RECIPE<==, NOT the Owner of the Item, which has been mentioned above!!!");
GT_FML_LOGGER.error(
@@ -675,8 +742,8 @@ public class GT_Mod implements IGT_Mod {
GT_FML_LOGGER.error("And speaking of failed Reports:");
GT_FML_LOGGER.error(
"Both IC2 and GregTech CANNOT be the CAUSE of this Problem, so don't report it to either of them.");
- GT_FML_LOGGER
- .error("I REPEAT, BOTH, IC2 and GregTech CANNOT be the source of THIS BUG. NO MATTER WHAT.");
+ GT_FML_LOGGER.error(
+ "I REPEAT, BOTH, IC2 and GregTech CANNOT be the source of THIS BUG. NO MATTER WHAT.");
GT_FML_LOGGER.error(
"Asking in the IC2 Forums, which Mod is causing that, won't help anyone, since it is not possible to determine, which Mod it is.");
GT_FML_LOGGER.error(